:root {
    --primary-gold: #FFD700;
    --gold-glow: rgba(255, 215, 0, 0.4);
    --secondary-blue: #2196F3;
    --bg-dark: #0f0f0f;
    --surface-dark: #1a1a1a;
    --surface-lighter: #252525;
    --text-main: #FFFFFF;
    --text-muted: #A0A0A0;
    --container-width: 1200px;
    --border-radius: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Montserrat', sans-serif; background-color: var(--bg-dark); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; width: 100%; }

/* Navbar */
.navbar {
    height: 80px; display: flex; align-items: center; position: fixed;
    top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(15, 15, 15, 0.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 28px; font-weight: 900; letter-spacing: 2px; }
.logo span { color: var(--primary-gold); text-shadow: 0 0 15px var(--gold-glow); }
.nav-links { display: flex; gap: 30px; }
.nav-links a:hover, .nav-links a.active { color: var(--primary-gold); }

/* Buttons */
.btn {
    padding: 12px 28px; border-radius: 10px; font-weight: 700; cursor: pointer;
    transition: var(--transition); display: inline-flex; align-items: center; gap: 10px; border: none;
    font-size: 1rem;
}
.btn-primary { background: var(--secondary-blue); color: white; }
.btn-gold { background: var(--primary-gold); color: black; box-shadow: 0 4px 15px var(--gold-glow); }
.btn-outline { border: 2px solid var(--primary-gold); color: var(--primary-gold); background: transparent; }
.btn:hover { transform: translateY(-3px); filter: brightness(1.1); box-shadow: 0 8px 25px var(--gold-glow); }
.btn.small { padding: 8px 16px; font-size: 0.8rem; }
.btn-large { padding: 18px 40px; font-size: 1.1rem; }
.full-width { width: 100%; justify-content: center; }

/* --- GLOBAL SCROLL REVEAL (Acrypcom Style) --- */
.reveal {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(50px) scale(0.9);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
}

/* Badge */
.badge-new {
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary-gold);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 800;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero (Home Page) */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.85)), url('https://images.unsplash.com/photo-1511512578047-dfb367046420?auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    text-align: center;
    padding-top: 80px;
}
.hero-content { max-width: 900px; margin: 0 auto; }
.hero h1 { font-size: 4.5rem; font-weight: 900; margin-bottom: 25px; line-height: 1.1; letter-spacing: -2px; }
.hero h1 span { color: var(--primary-gold); text-shadow: 0 0 30px var(--gold-glow); }
.hero p { font-size: 1.4rem; color: var(--text-muted); margin-bottom: 45px; max-width: 700px; margin-left: auto; margin-right: auto; }
.hero-btns { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.hero-trust { margin-top: 50px; display: flex; justify-content: center; gap: 40px; color: var(--text-muted); font-size: 0.9rem; }
.hero-trust span { display: flex; align-items: center; gap: 10px; }
.hero-trust i { color: var(--primary-gold); width: 18px; }

/* How it Works */
.how-it-works { background: #0a0a0a; border-top: 1px solid rgba(255,255,255,0.05); }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-top: 60px; }
.step-card { text-align: center; position: relative; padding: 40px 20px; }
.step-number {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    font-size: 8rem; font-weight: 900; color: rgba(255,255,255,0.03); z-index: 1;
}
.step-card i { color: var(--primary-gold); width: 60px; height: 60px; margin-bottom: 25px; position: relative; z-index: 2; }
.step-card h3 { font-size: 1.5rem; margin-bottom: 15px; position: relative; z-index: 2; }
.step-card p { color: var(--text-muted); position: relative; z-index: 2; }

/* Features Highlight */
.feature-highlight { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.feature-list { margin-top: 40px; }
.feature-list li { display: flex; gap: 20px; margin-bottom: 30px; align-items: flex-start; }
.feature-list i { color: var(--primary-gold); flex-shrink: 0; margin-top: 5px; }
.feature-list strong { display: block; margin-bottom: 5px; font-size: 1.1rem; }
.feature-list div { color: var(--text-muted); }

/* Mockup */
.feature-mockup { perspective: 1000px; }
.phone-frame {
    width: 280px; height: 560px; background: #222; border-radius: 40px;
    padding: 12px; margin: 0 auto; border: 8px solid #333;
    box-shadow: 0 50px 100px rgba(0,0,0,0.8);
    transition: var(--transition);
}
.phone-frame:hover { transform: scale(1.05); }
.phone-screen {
    background: #0f0f0f; width: 100%; height: 100%; border-radius: 30px;
    overflow: hidden; padding: 25px; display: flex; flex-direction: column; gap: 20px;
}
.mock-header { font-size: 0.7rem; font-weight: 900; color: var(--primary-gold); text-align: center; letter-spacing: 2px; }
.mock-avatar { width: 60px; height: 60px; background: #252525; border-radius: 50%; margin: 0 auto; display: flex; align-items: center; justify-content: center; color: var(--primary-gold); }
.mock-bar-container { width: 100%; height: 8px; background: #252525; border-radius: 10px; overflow: hidden; }
.mock-bar { height: 100%; background: var(--primary-gold); }
.mock-quests { margin-top: 20px; }
.mock-quest-item { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; margin-bottom: 12px; padding: 10px; background: #1a1a1a; border-radius: 8px; }
.mock-quest-item span { width: 12px; height: 12px; border: 2px solid var(--primary-gold); border-radius: 3px; }

/* Sync Split */
.sync-split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center; }
.sync-btns { display: flex; gap: 15px; margin-top: 30px; }
.leaderboard-preview { background: var(--surface-dark); padding: 30px; border-radius: var(--border-radius); border: 1px solid rgba(255,255,255,0.05); }
.mini-leaderboard { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.mini-row { padding: 12px; background: rgba(255,255,255,0.03); border-radius: 8px; font-size: 0.9rem; font-weight: 700; }
.mini-row span { color: var(--text-muted); width: 25px; display: inline-block; }
.view-all { color: var(--primary-gold); font-weight: 700; font-size: 0.9rem; }

/* Download CTA */
.cta-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    padding: 80px 40px; border-radius: 30px; text-align: center;
    border: 1px solid rgba(255,215,0,0.1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.cta-card .section-title { margin-bottom: 20px; }
.cta-card p { font-size: 1.2rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 50px; }
.download-btns { display: flex; justify-content: center; align-items: center; gap: 40px; flex-wrap: wrap; }
.apk-badge {
    background: var(--primary-gold); color: black; padding: 15px 30px; border-radius: 15px;
    display: flex; align-items: center; gap: 20px; text-align: left; transition: var(--transition);
}
.apk-badge .small { font-size: 0.7rem; display: block; text-transform: uppercase; font-weight: 800; opacity: 0.7; }
.apk-badge .big { font-size: 1.3rem; font-weight: 900; }
.desktop-downloads { display: flex; gap: 20px; }
.badge-link {
    display: flex; align-items: center; gap: 10px; padding: 12px 20px;
    background: rgba(255,255,255,0.05); border-radius: 10px; font-weight: 700;
    transition: var(--transition); border: 1px solid rgba(255,255,255,0.1);
}
.badge-link:hover { background: rgba(255,255,255,0.1); border-color: var(--primary-gold); }
.no-account-needed { margin-top: 30px !important; font-size: 0.9rem !important; opacity: 0.5; }

/* Sections */
section { padding: 120px 0; }

.section-title { font-size: 3rem; font-weight: 900; text-align: center; margin-bottom: 50px; }
.section-title span { color: var(--primary-gold); }

/* Features Grid */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.feature-card {
    background: var(--surface-dark); padding: 40px; border-radius: var(--border-radius);
    text-align: center; border: 1px solid rgba(255, 255, 255, 0.05); transition: var(--transition);
}
.feature-card:hover { border-color: var(--primary-gold); transform: translateY(-10px); }
.feature-card i { color: var(--primary-gold); width: 48px; height: 48px; margin-bottom: 20px; }
.feature-card h3 { margin-bottom: 15px; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; }

/* Leaderboard Rows */
.leaderboard-container { background: var(--surface-dark); border-radius: var(--border-radius); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.05); }
.leaderboard-header {
    display: grid; grid-template-columns: 80px 1fr 120px 150px; padding: 25px;
    background: rgba(255,255,255,0.03); color: var(--text-muted); font-weight: 800; font-size: 0.75rem; text-transform: uppercase;
}
.leaderboard-row {
    display: grid; grid-template-columns: 80px 1fr 120px 150px; padding: 20px 25px;
    align-items: center; border-bottom: 1px solid rgba(255,255,255,0.03); transition: var(--transition);
}

/* Quest Library */
.quest-filters { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; }
.filter-btn {
    background: transparent; border: 1px solid var(--text-muted); color: var(--text-muted);
    padding: 10px 25px; border-radius: 30px; cursor: pointer; font-weight: 700; transition: var(--transition);
}
.filter-btn.active, .filter-btn:hover { background: var(--primary-gold); border-color: var(--primary-gold); color: black; }
.quests-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.quest-item { background: var(--surface-dark); padding: 30px; border-radius: var(--border-radius); border: 1px solid rgba(255, 255, 255, 0.05); display: flex; align-items: center; gap: 20px; }
.quest-icon { background: rgba(255, 215, 0, 0.1); color: var(--primary-gold); width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.xp-reward { color: var(--primary-gold); font-weight: 800; font-size: 0.8rem; display: block; margin-top: 5px; }

/* Community Layout */
.item-card {
    background: var(--surface-dark); padding: 25px; border-radius: var(--border-radius);
    display: flex; justify-content: space-between; align-items: center; border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 15px;
}

/* Footer */
.footer { padding: 60px 0; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.footer-content { display: flex; justify-content: space-between; align-items: center; }

/* --- RESTORED OLD STYLES FOR SUBPAGES --- */

/* Page Header */
.page-header {
    padding-top: 150px;
    padding-bottom: 50px;
    background: linear-gradient(to bottom, #1a1a1a, var(--bg-dark));
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-top: -30px;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

/* Auth Styles (Updated for Flip Animation) */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
}

.auth-flip-container {
    width: 100%;
    max-width: 450px;
    height: 550px; /* Increased height to accommodate registration form */
    perspective: 1000px;
    position: relative;
}

.auth-card {
    width: 100%;
    height: 100%;
    position: absolute;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
    background: var(--surface-dark);
    padding: 40px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.auth-card.front {
    transform: rotateY(0deg);
    z-index: 2;
}

.auth-card.back {
    transform: rotateY(180deg);
    z-index: 1;
}

.auth-flip-container.flipped .auth-card.front {
    transform: rotateY(-180deg);
}

.auth-flip-container.flipped .auth-card.back {
    transform: rotateY(0deg);
    z-index: 2;
}

.auth-card h2 {
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.auth-card h2 span {
    color: var(--primary-gold);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--primary-gold);
}

.switch-auth {
    margin-top: 25px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
}

.switch-auth span {
    color: var(--primary-gold);
    font-weight: 700;
}

/* Admin Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--surface-dark);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card .value {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-gold);
}

.stat-card .label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mgmt-card {
    background: var(--surface-dark);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mgmt-card h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
}

.mgmt-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mgmt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
}

/* Community Layout */
.community-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.item-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.item-info h4 { margin-bottom: 5px; }
.item-info p { color: var(--text-muted); font-size: 0.85rem; }
.item-info .meta { color: var(--secondary-blue); font-size: 0.75rem; font-weight: 700; }

/* Leaderboard Specifics */
.leaderboard-row .rank {
    font-weight: 900;
    font-size: 1.2rem;
}

.hero-name {
    font-weight: 700;
}

.hero-name .title {
    display: block;
    font-size: 0.7rem;
    color: var(--primary-gold);
    text-transform: uppercase;
}

.leaderboard-row.gold { border-left: 4px solid var(--primary-gold); }
.leaderboard-row.silver { border-left: 4px solid #C0C0C0; }
.leaderboard-row.bronze { border-left: 4px solid #CD7F32; }

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 400px;
    height: 500px;
    background: var(--surface-dark);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.chat-header {
    padding: 15px 20px;
    background: #2a2a2a;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.msg-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 12px;
    max-width: 85%;
}

.msg-item .sender {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-gold);
    margin-bottom: 3px;
}

.msg-item .time {
    float: right;
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.chat-input-area {
    padding: 15px;
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input-area input {
    flex: 1;
    background: #2a2a2a;
    border: none;
    padding: 10px;
    border-radius: 8px;
    color: white;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal {
    background: var(--surface-dark);
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
}

/* Sync Card (Old Style) */
.sync-card {
    background: var(--surface-dark);
    padding: 60px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 2px dashed rgba(255, 215, 0, 0.2);
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .container { padding: 0 30px; }
    .hero h1 { font-size: 3.5rem; }
    .feature-highlight { gap: 40px; }
}

@media (max-width: 768px) {
    :root {
        --container-width: 100%;
    }

    body { font-size: 14px; }

    section { padding: 60px 0; }

    .section-title { font-size: 2.2rem; margin-bottom: 30px; }

    /* Navbar Mobile Fix */
    .navbar .container { position: relative; display: flex; justify-content: space-between; align-items: center; }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        text-align: center;
        border-bottom: 2px solid var(--primary-gold);
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    #user-nav {
        margin-left: auto;
    }

    /* Hero Mobile */
    .hero { min-height: auto; padding: 140px 0 60px; }
    .hero h1 { font-size: 2.5rem; letter-spacing: -1px; }
    .hero p { font-size: 1.1rem; }
    .hero-btns { flex-direction: column; gap: 15px; align-items: center; }
    .hero-btns .btn { width: 100%; max-width: 300px; justify-content: center; }
    .hero-trust { flex-wrap: wrap; gap: 20px; font-size: 0.8rem; justify-content: center; }

    /* Grids */
    .steps-grid, .features-grid, .quests-grid, .community-layout, .admin-layout, .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Feature Highlight */
    .feature-highlight { grid-template-columns: 1fr; text-align: center; }
    .feature-list li { text-align: left; }
    .phone-frame { width: 240px; height: 480px; margin: 40px auto 0; }

    /* Leaderboard Mobile Table */
    .leaderboard-header, .leaderboard-row {
        grid-template-columns: 50px 1fr 80px !important;
        padding: 15px;
    }
    .leaderboard-header span:nth-child(4), .leaderboard-row .xp { display: none !important; }
    .leaderboard-row .rank { font-size: 1rem; }

    /* Auth Mobile */
    .auth-flip-container { height: 600px; padding: 0 10px; margin-top: 20px; }
    .auth-card { padding: 30px 20px; }

    /* Community */
    .community-column { margin-bottom: 40px; }
    .chat-window {
        width: 100%;
        right: 0;
        bottom: 0;
        height: 80vh;
        border-radius: 20px 20px 0 0;
    }

    /* Sync split */
    .sync-split { grid-template-columns: 1fr; text-align: center; }
    .sync-btns { flex-direction: column; gap: 10px; }
    .sync-btns .btn { width: 100%; }

    /* Footer */
    .footer-content { flex-direction: column; gap: 20px; text-align: center; }

    /* Download CTA */
    .apk-badge { width: 100%; justify-content: center; }
    .desktop-downloads { flex-direction: column; width: 100%; gap: 10px; }
    .badge-link { justify-content: center; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .section-title { font-size: 1.8rem; }
    .logo { font-size: 22px; }
}
