/* ============================================
   Crazy Time — Spontaneous Trip Planner
   Tech/Gaming Dark Theme with App Colors
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --color-primary: #1565C0;
    --color-secondary: #FFD600;
    --color-accent: #6A1B9A;
    --color-bg: #1A0A2E;
    --color-bg-alt: #120720;
    --color-surface: #2D1060;
    --color-surface-light: #3A1878;
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #CFC0E4;
    --color-text-soft: #E0D8F0;
    --color-success: #43A047;
    --color-error: #E53935;
    --color-border: rgba(180, 120, 255, 0.15);
    --color-glow: rgba(21, 101, 192, 0.4);
    --radius-card: 16px;
    --radius-btn: 14px;
    --font-family: 'Inter', sans-serif;
    --gradient-logo: linear-gradient(135deg, #1565C0, #6A1B9A);
    --gradient-hero: linear-gradient(160deg, #1A0A2E 0%, #2D1060 40%, #1A0A2E 100%);
    --gradient-btn: linear-gradient(135deg, #1565C0, #1976D2);
    --gradient-btn-hover: linear-gradient(135deg, #1976D2, #1E88E5);
    --gradient-secondary: linear-gradient(135deg, #FFD600, #FFC107);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #FFE54C;
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- Navigation ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 10, 46, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s ease;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-logo);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-logo span {
    -webkit-text-fill-color: var(--color-secondary);
    margin-right: 6px;
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-secondary);
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}

.nav-hamburger span {
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-mobile {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(26, 10, 46, 0.98);
    backdrop-filter: blur(16px);
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
    z-index: 999;
}

.nav-mobile.open {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-mobile a {
    color: var(--color-text-secondary);
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 0;
}

/* ---- Hero Section ---- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 60px;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(21, 101, 192, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(106, 27, 154, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-inner {
    max-width: 1100px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    min-width: 0;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 214, 0, 0.12);
    color: var(--color-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--color-text-primary);
}

.hero-title .highlight {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    max-width: 480px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-device {
    flex-shrink: 0;
    position: relative;
    max-width: 300px;
}

/* ---- Device Mockup ---- */
.device-frame {
    position: relative;
    background: linear-gradient(145deg, #2D1060, #1A0A2E);
    border-radius: 36px;
    padding: 12px;
    box-shadow:
        0 0 0 2px rgba(180, 120, 255, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(21, 101, 192, 0.15);
    max-width: 280px;
    margin: 0 auto;
}

.device-frame::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 6px;
    background: #1A0A2E;
    border-radius: 3px;
    z-index: 2;
}

.device-frame img {
    width: 100%;
    border-radius: 26px;
    display: block;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-btn);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.4;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-btn);
    color: #fff;
    box-shadow: 0 4px 20px rgba(21, 101, 192, 0.35);
}

.btn-primary:hover {
    background: var(--gradient-btn-hover);
    box-shadow: 0 6px 28px rgba(21, 101, 192, 0.5);
    transform: translateY(-2px);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-primary);
    border: 2px solid rgba(180, 120, 255, 0.45);
}

.btn-secondary:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    transform: translateY(-2px);
}

.btn-yellow {
    background: var(--gradient-secondary);
    color: #1A0A2E;
    box-shadow: 0 4px 20px rgba(255, 214, 0, 0.3);
}

.btn-yellow:hover {
    box-shadow: 0 6px 28px rgba(255, 214, 0, 0.45);
    transform: translateY(-2px);
    color: #1A0A2E;
}

/* ---- Sections ---- */
.section {
    padding: 80px 24px;
    position: relative;
}

.section-alt {
    background: var(--color-bg-alt);
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-tag {
    display: inline-block;
    color: var(--color-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--color-text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ---- Features (Alternating) ---- */
.feature-row {
    display: flex;
    align-items: center;
    gap: 48px;
    margin-bottom: 64px;
}

.feature-row:last-child {
    margin-bottom: 0;
}

.feature-row.reverse {
    flex-direction: row-reverse;
}

.feature-icon-wrap {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.feature-text {
    flex: 1;
    text-align: left;
}

.feature-text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-text p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 500px;
}

/* ---- Screenshot Carousel ---- */
.screenshot-section {
    padding: 80px 24px;
    background: var(--color-bg-alt);
    overflow: hidden;
}

.carousel-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.carousel-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
    height: 380px;
}

.carousel-slide {
    flex-shrink: 0;
    opacity: 0;
    position: absolute;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.85);
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
    position: relative;
    pointer-events: auto;
}

.carousel-slide .device-frame {
    max-width: 220px;
    cursor: pointer;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    background: var(--color-surface-light);
}

.carousel-dots {
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(180, 120, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    background: var(--color-secondary);
    width: 24px;
    border-radius: 4px;
}

/* ---- Stats ---- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-top: 4px;
}

/* ---- CTA Section ---- */
.cta-section {
    padding: 80px 24px;
    text-align: center;
    background: linear-gradient(180deg, var(--color-bg) 0%, #2D1060 50%, var(--color-bg) 100%);
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(21, 101, 192, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.cta-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
}

.cta-text {
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

/* ---- Footer ---- */
.footer {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    padding: 48px 24px 24px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-brand {
    text-align: left;
}

.footer-brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient-logo);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-soft);
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--color-secondary);
}

.footer-bottom {
    max-width: 1100px;
    margin: 32px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
}

/* ---- Page Content (Privacy, Terms, Contact) ---- */
.page-hero {
    padding: 120px 24px 48px;
    background: var(--gradient-hero);
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.page-hero p {
    color: var(--color-text-secondary);
    font-size: 1rem;
}

.content-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.content-wrap h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 14px;
    color: var(--color-text-primary);
}

.content-wrap h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 10px;
    color: var(--color-text-soft);
}

.content-wrap p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 14px;
    text-align: left;
}

.content-wrap ul, .content-wrap ol {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 14px;
    padding-left: 24px;
    text-align: left;
}

.content-wrap li {
    margin-bottom: 8px;
}

.content-wrap a {
    color: var(--color-secondary);
    text-decoration: underline;
    text-decoration-color: rgba(255, 214, 0, 0.6);
    text-underline-offset: 3px;
}

.content-wrap a:hover {
    text-decoration-color: var(--color-secondary);
}

/* ---- Contact Form ---- */
.contact-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-soft);
    margin-bottom: 8px;
    text-align: left;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(26, 10, 46, 0.6);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.2);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

.form-file {
    width: 100%;
    padding: 10px 16px;
    background: rgba(26, 10, 46, 0.6);
    border: 1px dashed var(--color-border);
    border-radius: 10px;
    color: var(--color-text-secondary);
    font-family: var(--font-family);
    font-size: 0.85rem;
    cursor: pointer;
}

.form-file:hover {
    border-color: var(--color-primary);
}

.form-success {
    display: none;
    text-align: center;
    padding: 32px;
}

.form-success .check-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.form-success h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--color-text-primary);
}

.form-success p {
    color: var(--color-text-secondary);
}

/* ---- Privacy Acceptance Button ---- */
.privacy-accept-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 16px 24px 24px;
    background: linear-gradient(to top, var(--color-bg) 60%, transparent);
    display: flex;
    justify-content: center;
}

.privacy-accept-btn.hidden {
    display: none;
}

.accept-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    padding: 16px 32px;
    background: var(--gradient-btn);
    color: #fff;
    border: none;
    border-radius: var(--radius-btn);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(21, 101, 192, 0.4);
    transition: all 0.3s ease;
    text-align: center;
}

.accept-btn:hover {
    box-shadow: 0 6px 32px rgba(21, 101, 192, 0.6);
    transform: translateY(-2px);
}

/* ---- Lightbox ---- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 0 60px rgba(21, 101, 192, 0.3);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font-family);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-device {
        max-width: 240px;
    }

    .feature-row,
    .feature-row.reverse {
        flex-direction: column;
        text-align: center;
    }

    .feature-text {
        text-align: center;
    }

    .feature-text p {
        margin: 0 auto;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        text-align: center;
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .hero {
        padding: 90px 16px 40px;
        min-height: auto;
    }

    .hero-device {
        max-width: 200px;
    }

    .section {
        padding: 56px 16px;
    }

    .screenshot-section {
        padding: 56px 16px;
    }

    .carousel-track {
        height: 320px;
    }

    .carousel-slide .device-frame {
        max-width: 180px;
    }

    .contact-card {
        padding: 24px 16px;
    }

    .stats-row {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}

@media (max-width: 380px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .carousel-track {
        height: 280px;
    }

    .carousel-slide .device-frame {
        max-width: 160px;
    }
}

/* ---- Animations (AOS-like with CSS) ---- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
}

/* ---- Utilities ---- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
