/* global.css - RESTORED TO ORIGINAL VERSION */
:root {
    --bg-start: #000; 
    --bg-mid: #570a57; 
    --bg-end: #0a0510;
    --accent: #a91079; 
    --glass: rgba(255, 255, 255, 0.05); 
    --border: rgba(255, 255, 255, 0.1);
    --light-purple-grad: linear-gradient(135deg, #a224c7, #db46e6);
}

* { 
    box-sizing: border-box; 
}

html, body {
    /* Prevent horizontal scroll globally */
    max-width: 100%;
    overflow-x: hidden;
}

body { 
    margin: 0; 
    background: linear-gradient(135deg, var(--bg-start), var(--bg-mid), var(--bg-end)); 
    background-attachment: fixed;
    color: #ffffff; 
    font-family: 'Quicksand', sans-serif; 
    
    /* THE FIX: 
       1. Clear the 80px header height 
       2. Add the safe area for mobile notches 
    */
    padding-top: 70px; 
    padding-top: calc(env(safe-area-inset-top, 0px) + 70px);
    
    min-height: 100vh;
}
.wrapper { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 40px 20px; 
    position: relative;
}

/* SHARED COMPONENTS */
.glass-card { background: var(--glass); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: 20px; padding: 40px; margin-bottom: 30px; }

/* STICKY HEADER - RESTORED ORIGINAL COLOR */
.sticky-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(0,0,0, 0.45); 
    //background: rgba(46, 2, 73, 0.85); 
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}
.nav-container { max-width: 1200px; margin: 0 auto; width: 100%; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.nav-left { display: flex; align-items: center; gap: 30px; }
.logo-box { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.5rem; letter-spacing: -1px; color: #fff; text-decoration: none; }
.logo-box img { height: 27px; width: auto; }

.terminal-readout {
    font-family: monospace; font-size: 0.95rem; color: #db46e6; background: rgba(0,0,0,0.4);
    padding: 7px 18px; border-radius: 8px; border: 1px solid rgba(219, 70, 230, 0.2);
    letter-spacing: 0.8px; display: flex; align-items: center; gap: 10px; font-weight: 700;
}
.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav-right-group { display: flex; align-items: center; gap: 35px; }
.nav-links { display: flex; gap: 25px; font-weight: 500; font-size: 0.9rem; }
.nav-links a { color: #d1d1d1; text-decoration: none; transition: color 0.3s; }
.nav-links a:hover { color: #fff; }

/* BUTTONS */
.btn-primary { background: var(--light-purple-grad); border: none; padding: 10px 24px; border-radius: 30px; color: white; font-weight: 700; text-decoration: none; transition: 0.2s; display: inline-block; cursor: pointer; font-family: 'Quicksand'; }
.btn-primary:hover { opacity: 0.9; transform: scale(0.98); }

.btn-buy { background: var(--light-purple-grad); border: none; padding: 6px 24px; border-radius: 30px; color: white; font-weight: 700; text-decoration: none; transition: 0.2s; display: inline-block; cursor: pointer; font-family: 'Quicksand'; }
.btn-buy:hover { opacity: 0.9; transform: scale(0.98); }


.btn-secondary { background: rgba(255,255,255,0.05); border: 1px solid var(--border); padding: 8px 24px; border-radius: 30px; color: white; font-weight: 700; text-decoration: none; transition: 0.3s; display: inline-block; font-family: 'Quicksand'; }
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: #db46e6; }

/* ADDRESS & COPY */
.address-box { display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,0.3); padding: 15px; border-radius: 12px; font-family: monospace; font-size: 0.85rem; margin-top: 5px; border: 1px solid var(--border); overflow: hidden; }
.address-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 15px; }
.copy-btn { background: var(--light-purple-grad); border: none; padding: 8px 15px; border-radius: 8px; color: white; cursor: pointer; font-weight: 700; transition: 0.2s; min-width: 80px; font-family: 'Quicksand'; }
.copy-btn.success { background: #10b981 !important; }

/* GRID SYSTEMS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* SKELETON LOADERS */
.lazy-section { opacity: 1; transition: opacity 0.5s ease; }
.skeleton-mode h1, .skeleton-mode h2, .skeleton-mode h3, .skeleton-mode p, .skeleton-mode span, .skeleton-mode div:not(.glass-card):not(.wrapper) {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite; color: transparent !important; border-color: transparent !important; border-radius: 8px; pointer-events: none;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* COMPLIANCE BAR ALIGNMENT */
.compliance-container { display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 0.8rem; }
.compliance-item { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }

/* --- MEGA FOOTER SECTION --- */
.site-footer { border-top: 1px solid var(--border); background: rgba(0,0,0,0.3); padding: 80px 20px; margin-top: 40px;}
.footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; gap: 60px; }
.footer-logo { font-size: 1.8rem; font-weight: 700; color: #fff; margin-bottom: 25px; letter-spacing: -1px; display: block; }
.social-row { display: flex; gap: 15px; margin-bottom: 30px; }
.social-icon { color: #d1d1d1; transition: 0.3s; display: flex; align-items: center; }
.social-icon:hover { color: #db46e6; transform: translateY(-2px); }
.copyright { color: rgba(255,255,255,0.4); font-size: 0.85rem; margin-top: 30px; display: block; }

.footer-links-wrapper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.footer-col h4 { margin: 0 0 20px 0; font-size: 1rem; color: #fff; font-weight: 700; }
.footer-col a { display: block; color: #a1a1aa !important; text-decoration: none; margin-bottom: 15px; font-size: 0.9rem; transition: 0.3s; }
.footer-col a:hover { color: #db46e6 !important; }

/* --- HOMEPAGE SPECIFIC LAYOUTS --- */
.hero { text-align: center; padding: 40px 0 30px 0; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); letter-spacing: -1px; margin: 0 0 20px 0; line-height: 1.1; }
.hero p { font-size: 1.2rem; color: #e0e0e0; max-width: 700px; margin: 0 auto 30px auto; line-height: 1.6; }
.hero-btns { display: flex; justify-content: center; gap: 15px; }

.stats-bar { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: 20px; display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding: 30px; margin-bottom: 50px; }
.stat-item { border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-num { display: block; font-size: 2.5rem; font-weight: 700; color: #fff; margin-bottom: 5px; }
.stat-label { font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; color: #db46e6; font-weight: 700; }

.step-card { background: rgba(0,0,0,0.2); border: 1px solid var(--border); padding: 30px; border-radius: 15px; transition: 0.3s; display: flex; flex-direction: column; }
.step-card:hover { border-color: #db46e6; transform: translateY(-3px); }
.step-icon-wrap { background: rgba(219, 70, 230, 0.1); width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; border: 1px solid rgba(219, 70, 230, 0.3); color: #db46e6; }

.feature-card { background: rgba(0,0,0,0.2); border: 1px solid var(--border); padding: 30px; border-radius: 15px; transition: 0.3s; }
.feature-card:hover { border-color: #db46e6; transform: translateY(-3px); }
.feature-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }

.cta-banner { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border); border-radius: 30px; padding: 60px 50px; margin-bottom: 40px; display: flex; align-items: center; justify-content: space-between; position: relative; overflow: hidden; }
.cta-banner::after, .cta-banner::before { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.cta-banner::after { right: -80px; bottom: -80px; width: 300px; height: 300px; border: 3px solid rgba(219, 70, 230, 0.05); }
.cta-banner::before { right: 50px; bottom: -120px; width: 300px; height: 300px; border: 2px solid rgba(219, 70, 230, 0.1); }

/* Calculator Inputs */
.calc-input {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid var(--border) !important;
    padding: 15px; border-radius: 12px;
    color: white !important; flex: 1; min-width: 0; 
    max-width: 100%; text-align: center;
    font-size: 1.2rem; font-family: 'Quicksand', sans-serif;
}

/* RESPONSIVE SPLIT HERO */
/* --- RESPONSIVE SPLIT HERO --- */
.hero-split {
    display: flex;
    flex-direction: column; 
    gap: 30px;
    align-items: center;
    
    /* THE FIX: Reduced top padding from 60px to 20px */
    padding: 0px 0 60px 0; 
    
    width: 100%;
}

.hero-text { 
    text-align: center; 
    width: 100%;
}

.hero-text h1 { 
    font-size: clamp(2.2rem, 8vw, 3.8rem); 
    line-height: 1.1; 
    margin-bottom: 20px; 
}

.hero-text p { 
    font-size: 1.1rem; 
    color: #e0e0e0; 
    line-height: 1.6; 
    margin-bottom: 30px; 
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap; /* Prevents buttons from cutting off on tiny screens */
}

.hero-visual {
    width: 100%;
    max-width: 650px;
    display: flex;
    justify-content: center;
}

/* SURGICAL FIX: For Black Background AI Images */
.hero-city-img {
    width: 100%;
    height: auto;
    display: block;
    animation: cityFloat 3s ease-in-out infinite;
    
    -webkit-mask-image: radial-gradient(circle, black 45%, transparent 75%);
    mask-image: radial-gradient(circle, black 45%, transparent 75%);
	
	
    /* THE MAGIC LINE: Makes black background invisible, keeps whites/purples solid */
    mix-blend-mode: screen; 
    
    /* Optional: Sharpens the lines */
    filter: contrast(1.1) brightness(1.1); 
}

.city-image-wrapper {
    position: relative;
    width: 100%;
    /* Remove the radial mask entirely - not needed for this method */
    -webkit-mask-image: none;
    mask-image: none;
}

/* --- DESKTOP UPGRADE (992px and up) --- */
@media (min-width: 992px) {
    .hero-split {
        flex-direction: row-reverse;
        justify-content: space-between;
        
        /* THE FIX: Reduced top padding from 60px to 30px */
        padding: 20px 0 40px 0; 
        
        text-align: left;
    }

    .hero-text { 
        text-align: left; 
        flex: 1.2;
    }

    .hero-text p {
        margin-left: 0;
    }

    .hero-visual {
        flex: 1;
        max-width: none;
    }

    .hero-btns {
        justify-content: flex-start;
    }
}

@keyframes cityFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-25px); }
}

/* 1. HIDE hamburger by default on Desktop and remove background */
.mobile-menu-toggle {
    display: none !important; /* This stops it showing on Desktop */
    background: transparent !important;
    border: none !important;
    color: white !important;
    cursor: pointer;
    padding: 5px;
    outline: none;
}

/* MOBILE NAVIGATION */
@media (max-width: 900px) {
    .mobile-menu-toggle { 
        display: block !important; 
    }
    
    .desktop-only { 
        display: none !important; 
    }
    
    .nav-right-group .nav-links, 
    .terminal-readout { 
        display: none !important; 
    }
}

.mobile-menu-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background: #0a0510; 
    z-index: 9999; 
    display: none; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
}

.mobile-menu-overlay.active { 
    display: flex !important; 
}
.mobile-menu-content { display: flex; flex-direction: column; align-items: center; gap: 25px; width: 100%; }
.mobile-menu-content a { font-size: 1.8rem; font-weight: 700; color: white; text-decoration: none; }
.close-menu { position: absolute; top: 25px; right: 25px; background: none; border: none; color: white; cursor: pointer; }


/* ==========================================================================
   SURGICAL IDENTITY FIXES (APPENDED TO PRESERVE ALL ABOVE)
   ========================================================================== */

.user-avatar-trigger {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50%;
    border: 2px solid #db46e6;
    object-fit: cover;
    background: #2e0249; /* Dark purple background so it doesn't look empty */
    cursor: pointer;
}

/* Fix for the Desktop Dropdown Menu */
#user-drop {
    display: none; /* Controlled by active class */
    flex-direction: column;
    padding: 10px !important;
}

#user-drop.active {
    display: flex !important;
}

#user-drop a {
    display: flex !important;
    align-items: center !important; /* This centers text with icon */
    gap: 12px;
    padding: 12px 15px !important;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: 0.2s;
}

#user-drop a i, #user-drop a svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
}

/* Ensure the wrapper doesn't move when dropdown opens */
.desktop-user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

/* Final Mobile Overrides to prevent squishing */
@media (max-width: 600px) {
    .nav-right-group { gap: 10px !important; }
    .logo-box { font-size: 1.2rem !important; }
}


/* Loading Shimmer for Dynamic Data */
.loading-shimmer {
    color: transparent !important;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    display: inline-block;
    width: 100%;
}


/* --- MOBILE-FIRST PROFILE DOSSIER --- */
.profile-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-sidebar { width: 100%; }
.profile-main { width: 100%; }

/* STAT CARDS GRID */
.dossier-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.dossier-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dossier-card label {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--dora-purple);
    font-weight: 700;
    margin-bottom: 5px;
}

.dossier-card span {
    font-size: 1rem;
    font-weight: 700;
    font-family: monospace;
}

.btn-flex {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.btn-flex i, .btn-flex svg {
    flex-shrink: 0;
}


.tx-row {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid var(--dora-purple);
}

.tx-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.tx-sig {
    font-family: monospace;
    font-weight: 300;
    font-size: 0.95rem; /* Slightly larger on desktop */
    color: #fff;
    letter-spacing: 0.5px;
}

@media (max-width: 600px) {
    .tx-sig {
        font-size: 0.75rem;
    }
}


/* Expand signature for desktop readability */
@media (min-width: 1024px) {
    .tx-sig {
        font-size: 0.95rem !important;
        letter-spacing: 0.5px;
    }
}

.tx-type {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--dora-purple);
    font-weight: 700;
}


@media (min-width: 992px) {
    .profile-grid { flex-direction: row; align-items: flex-start; }
    .profile-sidebar { width: 320px; flex-shrink: 0; }
    .profile-main { flex-grow: 1; }
    .dossier-stats { grid-template-columns: repeat(4, 1fr); }
    .dossier-card span { font-size: 1.2rem; }
}



/* --- SURGICAL HEADER BUTTON SHRINK --- */
@media (max-width: 600px) {
    /* 1. Shrink the Sticky Header height for a tighter look */
    .sticky-header {
        height: 65px !important;
    }

    /* 2. Target the specific buttons in the header */
    .sticky-header .nav-btn-sm {
        padding: 8px 12px !important; /* Smaller vertical and horizontal padding */
        font-size: 0.7rem !important;   /* Smaller font for mobile buttons */
        border-radius: 20px !important; /* Keep them rounded but smaller */
        letter-spacing: 0.5px;
        min-width: 0 !important;       /* Allow them to shrink as needed */
    }

    /* 3. Reduce the gap between the buttons and the hamburger */
    .nav-right-group {
        gap: 8px !important;
    }

    .header-actions {
        gap: 6px !important;
    }

    /* 4. Slightly shrink the logo to match the new button scale */
    .logo-box {
        font-size: 1.1rem !important;
    }
    .logo-box img {
        height: 22px !important;
    }
}



/* --- RESPONSIVE FOOTER OVERHAUL --- */
@media (max-width: 768px) {
    .site-footer {
        padding: 60px 20px !important;
    }

    /* Stack the main footer grid (Brand on top, Links below) */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 50px !important;
    }

    /* Convert 3-column links to 2-columns for better readability */
    .footer-links-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px !important;
    }

    .footer-left {
        text-align: left; /* Keep branding consistent with your Tier-1 look */
    }

    .social-row {
        justify-content: flex-start;
        margin-top: 20px;
    }
}

/* For very small devices (like Phantom browser in narrow mode) */
@media (max-width: 480px) {
    .footer-links-wrapper {
        grid-template-columns: 1fr !important; /* Single column stack */
        gap: 40px !important;
    }

    .footer-col h4 {
        margin-bottom: 15px;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border);
        padding-bottom: 10px;
        display: inline-block;
        width: 100%;
    }
}


/* SURGICAL FIX: Allow the terminal to show ONLY inside the mobile menu on small screens */
@media (max-width: 900px) {
    #mobile-terminal-ticker {
        display: flex !important; /* Overrides the general .terminal-readout {display:none} */
        visibility: visible !important;
        opacity: 1 !important;
        margin-bottom: 20px;
    }
}


/* =============================================================
   SURGICAL RESPONSIVE OVERRIDES (APPEND TO BOTTOM)
   ============================================================= */

/* 1. Force Grids to Stack on Mobile */
@media (max-width: 900px) {
    .grid-3, .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* 2. Fix Stats Bar Squashing */
    .stats-bar {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        padding: 20px !important;
        height: auto !important;
    }
    
    .stat-item {
        border-right: none !important;
        padding: 10px 0 !important;
    }

    /* 3. Fix CTA Banner */
    .cta-banner {
        flex-direction: column !important;
        text-align: center !important;
        gap: 30px !important;
        padding: 40px 20px !important;
    }
}

/* 4. Fix Footer Squashing */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .footer-links-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px !important;
    }
}

@media (max-width: 480px) {
    .footer-links-wrapper {
        grid-template-columns: 1fr !important;
    }
}

/* 5. Fix Mobile Header Button Sizing */
@media (max-width: 600px) {
    .sticky-header {
        height: 65px !important;
    }

    .sticky-header .nav-btn-sm {
        padding: 8px 12px !important;
        font-size: 0.7rem !important;
        min-width: 0 !important;
    }

    .header-actions {
        gap: 8px !important;
    }

    .logo-box {
        font-size: 1.1rem !important;
    }
}

/* 6. Fix Identity/Avatar Display */
.user-avatar-trigger {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

#user-drop.active {
    display: flex !important;
    flex-direction: column;
}


/* Dashboard Wallet Header Fix */
h1 span {
    display: inline-block;
    max-width: 100%;
    word-break: break-all;
    line-height: 1.2;
}

/* Sidebar Sticky on Desktop */
@media (min-width: 992px) {
    .profile-sidebar {
        position: sticky;
        top: 100px;
    }
}



/* SURGICAL DASHBOARD ASIDE FIXES */

/* Fix textarea and input heights in sidebar */
.profile-sidebar .calc-input {
    width: 100% !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    color: white !important;
    margin-top: 5px;
    transition: 0.3s;
}

.profile-sidebar .calc-input:focus {
    border-color: #db46e6 !important;
    outline: none;
}

/* Ensure the Commit button is distinct and spaced well */
.btn-primary.btn-flex {
    box-shadow: 0 4px 15px rgba(219, 70, 230, 0.3);
}

/* Sidebar label spacing */
.profile-sidebar label {
    font-weight: 700;
}

/* Profile Image Glow */
.profile-sidebar img {
    box-shadow: 0 0 20px rgba(219, 70, 230, 0.2);
    border-radius: 20px !important; /* Matches your dossier cards */
}


/* SURGICAL FULL-WIDTH INPUT FIX */
.profile-sidebar input.calc-input, 
.profile-sidebar textarea.calc-input {
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important; /* Vital: Keeps padding inside the 100% width */
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Ensure the wrapper divs don't constrain them */
.profile-sidebar form > div {
    width: 100%;
}


/* --- LEADERBOARD PODIUM STYLES --- */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 60px;
    padding: 0 10px;
}

.podium-spot {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 20px 20px 10px 10px;
    padding: 25px 15px;
    text-align: center;
    position: relative;
    flex: 1;
    max-width: 180px;
    transition: 0.3s;
    text-decoration: none !important;
    color: white !important;
}




.podium-spot:hover { transform: translateY(-5px); border-color: #db46e6; }

.podium-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 3px solid transparent;
    object-fit: cover;
}

.spot-rank {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    border: 1px solid var(--border);
}

.gold { border-top: 4px solid #ffd700; height: 240px; z-index: 2; }
.gold .podium-img { border-color: #ffd700; width: 80px; height: 80px; }
.gold .spot-rank { border-color: #ffd700; color: #ffd700; }

.silver { border-top: 4px solid #c0c0c0; height: 200px; }
.silver .podium-img { border-color: #c0c0c0; }
.silver .spot-rank { border-color: #c0c0c0; color: #c0c0c0; }

.bronze { border-top: 4px solid #cd7f32; height: 180px; }
.bronze .podium-img { border-color: #cd7f32; }
.bronze .spot-rank { border-color: #cd7f32; color: #cd7f32; }

.podium-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 5px; }
.podium-xp { color: #db46e6; font-family: monospace; font-weight: 800; font-size: 0.8rem; }

.crown { color: #ffd700; margin-bottom: 5px; animation: float 3s ease-in-out infinite; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@media (max-width: 600px) {
    .podium-container { gap: 8px; }
    .podium-spot { padding: 15px 5px; }
    .gold { height: 200px; }
    .silver, .bronze { height: 160px; }
    .podium-img { width: 45px; height: 45px; }
    .gold .podium-img { width: 60px; height: 60px; }
}



/* --- LEADERBOARD TABLE SPACING FIX --- */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    padding: 20px 15px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #db46e6;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border);
}

.leaderboard-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

/* Define explicit column widths */
.leaderboard-table th:nth-child(1), 
.leaderboard-table td:nth-child(1) { width: 80px; text-align: center; } /* Rank Column */

.leaderboard-table th:nth-child(2), 
.leaderboard-table td:nth-child(2) { width: auto; } /* Citizen Name Column */

.leaderboard-table th:nth-child(3), 
.leaderboard-table td:nth-child(3) { width: 200px; } /* Status Column */

.leaderboard-table th:nth-child(4), 
.leaderboard-table td:nth-child(4) { width: 180px; text-align: right; } /* XP Column */

@media (max-width: 768px) {
    .leaderboard-table th:nth-child(3), 
    .leaderboard-table td:nth-child(3) { display: none; } /* Hide status on tablet/mobile */
    
    .leaderboard-table th:nth-child(4), 
    .leaderboard-table td:nth-child(4) { width: 100px; }
}



/* 1. Rank Column: Centered */
.col-rank { width: 80px; text-align: center; }

/* 2. Citizen Column: Left Aligned */
.col-citizen { text-align: left; }
.citizen-link { display: flex; align-items: center; gap: 15px; text-decoration: none; color: white; }
.table-avatar { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); flex-shrink: 0; }
.citizen-info { display: flex; flex-direction: column; overflow: hidden; }
.display-name { font-weight: 700; font-size: 1rem; }
.wallet-sub { font-size: 0.75rem; opacity: 0.5; font-family: monospace; }

/* 3. Status Column: Centered */
.col-status { width: 220px; text-align: center; }

/* 4. XP Column: Centered */
.col-xp { 
    width: 180px; 
    text-align: center; 
    font-weight: 700; 
    font-family: monospace; 
    color: #db46e6; 
    font-size: 1.1rem;
}

/* Row Highlighting */
.leaderboard-table tr.is-me {
    background: rgba(219, 70, 230, 0.1);
    box-shadow: inset 4px 0 0 #db46e6;
}



/* --- ADMIN TABLE GLOBAL FIX --- */
.admin-table {
    width: 100% !important;
    border-collapse: collapse;
    table-layout: fixed; /* Forces columns to respect width */
    margin-top: 0;
}

.admin-table th, 
.admin-table td {
    padding: 18px 15px !important;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Explicit Admin Ledger Column Widths */
.admin-table th:nth-child(1), .admin-table td:nth-child(1) { width: 35%; } /* Identity */
.admin-table th:nth-child(2), .admin-table td:nth-child(2) { width: 15%; text-align: center; } /* Rank */
.admin-table th:nth-child(3), .admin-table td:nth-child(3) { width: 20%; text-align: center; } /* XP */
.admin-table th:nth-child(4), .admin-table td:nth-child(4) { width: 15%; text-align: center; } /* Date */
.admin-table th:nth-child(5), .admin-table td:nth-child(5) { width: 15%; text-align: right; } /* Action */

/* SEARCH BAR STRETCH */
.search-container {
    display: flex;
    gap: 15px;
    width: 100%;
}

.search-input-wrapper {
    flex-grow: 1;
    position: relative;
}

.search-input-wrapper input {
    width: 100% !important;
    margin: 0 !important;
}

/* Status Pill Override for Admin */
.status-pill.active {
    background: rgba(219, 70, 230, 0.1) !important;
    color: #db46e6 !important;
    border: 1px solid rgba(219, 70, 230, 0.3) !important;
}



/* HYBRID STEP CARDS */
.step-card {
    position: relative; /* Essential for the background number */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px; /* Ensures all cards stay the same height */
    padding: 35px 25px 25px 25px !important;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    z-index: 2; /* Sits above the background number */
}

.step-icon {
    color: #db46e6;
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 8px rgba(219, 70, 230, 0.4));
}

.step-card h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.step-card p {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.8;
    margin-bottom: 25px;
    z-index: 2;
}

/* THE "GHOST" NUMBER ELEMENT */
.step-number {
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 6rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05); /* Extremely faint */
    font-family: sans-serif; /* Clean blocky font for the number */
    pointer-events: none;
    z-index: 1;
}

/* BUTTON ALIGNMENT */
.step-card .btn-primary, 
.step-card .btn-secondary {
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    margin-top: auto; /* Pushes button to the bottom */
}



/* --- CLEAN SECTION HEADERS --- */
.section-header-clean {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.protocol-h2 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.protocol-subtitle {
    margin: 5px 0 0 0;
    opacity: 0.5;
    font-size: 0.9rem;
}

.btn-secondary-sm {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    transition: 0.3s;
}

/* --- PREMIUM GOV CARDS --- */
.gov-card-premium {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    transition: 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.gov-card-premium:hover {
    border-color: rgba(219, 70, 230, 0.4);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.gov-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.gov-fip-id {
    font-family: monospace;
    color: #db46e6;
    font-weight: 700;
    font-size: 0.9rem;
}

.gov-status-tag {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.2); /* Slightly darker background */
    color: #22c55e; /* Brighter, more saturated green */
    border: 1px solid rgba(16, 185, 129, 0.4);
    letter-spacing: 0.5px;
}

.gov-card-title {
    font-size: 1.4rem;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.gov-card-excerpt {
    font-size: 0.95rem; /* Slightly larger */
    color: rgba(255, 255, 255, 0.85); /* Much brighter */
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Sentiment Bar */
.gov-sentiment-wrap {
    margin-bottom: 30px;
}

.gov-sentiment-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #ffffff; /* Forced white for readability */
    letter-spacing: 0.5px;
}

.gov-progress-track {
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
}

.gov-progress-fill {
    height: 100%;
    background: var(--light-purple-grad);
    box-shadow: 0 0 10px rgba(219, 70, 230, 0.4);
}

/* Footer & Meta */
.gov-footer {
    margin-top: auto;
}

.gov-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem; /* Bumping size from 0.75 */
    color: #e0e0e0; /* Brighter grey */
    font-weight: 500;
}

.meta-item svg {
    width: 16px;
    height: 16px;
    color: #db46e6; /* Keeping the magenta icon for branding */
    opacity: 1; /* Ensure icon is full brightness */
}

/* Pulse Animation for Active Tag */
.pulse-green {
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}


/* --- RESPONSIVE GOVERNANCE OVERRIDES --- */

@media (max-width: 768px) {
    /* 1. Force the grid to a single column */
    .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* 2. Reduce card padding so text isn't squeezed */
    .gov-card-premium {
        padding: 20px !important;
        border-radius: 20px;
    }

    /* 3. Adjust the header so the button doesn't float weirdly */
    .section-header-clean {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .btn-secondary-sm {
        width: 100%;
        text-align: center;
    }

    /* 4. Fix the Metadata (DORA Cast / Time Left) */
    .gov-meta {
        flex-direction: column; /* Stack them vertically */
        gap: 10px;
        margin-bottom: 25px;
    }

    .gov-card-title {
        font-size: 1.25rem; /* Slightly smaller for mobile headers */
    }

    /* 5. Ensure the Sentiment Bar labels don't overlap */
    .gov-sentiment-labels {
        font-size: 0.7rem;
    }
}

/* For ultra-small devices (iPhone SE, etc) */
@media (max-width: 400px) {
    .gov-card-premium {
        padding: 15px !important;
    }
    
    .gov-fip-id {
        font-size: 0.8rem;
    }
    
    .gov-status-tag {
        padding: 3px 8px;
        font-size: 0.6rem;
    }
}




/* --- PREMIUM JOURNAL CARDS --- */
.journal-card-premium {
    background: rgba(255, 255, 255, 0.03); /* Matching Gov cards */
    border: 1px solid var(--border);
    border-radius: 24px; /* Matching Gov cards */
    overflow: hidden;
    transition: 0.3s ease; /* Standard transition speed */
    display: flex;
    flex-direction: column;
}

.journal-card-premium:hover {
    transform: translateY(-3px); /* Same lift as Step/Gov cards */
    border-color: rgba(219, 70, 230, 0.4); /* Same glow as Gov cards */
    background: rgba(255, 255, 255, 0.05);
    /* Removed the heavy black shadow */
}

/* Thumbnail Styling */
.journal-thumb-wrap {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.journal-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    opacity: 0.7; /* Subtle dimming until hover */
    transition: 0.3s;
}

.journal-card-premium:hover .journal-img {
    transform: none; 
    opacity: 1;
}

.journal-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: #db46e6;
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
}

/* Content Styling */
.journal-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.journal-date {
    font-size: 0.7rem;
    font-family: monospace;
    color: #db46e6;
    margin-bottom: 10px;
    font-weight: 700;
}

.journal-title {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    line-height: 1.3;
}

.journal-title a {
    text-decoration: none;
    color: #ffffff;
    transition: 0.3s;
}

.journal-title a:hover {
    color: #db46e6;
}

.journal-excerpt {
    font-size: 0.85rem;
    color: #e0e0e0;
    line-height: 1.6;
    margin-bottom: 25px;
    opacity: 0.7;
}

/* The CTA Link - Brighter and bolder */
.journal-cta {
    margin-top: auto;
    color: #db46e6;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.journal-cta i {
    width: 14px;
    height: 14px;
    transition: 0.3s;
}

.journal-cta:hover {
    color: #ffffff;
}

.journal-cta:hover i {
    transform: translateX(5px);
}

/* --- SECONDARY SMALL BUTTON HOVER --- */
.btn-secondary-sm {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.3s ease; /* Ensure 'all' is used for smooth color/border shifts */
    cursor: pointer;
}

.btn-secondary-sm:hover {
    background: rgba(255, 255, 255, 0.08); /* Slight brightening */
    border-color: #db46e6; /* Magenta highlight */
    color: #db46e6; /* Text matches border for a sharp look */
    box-shadow: 0 0 15px rgba(219, 70, 230, 0.15); /* Soft outer glow */
    transform: translateY(-1px); /* Very tiny lift to signal interactivity */
}

/* --- UTILITY NODES --- */
.utility-node-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    text-decoration: none;
    color: white;
    transition: 0.3s ease;
    display: flex;
    flex-direction: column;
}

.utility-node-card:hover {
    transform: translateY(-3px);
    border-color: rgba(219, 70, 230, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.node-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

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

.node-icon {
    color: #db46e6;
    width: 24px;
    height: 24px;
}

.node-header h3 {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.node-status {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 4px 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    color: #db46e6;
    letter-spacing: 1px;
}

.node-desc {
    font-size: 0.95rem;
    color: #e0e0e0;
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 30px;
}

.node-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #db46e6;
    opacity: 0; /* Hidden until hover */
    transform: translateX(-10px);
    transition: 0.3s ease;
}

.utility-node-card:hover .node-footer {
    opacity: 1;
    transform: translateX(0);
}

.node-arrow {
    width: 14px;
    height: 14px;
}

/* --- FINAL CTA BANNER --- */
.final-cta-wrap {
    position: relative;
    background: linear-gradient(135deg, rgba(46, 2, 73, 0.4), rgba(15, 5, 25, 0.8));
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 40px 40px 60px 40px;
    text-align: center;
    overflow: hidden;
    margin-bottom: 10px;
}

.cta-inner-content {
    position: relative;
    z-index: 2;
}

.cta-headline {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.cta-subheadline {
    font-size: 1.1rem;
    color: #e0e0e0;
    opacity: 0.7;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.cta-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(219, 70, 230, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

@media (max-width: 600px) {
    .cta-headline { font-size: 1.8rem; }
    .cta-button-group { flex-direction: column; }
    .final-cta-wrap { padding: 60px 20px; }
}