:root {
    --bg-main: #fef3c7;
    --bg-card: rgba(255, 255, 255, 0.6);
    --primary: #ea580c;
    --primary-glow: rgba(234, 88, 12, 0.3);
    --secondary: #8b5cf6;
    --secondary-glow: rgba(139, 92, 246, 0.3);
    --accent: #ec4899;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: rgba(251, 146, 60, 0.2);
    --border-hover: rgba(251, 146, 60, 0.4);
    --bg-gradient: linear-gradient(180deg, #fef3c7 0%, #fde68a 20%, #fed7aa 40%, #fecaca 60%, #ddd6fe 100%);
}

/* Dark mode variables */
[data-theme="dark"] {
    --bg-main: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.8);
    --primary: #fb923c;
    --primary-glow: rgba(251, 146, 60, 0.3);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.2);
    --border-hover: rgba(148, 163, 184, 0.4);
    --bg-gradient: linear-gradient(180deg, #0f172a 0%, #1e1b4b 30%, #312e81 50%, #4c1d95 70%, #581c87 100%);
}

/* Auto dark mode based on system preference */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-main: #0f172a;
        --bg-card: rgba(30, 41, 59, 0.8);
        --primary: #fb923c;
        --primary-glow: rgba(251, 146, 60, 0.3);
        --text-main: #f1f5f9;
        --text-muted: #94a3b8;
        --border: rgba(148, 163, 184, 0.2);
        --border-hover: rgba(148, 163, 184, 0.4);
        --bg-gradient: linear-gradient(180deg, #0f172a 0%, #1e1b4b 30%, #312e81 50%, #4c1d95 70%, #581c87 100%);
    }

    body {
        background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 30%, #312e81 50%, #4c1d95 70%, #581c87 100%);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background: var(--bg-gradient);
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3,
.logo,
.btn {
    font-family: 'Outfit', sans-serif;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Floating Pill Header */
header {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.header-inner {
    width: auto;
    min-width: 600px;
    max-width: 900px;
    padding: 10px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

header.scrolled .header-inner {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-btn {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-main);
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.05);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.15);
}

/* Hero Section */
.hero {
    padding: 180px 20px 100px;
    text-align: center;
    position: relative;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.15), rgba(236, 72, 153, 0.15));
    color: #ea580c;
    border: 1px solid rgba(251, 146, 60, 0.3);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.1);
    animation: fadeUp 0.8s ease-out forwards;
}

.hero h1 {
    font-size: 72px;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ea580c 0%, #ec4899 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeUp 0.8s ease-out 0.1s forwards;
    opacity: 0;
    filter: drop-shadow(0 2px 10px rgba(234, 88, 12, 0.1));
}

.hero p {
    font-size: 20px;
    color: #92400e;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
    animation: fadeUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 80px;
    animation: fadeUp 0.8s ease-out 0.3s forwards;
    opacity: 0;
}

.btn-primary {
    padding: 16px 40px;
    background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(249, 115, 22, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

.btn-secondary {
    padding: 16px 40px;
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-main);
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    border: 1px solid var(--border);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

/* Visual Playground */
.playground-section {
    padding: 40px 20px 100px;
    animation: fadeUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.playground-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.playground-text h2 {
    font-size: 42px;
    margin-bottom: 20px;
    color: var(--text-main);
}

.playground-text p {
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 30px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-main);
    font-weight: 500;
}

.feature-list li svg {
    color: var(--primary);
}

/* iPhone Simulator */
.iphone-frame {
    width: 320px;
    height: 650px;
    background: #000;
    border-radius: 40px;
    border: 8px solid #1f2937;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.iphone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 30px;
    background: #1f2937;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 10;
}

.app-screen {
    width: 100%;
    height: 100%;
    background: #f2f2f7;
    display: flex;
    flex-direction: column;
    position: relative;
    color: #000;
}

/* App States */
.state {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
    animation: fadeIn 0.5s ease;
}

.state.active {
    display: flex;
}

/* Login Screen */
.login-screen {
    padding: 60px 24px;
    background: white;
    align-items: center;
    justify-content: center;
}

.app-logo {
    font-size: 48px;
    margin-bottom: 40px;
}

.input-mock {
    width: 100%;
    height: 50px;
    background: #f2f2f7;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #8e8e93;
    font-size: 16px;
    position: relative;
}

.input-typing::after {
    content: '|';
    animation: blink 1s infinite;
    color: #007aff;
}

.btn-mock {
    width: 100%;
    height: 50px;
    background: #007aff;
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-top: 24px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.btn-mock.active {
    opacity: 1;
}

/* Dashboard Screen */
.dashboard-header {
    padding: 50px 20px 20px;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: white;
    margin: 16px;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-item {
    text-align: center;
}

.stat-num {
    font-size: 24px;
    font-weight: 700;
    margin: 4px 0;
}

.stat-label {
    font-size: 12px;
    color: #8e8e93;
}

.action-card {
    background: white;
    margin: 0 16px 16px;
    padding: 16px;
    border-radius: 16px;
}

.mass-import-btn {
    width: 100%;
    height: 44px;
    background: #007aff;
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    gap: 8px;
    margin-top: 12px;
}

.flight-list {
    padding: 0 16px;
}

.flight-item {
    background: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Connect Screen */
.connect-screen {
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    background: white;
}

.connect-icon {
    width: 80px;
    height: 80px;
    background: #e5e7eb;
    border-radius: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

/* Bento Grid Features */
.bento-section {
    padding: 100px 20px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 24px;
}

.bento-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.bento-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 40px -10px rgba(251, 146, 60, 0.2);
    transform: translateY(-4px);
}

.bento-card.large {
    grid-column: span 2;
}

.bento-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.bento-icon {
    font-size: 32px;
    margin-bottom: 16px;
    display: inline-block;
    padding: 12px;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 16px;
    width: fit-content;
    color: var(--primary);
}

.bento-card h3 {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 700;
}

.bento-card p {
    color: var(--text-muted);
    font-weight: 500;
}

.bento-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(251, 146, 60, 0.05), transparent);
    z-index: 1;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.3);
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 16px;
    transition: color 0.2s;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Cloud Animation */
.bg-clouds {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
    top: 0;
    left: 0;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 100px;
    left: -250px;
    -webkit-animation: cloudFloat linear infinite;
    animation: cloudFloat linear infinite;
    will-change: transform;
}

.cloud1 {
    width: 200px;
    height: 60px;
    top: 12%;
    -webkit-animation-duration: 40s;
    animation-duration: 40s;
    -webkit-animation-delay: -5s;
    animation-delay: -5s;
}

.cloud2 {
    width: 150px;
    height: 50px;
    top: 35%;
    -webkit-animation-duration: 50s;
    animation-duration: 50s;
    -webkit-animation-delay: -25s;
    animation-delay: -25s;
}

.cloud3 {
    width: 180px;
    height: 55px;
    top: 55%;
    -webkit-animation-duration: 45s;
    animation-duration: 45s;
    -webkit-animation-delay: -15s;
    animation-delay: -15s;
}

.cloud4 {
    width: 120px;
    height: 40px;
    top: 25%;
    -webkit-animation-duration: 55s;
    animation-duration: 55s;
    -webkit-animation-delay: -35s;
    animation-delay: -35s;
}

.cloud5 {
    width: 160px;
    height: 48px;
    top: 75%;
    -webkit-animation-duration: 48s;
    animation-duration: 48s;
    -webkit-animation-delay: -10s;
    animation-delay: -10s;
}

@-webkit-keyframes cloudFloat {
    0% {
        -webkit-transform: translateX(0);
        transform: translateX(0);
    }
    100% {
        -webkit-transform: translateX(calc(100vw + 250px));
        transform: translateX(calc(100vw + 250px));
    }
}

@keyframes cloudFloat {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(100vw + 250px));
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .playground-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .feature-list {
        display: inline-block;
        text-align: left;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .bento-card.large {
        grid-column: span 1;
    }

    .hero h1 {
        font-size: 48px;
    }

    .header-inner {
        min-width: auto;
        width: 90%;
    }
}

@media (max-width: 640px) {
    header {
        top: 10px;
        padding: 0 10px;
    }

    .header-inner {
        min-width: auto;
        width: 100%;
        padding: 8px 12px;
        border-radius: 16px;
    }

    .logo {
        font-size: 16px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .nav-links {
        gap: 8px;
    }

    .nav-link {
        font-size: 13px;
    }

    .nav-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .hero {
        padding: 140px 16px 60px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 16px;
    }

    .cta-group {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 40px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 14px 24px;
    }
}

/* ========================================
   DARK MODE STYLES
   ======================================== */

/* Dark mode header */
@media (prefers-color-scheme: dark) {
    .header-inner {
        background: rgba(30, 41, 59, 0.95);
        border-color: rgba(148, 163, 184, 0.1);
    }

    .bento-card {
        background: rgba(30, 41, 59, 0.6);
        border-color: rgba(148, 163, 184, 0.2);
    }

    .bento-card:hover {
        border-color: var(--primary);
        box-shadow: 0 20px 40px -10px rgba(251, 146, 60, 0.15);
    }

    .auth-card {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(148, 163, 184, 0.2);
    }

    footer {
        background: rgba(15, 23, 42, 0.8);
    }

    /* Cloud colors for dark mode - more subtle */
    .cloud {
        background: rgba(148, 163, 184, 0.15) !important;
    }
}

/* Explicit dark theme (when data-theme="dark" is set) */
[data-theme="dark"] .header-inner {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(148, 163, 184, 0.1);
}

[data-theme="dark"] .bento-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(148, 163, 184, 0.2);
}

[data-theme="dark"] .bento-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 40px -10px rgba(251, 146, 60, 0.15);
}

[data-theme="dark"] .auth-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(148, 163, 184, 0.2);
}

[data-theme="dark"] footer {
    background: rgba(15, 23, 42, 0.8);
}

[data-theme="dark"] .cloud {
    background: rgba(148, 163, 184, 0.15) !important;
}