/* ===================================
   StarTap Rewards — Website Styles
   Colors matched from GameTheme.swift
   =================================== */

:root {
    /* Background (Stars theme) */
    --bg-dark: #000000;
    --bg-end: #141a33;

    /* Accent palette */
    --accent-red: #E60D0D;
    --accent-blue: #0066D9;
    --accent-yellow: #FFCC00;
    --accent-green: #00A64D;
    --accent-orange: #FF7300;
    --accent-purple: #8026BF;
    --accent-pink: #F21A8C;
    --accent-cyan: #00BFD9;

    /* Text */
    --text-primary: rgba(255,255,255,0.95);
    --text-secondary: rgba(255,255,255,0.80);
    --text-tertiary: rgba(255,255,255,0.65);

    /* Glass */
    --glass-bg: rgba(255,255,255,0.07);
    --glass-border: rgba(255,255,255,0.14);
    --glass-shine-start: rgba(255,255,255,0.22);
    --glass-shine-end: rgba(255,255,255,0.0);

    /* Layout */
    --max-width: 1120px;
    --radius: 20px;
    --radius-sm: 14px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    font-family: -apple-system, 'SF Pro Rounded', 'SF Pro Display', system-ui, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-end) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ===== Stars Background ===== */
.stars-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--dur, 3s) ease-in-out infinite var(--delay, 0s);
    opacity: 0;
}

.star-1  { top: 8%;  left: 15%; --dur: 2.8s; --delay: 0s; }
.star-2  { top: 15%; left: 72%; --dur: 3.5s; --delay: 0.5s; width: 2px; height: 2px; }
.star-3  { top: 25%; left: 42%; --dur: 4s;   --delay: 1.2s; }
.star-4  { top: 35%; left: 88%; --dur: 2.5s; --delay: 0.3s; width: 2px; height: 2px; }
.star-5  { top: 45%; left: 5%;  --dur: 3.2s; --delay: 0.8s; }
.star-6  { top: 55%; left: 65%; --dur: 3.8s; --delay: 1.5s; width: 2px; height: 2px; }
.star-7  { top: 65%; left: 30%; --dur: 2.6s; --delay: 0.2s; }
.star-8  { top: 75%; left: 82%; --dur: 4.2s; --delay: 1s; }
.star-9  { top: 82%; left: 50%; --dur: 3s;   --delay: 0.7s; width: 2px; height: 2px; }
.star-10 { top: 12%; left: 55%; --dur: 3.4s; --delay: 1.8s; width: 2px; height: 2px; }
.star-11 { top: 48%; left: 25%; --dur: 2.9s; --delay: 0.4s; }
.star-12 { top: 70%; left: 12%; --dur: 3.6s; --delay: 1.3s; width: 2px; height: 2px; }

@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.8; }
}

/* ===== Glass Card ===== */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, var(--glass-shine-start), var(--glass-shine-end));
    pointer-events: none;
    border-radius: var(--radius) var(--radius) 0 0;
}

/* ===== Nav ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-icon {
    border-radius: 10px;
}

.nav-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 100px;
    background: white;
    color: #000;
    transition: transform 0.2s, opacity 0.2s;
}

.nav-cta:hover {
    transform: scale(1.03);
    opacity: 0.92;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    z-index: 1;
    padding: 140px 0 80px;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
}

.highlight {
    background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 17px;
    color: var(--text-tertiary);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.phone-frame {
    position: relative;
    width: 280px;
    border-radius: 36px;
    overflow: hidden;
    box-shadow:
        0 0 0 3px rgba(255,255,255,0.12),
        0 24px 80px rgba(0,0,0,0.5),
        0 0 60px rgba(255,204,0,0.08);
}

.hero-screenshot {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
    color: #000;
    box-shadow: 0 4px 24px rgba(255,204,0,0.25);
}

.btn-primary:hover {
    box-shadow: 0 8px 32px rgba(255,204,0,0.35);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    padding: 14px 20px;
    font-size: 14px;
}

.btn-ghost:hover {
    background: var(--glass-bg);
}

/* ===== Section Titles ===== */
.section-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-tertiary);
    margin-bottom: 48px;
}

section {
    position: relative;
    z-index: 1;
    padding: 80px 0;
}

/* ===== Features ===== */
.features {
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.feature-card {
    padding: 32px 24px;
    text-align: center;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 15px;
    color: var(--text-tertiary);
    line-height: 1.6;
}

/* ===== Packs ===== */
.packs {
    text-align: center;
}

.packs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.pack-card {
    border-radius: var(--radius);
    padding: 36px 20px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.10);
    transition: transform 0.3s;
}

.pack-card:hover {
    transform: translateY(-6px);
}

.pack-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.0));
    pointer-events: none;
    border-radius: var(--radius) var(--radius) 0 0;
}

/* Pack theme gradients */
.pack-stars {
    background: linear-gradient(180deg, #000000, #141a33);
}

.pack-farm {
    background: linear-gradient(180deg, #b3e6ff, #66bf73);
}

.pack-ocean {
    background: linear-gradient(180deg, #004d99, #0099cc);
}

.pack-space {
    background: linear-gradient(180deg, #0d0d26, #1a0040);
}

.pack-badge {
    margin: 0 auto 16px;
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.pack-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.pack-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.pack-tag {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    background: var(--accent-yellow);
    color: #000;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Farm pack needs dark text */
.pack-farm h3,
.pack-farm p {
    color: rgba(0,0,0,0.85);
}

/* ===== Privacy ===== */
.privacy {
    text-align: center;
}

.privacy-card {
    max-width: 640px;
    margin: 0 auto;
    padding: 48px 40px;
}

.privacy-lead {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.privacy-lead strong {
    color: var(--accent-green);
}

.privacy-list {
    text-align: left;
    max-width: 360px;
    margin: 0 auto;
}

.privacy-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: var(--text-secondary);
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.privacy-list li:last-child {
    border-bottom: none;
}

/* ===== Support ===== */
.support {
    text-align: center;
}

.support-card {
    max-width: 540px;
    margin: 0 auto;
    padding: 48px 40px;
}

.support-card > p {
    color: var(--text-secondary);
    font-size: 17px;
    margin-bottom: 28px;
}

.email-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.support-note {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ===== Footer ===== */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 32px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-inner p {
    font-size: 14px;
    color: var(--text-tertiary);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-tertiary);
    transition: color 0.2s;
}

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

/* ===== Fade-In Animation ===== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 44px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .packs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .nav-inner {
        height: 56px;
    }

    .nav-cta {
        font-size: 0;
        padding: 6px 12px;
        white-space: nowrap;
    }

    .nav-cta::after {
        content: 'App Store';
        font-size: 13px;
    }

    .nav-cta svg {
        width: 16px;
        height: 16px;
    }

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

    .nav-brand {
        gap: 8px;
    }

    .nav-title {
        font-size: 15px;
    }

    .hero {
        padding: 80px 0 48px;
        min-height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .hero-title {
        font-size: 28px;
        letter-spacing: -0.8px;
    }

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

    .hero-desc {
        font-size: 15px;
        max-width: 100%;
    }

    .phone-frame {
        width: 200px;
    }

    .section-title {
        font-size: 26px;
    }

    .section-subtitle {
        font-size: 15px;
        margin-bottom: 32px;
    }

    section {
        padding: 56px 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .feature-card {
        padding: 24px 20px;
    }

    .packs-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .pack-badge {
        width: 80px;
        height: 80px;
    }

    .pack-card {
        padding: 24px 14px 20px;
    }

    .pack-card h3 {
        font-size: 18px;
    }

    .pack-card p {
        font-size: 13px;
    }

    .privacy-card,
    .support-card {
        padding: 32px 20px;
    }

    .email-row {
        flex-direction: column;
    }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

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