/* CSS Variables for easy theme customization */
:root {
    /* Color Palette - White Dominant & Red Accent */
    --primary-color: #dc2626;       /* Red (Tailwind red-600) */
    --primary-hover: #b91c1c;       /* Darker Red (Tailwind red-700) */
    --primary-light: #fee2e2;       /* Soft Light Red (Tailwind red-100) */
    
    --bg-gradient-start: #ffffff;   /* Pure White */
    --bg-gradient-end: #f1f5f9;     /* Soft slate/light gray */
    
    --card-bg: rgba(255, 255, 255, 0.95); /* Solid White with slight transparency */
    --card-border: rgba(220, 38, 38, 0.12); /* Subtle red border */
    
    --text-main: #0f172a;          /* Dark Slate for contrast */
    --text-muted: #475569;         /* Medium Slate Gray */
    
    --success-color: #16a34a;      /* Forest Green */
    --success-bg: #dcfce7;         /* Very Light Green */
    --success-border: #22c55e;
    
    --error-color: #dc2626;        /* Deep Red */
    --error-bg: #fee2e2;           /* Very Light Red */
    --error-border: #ef4444;
    
    /* Layout & Styling properties */
    --font-family: 'Outfit', sans-serif;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;
    
    --shadow-premium: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.02);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header & Logo */
.app-header {
    text-align: center;
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.logo span {
    color: var(--primary-color);
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 400;
}

/* Card - Glassmorphism style */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

/* Views & Dynamic visibility */
.view {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
    animation: fadeIn 0.4s ease-out;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Emoji icon styles */
.icon-wrapper {
    width: 90px;
    height: 90px;
    background: rgba(220, 38, 38, 0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--card-border);
    margin-bottom: 8px;
}

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

/* Typography elements */
h2 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
}

p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    font-weight: 300;
}

/* Buttons */
.btn {
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 14px 32px;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.45);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Select Dropdown Styling */
.select-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 8px 0;
}

.select-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.city-select {
    width: 100%;
    padding: 16px;
    border-radius: var(--border-radius-md);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px;
}

.city-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background-color: rgba(15, 23, 42, 0.8);
}

.city-select option {
    background-color: #1e293b;
    color: var(--text-main);
}

/* Quiz Screen Details */
.quiz-progress-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #ef4444);
    border-radius: 4px;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Question Section */
.question-text {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    width: 100%;
    margin-top: 10px;
    min-height: 70px;
}

/* Options Container & List */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.option-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-md);
    padding: 16px 24px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1.05rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    font-weight: 400;
}

.option-btn:hover:not(.disabled) {
    background: var(--primary-light);
    border-color: rgba(220, 38, 38, 0.3);
    transform: translateX(4px);
    color: var(--primary-hover);
}

/* Option feedback classes (Correct / Incorrect) */
.option-btn.correct {
    background: var(--success-bg) !important;
    border-color: var(--success-border) !important;
    color: var(--success-color) !important;
    font-weight: 600;
}

.option-btn.correct::after {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.option-btn.wrong {
    background: var(--error-bg) !important;
    border-color: var(--error-border) !important;
    color: var(--error-color) !important;
}

.option-btn.wrong::after {
    content: '✗';
    color: var(--error-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* When choices are lock-disabled after user selection */
.option-btn.disabled {
    cursor: not-allowed;
}

.option-btn.disabled:not(.correct):not(.wrong) {
    opacity: 0.4;
}

/* Footer Section */
.quiz-footer {
    width: 100%;
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

/* Result Screen */
.score-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-md);
    padding: 24px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.score-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #b91c1c);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.2);
}

.score-circle span {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
}

.result-message {
    font-weight: 400;
    font-size: 1.1rem;
    color: var(--text-main);
}

/* Theme Tip Footer */
.app-footer {
    text-align: center;
}

.app-footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.app-footer code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--primary-color);
}

/* Responsiveness adjustments */
@media (max-width: 480px) {
    .card {
        padding: 24px 20px;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .question-text {
        font-size: 1.15rem;
    }
    
    .option-btn {
        padding: 12px 18px;
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}
