* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 2em;
}

p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

.camera-section {
    text-align: center;
    margin-bottom: 20px;
}

.camera-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    margin-bottom: 20px;
}

.camera-btn:hover {
    background: #45a049;
}

.preview {
    margin: 20px 0;
}

.preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.analyze-btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    margin-bottom: 20px;
}

.analyze-btn:hover {
    background: #1976D2;
}

.analyze-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result {
    margin-top: 20px;
}

.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 10px;
}

.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 10px;
}

.success h3, .error h3 {
    margin-bottom: 10px;
}

/* Mobile optimizations */
@media (max-width: 600px) {
    .container {
        margin: 10px;
        padding: 20px;
    }
    
    h1 {
        font-size: 1.5em;
    }
    
    .camera-btn, .analyze-btn {
        padding: 12px 20px;
        font-size: 16px;
    }
}
