:root {
    --bg-dark: #0f0f13;
    --bg-card: #1a1a24;
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --accent-gold: #ffd700;
    --accent-purple: #9d4edd;
    --accent-blue: #00ffff;
    --accent-green: #00ff88;
    --gradient-hero: linear-gradient(135deg, #110520 0%, #000000 100%);
    --nav-height: 70px;

    /* Game Variables */
    --ui-bg: #1a1025;
    --ui-border: #4a3b5f;
    --game-accent: #a366ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- NAVIGATION --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(15, 15, 19, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 1000;
}

.nav-logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo span {
    color: var(--accent-purple);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-cta {
    background: #fff;
    color: #000;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
    transform: scale(1.05);
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gradient-hero);
    position: relative;
    padding: 120px 5% 60px;
    gap: 60px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    animation: fadeIn 1s ease-out;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(to right, #fff, var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 450px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.play-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    color: #000;
    padding: 14px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.play-store-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

.secondary-btn {
    padding: 14px 30px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: background 0.2s;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- FEATURES --- */
.section {
    padding: 100px 5%;
}

.center-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* --- REPLICA GAME UI (CSS SCREENSHOTS) --- */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.phone-mockup {
    width: 320px;
    height: 650px;
    background: #000;
    border-radius: 45px;
    border: 12px solid #2a2a2a;
    position: relative;
    overflow: hidden;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.6);
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s;
}

.phone-mockup:hover {
    transform: rotateY(0) rotateX(0);
}

/* Game Background (Exact Match) */
.game-screen {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #3d2e4f 0%, #1a1025 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* UI Top Bar (Exact Match) */
.ui-top {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    margin-top: 30px;
    /* Safe area */
}

.ui-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ui-row {
    display: flex;
    gap: 10px;
}

.ui-box {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--ui-border);
    border-radius: 12px;
    padding: 6px 12px;
    min-width: 80px;
    text-align: center;
    backdrop-filter: blur(4px);
}

.ui-label {
    font-size: 8px;
    color: #aaa;
    text-transform: uppercase;
}

.ui-val {
    font-size: 12px;
    font-weight: bold;
}

.val-gold {
    color: #ffd700;
}

.val-crys {
    color: #00ffff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.4);
}

.val-depth {
    color: #00ff88;
}

/* The Rock (Polygonal Match) */
.game-center {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ui-rock {
    width: 150px;
    height: 150px;
    background: #8a8a8a;
    position: relative;
    /* Polygonal shape from game code */
    clip-path: polygon(50% 8%, 86% 23%, 92% 62%, 55% 92%, 15% 78%, 8% 39%);
    box-shadow: inset -10px -10px 0 rgba(0, 0, 0, 0.3);
    z-index: 5;
    transition: transform 0.1s;
}

/* Simulated Cracks via Gradients */
.ui-rock::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(135deg, transparent 40%, #5e5e5e 40%, #5e5e5e 42%, transparent 42%),
        linear-gradient(45deg, transparent 60%, #5e5e5e 60%, #5e5e5e 62%, transparent 62%);
    border-radius: inherit;
}

.p-spark {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff;
    z-index: 10;
}

/* MINER CHARACTER (CSS Sprite) */
.miner-container {
    position: absolute;
    left: 20px;
    /* Positioned to left of rock */
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
    height: 100px;
    z-index: 6;
}

.m-body {
    position: absolute;
    left: 30px;
    top: 60px;
    width: 40px;
    height: 40px;
    background: #3498db;
    border-radius: 4px;
}

.m-head-group {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Face */
.m-face {
    position: absolute;
    left: 30px;
    top: 25px;
    width: 40px;
    height: 40px;
    background: #ffccaa;
    border-radius: 50%;
}

/* Beard */
.m-beard {
    position: absolute;
    left: 30px;
    top: 35px;
    width: 40px;
    height: 40px;
    background: #e67e22;
    border-radius: 0 0 20px 20px;
    clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
}

/* Helmet */
.m-helmet {
    position: absolute;
    left: 28px;
    top: 13px;
    width: 44px;
    height: 44px;
    background: #f1c40f;
    border-radius: 50% 50% 0 0;
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
}

.m-helmet-rim {
    position: absolute;
    left: 25px;
    top: 35px;
    width: 50px;
    height: 6px;
    background: #f1c40f;
    border-radius: 2px;
}

.m-light {
    position: absolute;
    left: 45px;
    top: 20px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff;
}

.m-eyes {
    position: absolute;
    left: 40px;
    top: 40px;
    width: 4px;
    height: 4px;
    background: #000;
    box-shadow: 16px 0 0 #000;
}

/* Arm & Pickaxe Animation */
.miner-arm-wrap {
    position: absolute;
    left: 70px;
    top: 65px;
    /* Pivot point for rotation */
    width: 0;
    height: 0;
    z-index: 7;
}

.miner-arm {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: 0 0;
    animation: mineSwing 1s infinite linear;
}

@keyframes mineSwing {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(-80deg);
    }

    /* Swing back */
    30% {
        transform: rotate(45deg);
    }

    /* Hit */
    40% {
        transform: rotate(0deg);
    }

    /* Return */
    100% {
        transform: rotate(0deg);
    }
}

.m-arm-shape {
    position: absolute;
    top: -8px;
    left: 0;
    width: 30px;
    height: 16px;
    background: #3498db;
}

.m-hand {
    position: absolute;
    top: -6px;
    left: 30px;
    width: 10px;
    height: 12px;
    background: #ffccaa;
}

/* Pickaxe Sprite constructed in CSS */
.m-pickaxe {
    position: absolute;
    top: -45px;
    left: 0px;
    /* Adjusted relative to hand */
    width: 60px;
    height: 60px;
    transform: rotate(45deg);
}

.m-pick-handle {
    position: absolute;
    left: 26px;
    top: 20px;
    width: 6px;
    height: 40px;
    background: #8d6e63;
}

.m-pick-head {
    position: absolute;
    left: 5px;
    top: 20px;
    width: 50px;
    height: 15px;
    border-radius: 50% 50% 0 0;
    /* Curved head approximation */
    border-top: 8px solid #95a5a6;
}

/* Bottom Menu (Exact Match) */
.ui-bottom-menu {
    height: 70px;
    background: var(--ui-bg);
    border-top: 4px solid var(--ui-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: 10px;
}

.ui-menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #888;
    font-size: 10px;
    gap: 4px;
}

.ui-menu-btn span {
    font-size: 20px;
}

.ui-menu-btn.active {
    color: var(--game-accent);
    font-weight: bold;
    transform: scale(1.1);
}

/* --- FOOTER --- */
footer {
    background: #000;
    padding: 60px 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-links a {
    color: var(--text-muted);
    margin-left: 30px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.policy-content {
    max-width: 800px;
    margin: 120px auto 60px;
    padding: 40px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.policy-content p,
.policy-content ul {
    color: #ccc;
    margin-bottom: 15px;
}

.policy-content a {
    color: var(--accent-gold);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .navbar {
        height: var(--nav-height);
        flex-direction: row;
        justify-content: space-between;
        padding: 0 20px;
        gap: 0;
    }

    .nav-links {
        display: none;
    }

    .nav-cta {
        width: auto;
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }

    .hero-content {
        margin-bottom: 40px;
    }

    .hero-btns {
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-links a {
        margin: 0 15px;
    }
}