/* ROOT VARIABLES */
:root {
    --bg-color: #050505;
    --text-primary: #f0f0f0;
    --text-muted: #888888;
    /* UPDATED: Changed Polygon purple to official Base Blue */
    --accent-base: #0052FF; 
    --accent-neon: #39ff14;
    --border-color: #333333;
    
    --font-heading: 'Syne', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }

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

/* TYPOGRAPHY */
h1, h2, h3 { font-family: var(--font-heading); text-transform: uppercase; }
/* UPDATED: Swapped text accent color variable */
.accent-text { color: var(--accent-base); font-size: 0.9rem; letter-spacing: 2px; }

/* NAVIGATION */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
}
.logo { font-weight: bold; font-size: 1.2rem; letter-spacing: 2px; }
.links a { color: var(--text-primary); text-decoration: none; margin: 0 1.5rem; font-size: 0.9rem; text-transform: uppercase; transition: color 0.3s;}
/* UPDATED: Adjusted link hover state to Base Blue */
.links a:hover { color: var(--accent-base); }
.wallet-btn { background: transparent; border: 1px solid var(--text-primary); color: var(--text-primary); padding: 0.5rem 1.5rem; font-family: var(--font-mono); cursor: pointer; transition: all 0.3s; }
.wallet-btn:hover { background: var(--text-primary); color: var(--bg-color); }
.nav-actions { 
    display: flex; 
    gap: 1rem; 
    align-items: center; 
}

.nav-btn { 
    padding: 0.5rem 1.5rem; 
    font-size: 0.9rem; 
    margin: 0;
}

/* HERO SECTION */
#hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem; 
    padding: 6rem 3rem;
    min-height: 80vh;
}
.hero-content { 
    flex: 1; 
    max-width: 55%; 
}
.hero-content h1 { 
    font-size: clamp(2.5rem, 5vw, 4rem); 
    line-height: 1.1; 
    margin: 1rem 0; 
}
.subtitle { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2rem; }
.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}
.hero-image img { 
    width: 100%; 
    max-width: 400px; 
    border: 1px solid var(--border-color); 
}

/* BUTTONS */
.btn { display: inline-block; padding: 1rem 2rem; text-decoration: none; text-transform: uppercase; font-weight: bold; border: 1px solid transparent; transition: 0.3s; margin-right: 1rem;}
/* UPDATED: Configured primary mint and action buttons for Base Blue ecosystem */
.btn.primary { background: var(--accent-base); color: white; }
.btn.primary:hover { background: transparent; border-color: var(--accent-base); color: var(--accent-base); }
.btn.secondary { border-color: var(--text-muted); color: var(--text-muted); }
.btn.secondary:hover { border-color: var(--text-primary); color: var(--text-primary); }

/* LAYOUT HELPERS */
.container { padding: 5rem 3rem; }
.border-top { border-top: 1px solid var(--border-color); }
.section-title { font-size: 2rem; margin-bottom: 3rem; color: var(--text-primary); }

/* LORE GRID */
.lore-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.lore-card { border: 1px solid var(--border-color); padding: 2rem; background: #0a0a0a; transition: border-color 0.3s;}
/* UPDATED: Hover states updated to Base Blue */
.lore-card:hover { border-color: var(--accent-base); }
.lore-card h3 { margin-bottom: 1rem; color: var(--text-primary); }
.lore-card p { color: var(--text-muted); font-size: 0.9rem; }

/* THE GRID */
.grid-wrapper img { width: 100%; border: 1px solid var(--border-color); opacity: 0.8; transition: 0.5s; }
.grid-wrapper img:hover { opacity: 1; }

/* TIMELINE (ROADMAP) */
.timeline { display: flex; flex-direction: column; gap: 2rem; border-left: 2px solid var(--border-color); padding-left: 2rem; margin-left: 1rem;}
/* UPDATED: Fixed Epoch titles from image snapshot to display crisp Base Blue */
.epoch h3 { color: var(--accent-base); margin-bottom: 0.5rem; }
.epoch p { color: var(--text-muted); max-width: 800px; }

/* TABLE (SPECS) */
.rarity-table { width: 100%; border-collapse: collapse; text-align: left; margin-top: 2rem;}
.rarity-table th, .rarity-table td { padding: 1.5rem; border-bottom: 1px solid var(--border-color); }
.rarity-table th { color: var(--text-muted); font-family: var(--font-heading); text-transform: uppercase;}
.mythic-row { color: gold; text-shadow: 0 0 10px rgba(255, 215, 0, 0.3); font-weight: bold;}

/* FOOTER ARCHITECTURE */
/* UPDATED: Overhauled layout for modern split alignment, custom icons, and logo injection */
footer { 
    padding: 3rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    color: var(--text-muted); 
}
.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}
.footer-left p {
    margin: 2px 0;
}
.footer-left .accent-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}
/* Geometric Base Logo Custom Span Styles */
.base-logo {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: transparent;
    border: 3px solid var(--accent-base);
    border-radius: 50%;
}
/* Structural social buttons container */
.footer-socials {
    display: flex;
    gap: 1rem;
}
/* Styled as interactive modular squares keeping your brutalist look intact */
.social-icon-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
.social-icon-btn:hover {
    background: var(--accent-base);
    border-color: var(--accent-base);
    color: #ffffff;
}

/* --- MINT TERMINAL --- */
.mint-interface {
    max-width: 600px;
    border: 1px solid var(--border-color);
    padding: 3rem;
    background: #0a0a0a;
    margin-bottom: 2rem;
}
.mint-status p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}
.mint-status span {
    color: var(--text-primary);
    font-weight: bold;
}
span.offline { color: red; }
span.online { color: var(--accent-neon); }

.mint-controls { margin-top: 2rem; transition: opacity 0.3s; }
.mint-controls.disabled { opacity: 0.3; pointer-events: none; }

.mint-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    padding: 0.5rem;
}
.mint-counter button {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    transition: 0.2s;
}
/* UPDATED: Counter adjustment control hover color path */
.mint-counter button:hover { color: var(--accent-base); }
.mint-counter span { font-size: 1.5rem; font-weight: bold; }

.full-width { width: 100%; text-align: center; }
.terminal-msg { margin-top: 1rem; font-size: 0.85rem; color: var(--accent-neon); display: none;}


/* ========================================================= */
/* --- SURGICAL MOBILE REPAIR (Screens under 768px) --- */
/* ========================================================= */
@media (max-width: 768px) {
    
    html, body {
        overflow-x: hidden !important;
        width: 100vw !important;
    }

    h1, h2, h3, .section-title {
        word-break: keep-all !important; 
        overflow-wrap: break-word !important; 
        width: 100% !important;
    }

    h1 { 
        font-size: clamp(1.2rem, 8.5vw, 2.2rem) !important; 
        line-height: 1.1 !important;
        letter-spacing: -1px !important; 
    }
    
    h2, .section-title { font-size: 1.6rem !important; }
    h3 { font-size: 1.3rem !important; }

    nav {
        flex-direction: column !important;
        padding: 1.5rem 1rem !important;
        gap: 1.5rem !important;
    }
    .nav-actions {
        width: 100%;
        justify-content: center;
    }

    #hero {
        flex-direction: column !important;
        padding: 3rem 1.5rem !important;
        text-align: left !important;
        gap: 3rem !important;
    }
    .hero-content {
        max-width: 100% !important;
        width: 100% !important;
    }
    .hero-image {
        width: 100% !important;
        display: flex;
        justify-content: center;
    }

    .container {
        padding: 3rem 1.5rem !important;
    }
    .lore-grid {
        grid-template-columns: 1fr !important; 
        gap: 2rem !important;
    }

    .timeline {
        margin-left: 0 !important;
        padding-left: 1.5rem !important;
    }

    .btn {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        margin-right: 0 !important;
        margin-bottom: 1rem !important;
        box-sizing: border-box !important;
    }

    .mint-interface {
        padding: 1.5rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* UPDATED: Mobile restructuring for social block footer stacks */
    footer {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1.5rem !important;
        text-align: center !important;
    }
    .footer-left {
        align-items: center !important;
    }

    .lore-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1.5rem !important; 
        box-sizing: border-box !important;
        overflow: hidden !important; 
    }

    p, .lore-card p, .timeline p {
        width: 100% !important;
        max-width: 100% !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
        padding-right: 5px !important; 
    }
}