/* FlapQuest - Play to Earn RPG Landing */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
    --green: #6366f1;
    --green-light: #818cf8;
    --green-dark: #4338ca;
    --sky: #7ec8e3;
    --sky-dark: #4a90a8;
    --stone: #5a5a6e;
    --stone-light: #8888a0;
    --brown: #8b6914;
    --brown-light: #c49a2a;
    --sand: #d4b96a;
    --dark: #0f0f1a;
    --dark-card: #1a1a2e;
    --dark-surface: #16162a;
    --text: #e8e4f0;
    --text-dim: #9994880;
    --gold: #a78bfa;
    --gold-dark: #7c3aed;
    --red-hp: #d44040;
    --blue-mp: #4070d4;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- NAV --- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(26, 26, 34, 0.95);
    border-bottom: 2px solid var(--green-dark);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-icon { font-size: 1.6rem; }
.logo-text { font-size: 1.25rem; font-weight: 800; color: var(--text); letter-spacing: 1px; }
.logo-text .accent { color: var(--green-light); }

.nav-links { display: flex; list-style: none; gap: 28px; }
.nav-links a {
    color: var(--stone-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--green-light); }

.nav-buttons { display: flex; gap: 10px; align-items: center; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--green);
    color: #fff;
}
.btn-primary:hover {
    background: var(--green-light);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--green-light);
    border: 1.5px solid var(--green);
}
.btn-outline:hover {
    background: var(--green);
    color: #fff;
}

.btn-gold {
    background: linear-gradient(135deg, var(--brown-light), var(--gold-dark));
    color: var(--dark);
}
.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold), var(--brown-light));
    transform: translateY(-1px);
}

.btn-large { padding: 14px 32px; font-size: 0.95rem; border-radius: 8px; }
.btn-small { padding: 6px 14px; font-size: 0.75rem; }

.hamburger { display: none; flex-direction: column; gap: 4px; cursor: pointer; }
.hamburger span { width: 22px; height: 2px; background: var(--text); }

/* --- HERO --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 40px;
    position: relative;
}

.hero-content { z-index: 2; max-width: 620px; text-align: center; }

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(74, 158, 63, 0.15);
    border: 1px solid var(--green-dark);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--green-light);
    margin-bottom: 24px;
    font-weight: 600;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.7);
}

.title-line { display: block; }
.gradient-text {
    background: linear-gradient(90deg, var(--green-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.05rem;
    color: #ddd;
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.7;
    text-shadow: 0 1px 10px rgba(0,0,0,0.6);
}

.hero-buttons { display: flex; gap: 14px; margin-bottom: 48px; flex-wrap: wrap; justify-content: center; }

.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; justify-content: center; }
.stat { text-align: center; }
.stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gold);
}
.stat-label {
    font-size: 0.75rem;
    color: var(--stone-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* (hero-visual moved to image elements section) */

/* --- SECTIONS --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

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

.section-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(74, 158, 63, 0.12);
    border: 1px solid var(--green-dark);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--green-light);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.section-title { font-size: 2.2rem; font-weight: 800; margin-bottom: 12px; }
.section-description { color: var(--stone-light); font-size: 1rem; max-width: 540px; margin: 0 auto; }

/* --- ABOUT --- */
.about { padding: 80px 0; }

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.about-card {
    background: var(--dark-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 32px 24px;
    transition: border-color 0.2s;
}
.about-card:hover { border-color: var(--green-dark); }
.card-icon { font-size: 2.2rem; margin-bottom: 14px; }
.about-card h3 { font-size: 1.05rem; margin-bottom: 10px; color: var(--green-light); font-weight: 700; }
.about-card p { color: var(--stone-light); font-size: 0.9rem; line-height: 1.7; }

/* --- TOKENOMICS --- */
.tokenomics {
    padding: 80px 0;
    background: var(--dark-surface);
}

.token-info {
    display: flex;
    gap: 32px;
    margin-bottom: 48px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}

.token-card {
    background: var(--dark-card);
    border: 1px solid var(--green-dark);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    min-width: 260px;
}
.token-logo { font-size: 3rem; margin-bottom: 10px; }
.token-card h3 { font-size: 1.3rem; margin-bottom: 10px; font-weight: 800; }
.token-address { color: var(--stone-light); font-size: 0.85rem; margin-bottom: 14px; word-break: break-all; }
.token-address span { color: var(--green-light); }

.token-details { display: flex; flex-direction: column; gap: 10px; }
.detail-item {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    padding: 12px 18px;
    background: var(--dark-card);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.04);
}
.detail-label { color: var(--stone-light); font-size: 0.9rem; }
.detail-value { color: var(--gold); font-weight: 700; font-size: 0.9rem; }

.distribution-grid { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.dist-item { text-align: center; width: 150px; }
.dist-bar {
    height: 100px; width: 48px;
    background: var(--dark-card);
    border-radius: 8px;
    margin: 0 auto 10px;
    position: relative;
    overflow: hidden;
}
.dist-bar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: var(--percentage);
    background: linear-gradient(to top, var(--green-dark), var(--green-light));
    border-radius: 8px;
    transition: height 0.8s ease;
}
.dist-percent { display: block; font-size: 1.3rem; font-weight: 800; color: var(--green-light); margin-bottom: 4px; }
.dist-label { color: var(--stone-light); font-size: 0.8rem; }

/* --- ROADMAP --- */
.roadmap { padding: 80px 0; }

.roadmap-timeline {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0;
}

.timeline-item { min-width: 240px; position: relative; }
.timeline-item::after {
    content: '';
    position: absolute;
    top: 24px; right: -20px;
    width: 20px; height: 2px;
    background: rgba(255,255,255,0.08);
}
.timeline-item:last-child::after { display: none; }

.timeline-marker {
    width: 48px; height: 48px;
    background: var(--dark-card);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85rem;
    margin-bottom: 14px;
}
.timeline-item.active .timeline-marker {
    background: var(--green);
    border-color: var(--green-light);
    color: #fff;
}

.timeline-content {
    background: var(--dark-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 24px;
}
.timeline-item.active .timeline-content { border-color: var(--green-dark); }
.timeline-content h3 { font-size: 1rem; margin-bottom: 14px; color: var(--green-light); font-weight: 700; }
.timeline-content ul { list-style: none; }
.timeline-content li {
    padding: 6px 0;
    color: var(--stone-light);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.88rem;
}
.timeline-content li:last-child { border-bottom: none; }

/* --- GAME SECTION --- */
.game-section {
    padding: 40px 0 80px;
    background: var(--dark-surface);
}

.game-container { max-width: 1200px; margin: 0 auto; }

.game-frame {
    width: 100%;
    aspect-ratio: 16/9;
    background: #222;
    border: 2px solid var(--green-dark);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.game-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 34, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.overlay-content { text-align: center; position: relative; z-index: 1; }
.game-logo { font-size: 4rem; margin-bottom: 14px; }
.overlay-content h3 { font-size: 1.6rem; margin-bottom: 8px; font-weight: 800; }
.overlay-content p { color: var(--stone-light); margin-bottom: 24px; }
.game-requirements { margin-top: 20px; }
.game-requirements p { font-size: 0.78rem; color: var(--stone-light); }

#gameFrame { width: 100%; height: 100%; }

.game-controls {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.control-item { display: flex; align-items: center; gap: 8px; }
.key {
    padding: 6px 12px;
    background: var(--dark-card);
    border: 1px solid var(--green-dark);
    border-radius: 5px;
    font-size: 0.75rem;
    color: var(--green-light);
    font-weight: 700;
}
.action { color: var(--stone-light); font-size: 0.85rem; }

/* --- COMMUNITY --- */
.community { padding: 80px 0; }

.social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.social-card {
    background: var(--dark-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 32px 20px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}
.social-card:hover { transform: translateY(-4px); }
.social-card.telegram:hover { border-color: #0088cc; }
.social-card.twitter:hover { border-color: #1da1f2; }
.social-card.docs:hover { border-color: var(--green); }

.social-icon { font-size: 2.2rem; margin-bottom: 10px; }
.social-card h3 { font-size: 1rem; margin-bottom: 6px; color: var(--text); font-weight: 700; }
.social-card p { color: var(--stone-light); font-size: 0.82rem; }

/* --- FOOTER --- */
.footer {
    background: var(--dark-surface);
    padding: 60px 0 24px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}
.footer-brand { max-width: 280px; }
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { color: var(--stone-light); font-size: 0.88rem; }

.footer-links { display: flex; gap: 60px; }
.link-group h4 { font-size: 0.85rem; margin-bottom: 14px; color: var(--green-light); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.link-group a { display: block; color: var(--stone-light); text-decoration: none; padding: 4px 0; font-size: 0.85rem; transition: color 0.2s; }
.link-group a:hover { color: var(--green-light); }

.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-bottom p { color: var(--stone-light); font-size: 0.8rem; }
.disclaimer { margin-top: 6px; font-size: 0.72rem !important; opacity: 0.5; }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .hero-visual { display: none !important; }
    .about-grid { grid-template-columns: repeat(2, 1fr); }
    .social-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links, .nav-buttons { display: none; }
    .hamburger { display: flex; }
    .hero-title { font-size: 2.2rem; }
    .hero-buttons { flex-direction: column; }
    .hero-stats { flex-direction: column; gap: 16px; }
    .section-title { font-size: 1.7rem; }
    .about-grid { grid-template-columns: 1fr; }
    .token-info { flex-direction: column; }
    .distribution-grid { flex-direction: column; align-items: center; }
    .roadmap-timeline { flex-direction: column; }
    .timeline-item::after { display: none; }
    .social-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; gap: 32px; }
    .footer-links { flex-direction: column; gap: 24px; }
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-content > * {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}
.hero-badge { animation-delay: 0.05s; }
.hero-title { animation-delay: 0.1s; }
.hero-description { animation-delay: 0.15s; }
.hero-buttons { animation-delay: 0.2s; }
.hero-stats { animation-delay: 0.25s; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--green-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--green); }

/* Grid background - strong */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.10) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 0% 100%, rgba(167, 139, 250, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* --- IMAGE ELEMENTS --- */
.logo-img { width: 28px; height: 28px; object-fit: contain; }
.card-img { width: 48px; height: 48px; object-fit: contain; margin-bottom: 14px; }
.token-logo-img { width: 64px; height: 64px; object-fit: contain; margin-bottom: 10px; }
.overlay-banner { max-width: 500px; width: 100%; border-radius: 8px; margin-bottom: 24px; }
.overlay-sub { color: var(--stone-light); font-size: 0.78rem; margin-top: 16px; }

/* Hero background image */
.hero-bg {
    position: absolute;
    inset: 0;
    background: url('content/hero-village.png') center/cover no-repeat;
    z-index: 0;
}
.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26,26,34,0.65);
    z-index: 1;
}
.hero { position: relative; overflow: hidden; }
.hero-content { position: relative; z-index: 2; }

/* Hero video section */
.hero-video-section {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}
.hero-video-full {
    width: 100%;
    border-radius: 12px;
    border: 2px solid var(--green-dark);
    display: block;
}

/* Language popup */
.lang-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lang-popup-box {
    background: var(--dark-card);
    border: 2px solid var(--green-dark);
    border-radius: 16px;
    padding: 48px 56px;
    text-align: center;
}
.lang-popup-box h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text);
}
.lang-popup-box p {
    font-size: 1.2rem;
    color: var(--stone-light);
    margin-bottom: 32px;
}
.lang-popup-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}
.lang-popup-buttons .btn {
    min-width: 140px;
}

/* Hero characters */
.hero-visual {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: auto;
    height: auto;
}
.hero-characters {
    display: flex;
    gap: 12px;
}
.char-portrait {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    border: 2px solid var(--green-dark);
    background: var(--dark-card);
    object-fit: cover;
    transition: transform 0.2s;
}
.char-portrait:hover {
    transform: scale(1.1);
    border-color: var(--green-light);
}

/* Hero single image */
.hero-img {
    width: 480px;
    height: auto;
    border-radius: 14px;
    border: 2px solid var(--green-dark);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

/* Large card images (about section) */
.card-img-large {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.08);
}

/* Game overlay image */
.overlay-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    border-radius: 0;
    border: none;
    z-index: 0;
}
.overlay-content h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 16px;
}

/* Video grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.showcase-video {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    aspect-ratio: 9/16;
    object-fit: cover;
    background: var(--dark-card);
}
@media (max-width: 768px) {
    .video-grid { grid-template-columns: 1fr; }
    .showcase-video { max-height: 400px; }
}

/* Wallet modal */
.wallet-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wallet-modal-box {
    background: var(--dark-card);
    border: 2px solid var(--green-dark);
    border-radius: 16px;
    padding: 40px 48px;
    text-align: center;
    max-width: 460px;
    width: 90%;
}
.wallet-modal-box h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
}
.wallet-modal-box > p {
    color: var(--stone-light);
    font-size: 0.9rem;
    margin-bottom: 24px;
}
.wallet-modal-box input {
    width: 100%;
    padding: 14px 16px;
    background: var(--dark);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: monospace;
    outline: none;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}
.wallet-modal-box input:focus {
    border-color: var(--green);
}
.wallet-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 14px;
}
.wallet-modal-note {
    font-size: 0.75rem;
    color: var(--stone-light);
    opacity: 0.6;
}

section, footer, nav { position: relative; z-index: 1; }
