/* ===================================
   Overland Airways - Love Trivia
   Modern Minimalist Design
   Primary: #2D4EA2 | Secondary: #FF0000
=================================== */

/* CSS Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2D4EA2;
    --primary-light: #4A6BC5;
    --primary-dark: #1E3A7A;
    --secondary: #FF0000;
    --secondary-light: #FF3333;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition: all 0.3s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   Background Images
=================================== */
.bg-welcome,
.bg-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    transition: opacity 0.5s ease;
}

/* Welcome page background - no overlay */
.bg-welcome {
    background-image: url('../images/bg-content-mobile.jpg');
    opacity: 0;
}

/* Content pages background - with white overlay */
.bg-content {
    background-image: url('../images/bg-content-mobile.jpg');
    opacity: 0;
}

.bg-welcome::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
}

.bg-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
}

/* Show/hide backgrounds based on page state */
body.page-welcome .bg-welcome { opacity: 1; }
body.page-welcome .bg-content { opacity: 0; }

body.page-content .bg-welcome { opacity: 0; }
body.page-content .bg-content { opacity: 1; }

/* Tablet backgrounds (768px and up) */
@media (min-width: 768px) {
    .bg-welcome {
        background-image: url('../images/bg-content-tablet.jpg');
    }
    .bg-content {
        background-image: url('../images/bg-content-tablet.jpg');
    }
}

/* Desktop backgrounds (1024px and up) */
@media (min-width: 1024px) {
    .bg-welcome {
        background-image: url('../images/bg-content-desktop.jpg');
    }
    .bg-content {
        background-image: url('../images/bg-content-desktop.jpg');
    }
}

/* Container */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.logo-sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* Screens */
.screen {
    display: none;
    flex: 1;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Welcome Screen */
.welcome-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem 0;
}

.welcome-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary) 0%, #FF6666 100%);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.welcome-content h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.welcome-content p {
    font-size: 1rem;
    color: var(--gray-500);
    max-width: 400px;
    margin-bottom: 2.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(45, 78, 162, 0.4);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(45, 78, 162, 0.5);
}

.btn-primary:disabled {
    background: var(--gray-300);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.btn-secondary:disabled {
    color: var(--gray-400);
    cursor: not-allowed;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 14.28%;
}

.progress-text {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Questions Container */
.questions-container {
    flex: 1;
    position: relative;
}

.question-card {
    display: none;
    animation: slideIn 0.4s ease;
}

.question-card.active {
    display: block;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.question-card h2 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

/* Options */
.options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option {
    display: block;
    cursor: pointer;
}

.option input {
    display: none;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    transition: var(--transition);
}

.option:hover .option-content {
    border-color: var(--primary-light);
    background: var(--gray-50);
}

.option input:checked + .option-content {
    border-color: var(--primary);
    background: rgba(45, 78, 162, 0.05);
}

.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--gray-100);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    transition: var(--transition);
    flex-shrink: 0;
}

.option input:checked + .option-content .option-letter {
    background: var(--primary);
    color: var(--white);
}

.option-text {
    font-size: 0.9375rem;
    color: var(--gray-700);
    font-weight: 500;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-100);
}

.nav-buttons .btn {
    flex: 1;
}

#submit-btn {
    flex: 1;
}

/* Loading Screen */
.loading-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.plane-loader {
    animation: fly 2s ease-in-out infinite;
    margin-bottom: 1.5rem;
}

@keyframes fly {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(-5deg); }
    75% { transform: translateY(10px) rotate(5deg); }
}

.loading-content p {
    font-size: 1rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ===================================
   Result Page Styles
=================================== */

.result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0;
}

.result-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.result-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.result-subtitle {
    font-size: 1rem;
    color: var(--gray-500);
    margin-bottom: 2rem;
}

/* Destination Slider */
.destination-slider {
    width: 100%;
    position: relative;
    margin-bottom: 2rem;
}

.destination-slide {
    display: none;
    animation: fadeIn 0.5s ease;
}

.destination-slide.active {
    display: block;
}

.destination-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.25rem;
}

.destination-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.destination-caption {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Slider Controls */
.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.slider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-600);
}

.slider-btn:hover {
    background: var(--gray-50);
    border-color: var(--primary);
    color: var(--primary);
}

.slider-dots {
    display: flex;
    gap: 0.5rem;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-300);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

/* Result Actions */
.result-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: auto;
    padding-top: 2rem;
}

.result-actions .btn {
    width: 100%;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* ===================================
   Analytics & Admin Pages
=================================== */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
}

.modal {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    text-align: center;
}

.modal p {
    font-size: 0.875rem;
    color: var(--gray-500);
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    margin-bottom: 1rem;
    transition: var(--transition);
    text-align: center;
    letter-spacing: 2px;
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-error {
    color: var(--secondary);
    font-size: 0.8125rem;
    text-align: center;
    margin-bottom: 1rem;
    display: none;
}

.modal-error.show {
    display: block;
}

.modal .btn {
    width: 100%;
}

/* Dashboard */
.dashboard {
    flex: 1;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.dashboard-header p {
    font-size: 0.9375rem;
    color: var(--gray-500);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.5rem;
}

.stat-card.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
}

.stat-card.highlight .stat-label,
.stat-card.highlight .stat-value {
    color: var(--white);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Chart Section */
.chart-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chart-bar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chart-bar-label {
    width: 140px;
    font-size: 0.8125rem;
    color: var(--gray-600);
    font-weight: 500;
    flex-shrink: 0;
}

.chart-bar-container {
    flex: 1;
    height: 24px;
    background: var(--gray-100);
    border-radius: 6px;
    overflow: hidden;
}

.chart-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 1s ease;
}

.chart-bar.cultural { background: var(--primary); }
.chart-bar.nature { background: #10B981; }
.chart-bar.lively { background: var(--secondary); }
.chart-bar.anywhere { background: #F59E0B; }

.chart-bar-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
    width: 50px;
    text-align: right;
}

/* Admin Settings */
.settings-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.setting-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-info h4 {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.setting-info p {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* Toggle Switch */
.toggle-group {
    display: flex;
    background: var(--gray-100);
    border-radius: 8px;
    padding: 4px;
}

.toggle-option {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-500);
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-option.active {
    background: var(--white);
    color: var(--gray-900);
    box-shadow: var(--shadow-sm);
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary);
}

/* ===================================
   Share Modal Styles
=================================== */

.share-modal {
    max-width: 440px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.share-modal h2 {
    text-align: left;
    padding-right: 2rem;
}

.share-modal p {
    text-align: left;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.share-option-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.share-option-btn:hover {
    border-color: var(--primary);
    background: rgba(45, 78, 162, 0.05);
}

.share-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--white);
    border-radius: 10px;
    color: var(--primary);
    flex-shrink: 0;
}

.share-option-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.share-option-text strong {
    font-size: 0.9375rem;
    color: var(--gray-900);
}

.share-option-text span {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.share-link-box {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-100);
    border-radius: 10px;
    margin-top: 1rem;
}

.share-link-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: var(--white);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.share-link-box input:focus {
    outline: none;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-copy:hover {
    background: var(--primary-light);
}

.generating-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (min-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-buttons {
        justify-content: space-between;
    }
    
    .nav-buttons .btn {
        flex: 0 1 auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .welcome-content h1 {
        font-size: 1.75rem;
    }
    
    .question-card h2 {
        font-size: 1.125rem;
    }
    
    .option-content {
        padding: 0.875rem 1rem;
    }
    
    .destination-image {
        height: 220px;
    }
}