/* Upload Page Styles - Dine & Wine */

/* CSS Variables */
:root {
    --primary-gold: #D4AF37;
    --secondary-gold: #F5E6B4;
    --wine-red: #722F37;
    --deep-wine: #8B1538;
    --dark-bg: #1a1614;
    --text-light: #ffffff;
    --text-cream: #F5F5DC;
    --accent-copper: #B87333;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --shadow-premium: 0 8px 32px rgba(0, 0, 0, 0.6);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --success-green: #28a745;
    --warning-orange: #ffc107;
    --error-red: #dc3545;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #2d1b0d 100%);
}

/* Upload Container */
.upload-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
}

.upload-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/back.png') center/cover no-repeat;
    opacity: 0.3;
    z-index: -1;
}

.upload-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    box-shadow: var(--shadow-premium);
    text-align: center;
}

/* Upload Title */
.upload-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-gold), var(--accent-copper), var(--wine-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.wine-icon {
    font-size: 3rem;
}

.upload-subtitle {
    color: var(--text-cream);
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

/* File Upload Area */
.file-upload-area {
    border: 3px dashed var(--glass-border);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    transition: var(--transition-smooth);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
}

.file-upload-area:hover {
    border-color: var(--primary-gold);
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.file-upload-area.dragover {
    border-color: var(--primary-gold);
    background: rgba(212, 175, 55, 0.15);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.upload-text .main-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.upload-text .sub-text {
    color: var(--text-cream);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.file-select-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--wine-red), var(--deep-wine));
    color: var(--text-light);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-smooth);
    text-decoration: none;
    font-size: inherit;
}

.file-select-button:hover {
    background: linear-gradient(135deg, var(--deep-wine), var(--wine-red));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 21, 56, 0.4);
}

/* File Info */
.file-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--glass-border);
}

.file-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.file-details {
    color: var(--text-cream);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* File Actions */
.file-actions {
    text-align: center;
    margin-top: 1rem;
}

.retake-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.retake-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Analyze Button */
.analyze-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 3rem;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-gold), var(--accent-copper));
    color: var(--dark-bg);
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    width: 100%;
    max-width: 300px;
    margin-bottom: 2rem;
}

.analyze-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.analyze-button:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, var(--accent-copper), var(--primary-gold));
}

.button-icon {
    font-size: 1.4rem;
}

/* Upload Notes */
.upload-notes {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
    border: 1px solid var(--glass-border);
}

.upload-notes h3 {
    color: var(--primary-gold);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-notes ul {
    list-style: none;
    padding-left: 0;
}

.upload-notes li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-cream);
    line-height: 1.5;
}

.upload-notes li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-gold);
    font-weight: bold;
}

/* Back to Home */
.back-to-home {
    margin-top: 1rem;
}

.back-link {
    color: var(--text-cream);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--primary-gold);
    opacity: 1;
}

/* Loading Modal */
.loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

.loading-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.loading-subtext {
    color: var(--text-cream);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .upload-container {
        padding: 0.5rem;
    }
    
    .upload-content {
        padding: 1.5rem;
        margin: 0.5rem;
        border-radius: 16px;
    }
    
    .upload-title {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .wine-icon {
        font-size: 2.5rem;
    }
    
    .file-upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .analyze-button {
        font-size: 1.1rem;
        padding: 1rem 2rem;
    }
    
    .retake-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .upload-container {
        padding: 0.25rem;
    }
    
    .upload-content {
        padding: 1rem;
        margin: 0.25rem;
        border-radius: 12px;
    }
    
    .upload-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .upload-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }
    
    .file-upload-area {
        padding: 1.5rem 0.75rem;
    }
    
    .upload-text {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .upload-subtext {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .retake-button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        width: 100%;
        max-width: 200px;
    }
}