* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 5px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.upload-section, .analysis-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #764ba2;
    background-color: #f8f9ff;
}

.upload-area.dragover {
    border-color: #764ba2;
    background-color: #f0f2ff;
}

.upload-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.upload-text {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 15px;
}

.file-input {
    display: none;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s ease;
    width: 100%;
    margin-top: 10px;
}

.upload-btn:hover {
    transform: translateY(-2px);
}

.retry-btn {
    background: linear-gradient(135deg, #555 0%, #333 100%);
}

.image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.analysis-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.analysis-item {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.analysis-item h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.analysis-item p, .analysis-item ul {
    color: #555;
    line-height: 1.6;
}

.analysis-item ul {
    padding-left: 20px;
}

.analysis-item li {
    margin-bottom: 5px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background: #ffe6e6;
    border-left-color: #ff4444;
    color: #cc0000;
}

.api-config {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.api-config h3 {
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gemini-badge {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.api-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 1rem;
}

.api-input:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.api-status {
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 0.9rem;
}

.api-status.connected {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.api-status.demo {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.debug-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    font-family: monospace;
    font-size: 0.8rem;
    max-height: 200px;
    overflow-y: auto;
}

.video-tutorial {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.video-tutorial h4 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}