/* AI Guru - Main Styles */
/* Core variables, base styles, and layout */

:root {
    --primary-color: #FF6B35;
    --secondary-color: #F7931E;
    --accent-color: #4A148C;
    --text-dark: #2C3E50;
    --text-light: #FFFFFF;
    --bg-light: #FFF8F3;
    --success-color: #27AE60;
    --danger-color: #E74C3C;
    --warning-color: #F39C12;
    --gradient: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    --critical-gradient: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Progress Bar */
.progress-bar-container {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 15px 20px;
}

/* Welcome Banner Styles */
#welcomeBanner {
    height: 70px; /* Define explicit height for calculations */
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #E0E0E0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
    position: relative;
}

.progress-text {
    text-align: center;
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
}

/* Main Container */
.main-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 170px 20px 40px;
}

/* Introduction Screen */
.intro-screen {
    text-align: center;
    padding: 40px 20px;
}

.intro-screen h1 {
    font-size: 2.2em;
    color: var(--accent-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.intro-screen h2 {
    font-size: 1.4em;
    color: #666;
    margin-bottom: 30px;
    font-weight: normal;
    line-height: 1.5;
}

.melancholic-image {
    width: 100%;
    max-width: 400px;
    height: 250px;
    border-radius: 20px;
    margin: 30px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #E0E0E0 0%, #BDBDBD 100%);
}

.melancholic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.melancholic-image:hover img {
    transform: scale(1.05);
}

/* Loading Screen */
.loading-screen {
    text-align: center;
    padding: 60px 20px;
}

.loading-title {
    font-size: 1.8em;
    color: var(--accent-color);
    margin-bottom: 30px;
    font-weight: 600;
}

.analysis-progress {
    width: 100%;
    max-width: 400px;
    height: 10px;
    background: #E0E0E0;
    border-radius: 5px;
    margin: 0 auto 20px;
    overflow: hidden;
    position: relative;
}

.analysis-fill {
    height: 100%;
    background: var(--gradient);
    width: 0%;
}

.loading-messages {
    font-size: 1.1em;
    color: #666;
    margin: 20px 0;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-message {
    opacity: 0;
}

.social-proof {
    margin-top: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border-radius: 15px;
    color: var(--success-color);
    font-weight: 600;
}

/* Results Screen */
.results-screen {
    /* display: none; - Removed to allow JavaScript control via .hidden class */
}

.dramatic-reveal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: black;
    z-index: 2000;
    display: none;
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: var(--critical-gradient);
    color: white;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.results-header::before {
    content: '⚠️';
    position: absolute;
    font-size: 150px;
    opacity: 0.1;
    right: -30px;
    top: -30px;
    transform: rotate(-15deg);
}

.results-title {
    font-size: 2em;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.critical-level {
    font-size: 3em;
    font-weight: bold;
    margin: 20px 0;
}

.results-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.analysis-section {
    margin-bottom: 30px;
}

.analysis-section h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.analysis-text {
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
}

.chart-container {
    margin: 20px 0;
    padding: 20px;
    background: #F5F5F5;
    border-radius: 15px;
}

.chart-item {
    margin-bottom: 15px;
}

.chart-label {
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
}

.chart-bar {
    width: 100%;
    height: 30px;
    background: #E0E0E0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.chart-fill {
    height: 100%;
    background: var(--danger-color);
    border-radius: 15px;
    transition: width 1s ease;
    position: relative;
    overflow: hidden;
}

.chart-fill::after {
    content: attr(data-value);
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: 600;
    font-size: 0.9em;
}

.locked-content {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #F5F5F5 0%, #E0E0E0 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lock-icon {
    font-size: 3em;
    color: var(--warning-color);
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    #welcomeBanner {
        height: 60px; /* Reduced height for mobile */
        padding: 12px 15px !important;
    }
    
    .progress-bar-container {
        top: 60px; /* Position below welcome banner */
        padding: 10px 15px;
    }
    
    .main-container {
        padding: 150px 15px 30px; /* Increased top padding to account for both banners */
    }
    
    .intro-screen h1 {
        font-size: 1.8em;
    }
    
    .intro-screen h2 {
        font-size: 1.2em;
    }
    
    .melancholic-image {
        height: 200px;
        margin: 20px auto;
    }
}

@media (max-width: 480px) {
    #welcomeBanner {
        height: 55px; /* Further reduced height for small mobile */
        padding: 8px 10px !important;
    }
    
    .progress-bar-container {
        top: 55px; /* Position below welcome banner */
        padding: 8px 10px;
    }
    
    .main-container {
        padding: 135px 10px 20px; /* Increased top padding to account for both banners */
    }
    
    .intro-screen {
        padding: 20px 10px;
    }
    
    .intro-screen h1 {
        font-size: 1.6em;
        line-height: 1.2;
    }
    
    .intro-screen h2 {
        font-size: 1.1em;
        margin-bottom: 20px;
    }
    
    .melancholic-image {
        height: 180px;
        margin: 15px auto;
    }
    
    .quiz-section {
        padding: 20px;
    }
    
    .question-title {
        font-size: 1.2em;
        margin-bottom: 20px;
    }
    
    .quiz-option {
        padding: 15px;
        font-size: 0.95em;
    }
}
