/* RUGGY REWARDS - stylesheet (generated by build.py split).
   Style blocks appear in original document order; cascade unchanged. */


/* ===== STYLE BLOCK 1 ===== */
/* ============================================
   MOBILE OPTIMIZATIONS
============================================ */
@media (max-width: 768px) {
    /* Wallet Connect Bar */
    #wallet-connect-bar > div {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 6px 12px;
        gap: 8px;
    }
    
    #wallet-connect-bar button {
        font-size: 11.5px;
        padding: 5px 10px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    #wallet-connect-bar span {
        font-size: 12px;
        margin-right: 4px;
        flex-shrink: 0;
    }

    /* === IMPROVED MOBILE STYLES === */

    /* General Page Padding */
    .section {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Cards - Better mobile spacing + no clipping */
    .card {
        padding: 20px 18px !important;
        margin-bottom: 16px;
    }

    .card h3 {
        font-size: 1.05rem !important;
        line-height: 1.3;
    }

    .card p, .card div {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    /* Hamburger Menu Improvements on Small Screens */
    #mobile-menu {
        padding: 20px 16px;
    }

    #mobile-menu .nav-link {
        padding: 16px 18px;
        font-size: 15.5px;
    }

    /* Admin Modal on Mobile */
    #developer-modal > div {
        width: 94% !important;
        max-height: 92vh;
        padding: 20px 16px !important;
    }

    /* Form inputs in Admin */
    #developer-modal input,
    #developer-modal select {
        font-size: 15px;
        padding: 10px 12px;
    }

    /* Tokenomics Chart Container */
    #chart-container {
        padding: 16px 12px;
    }

    /* Prevent page-level horizontal overflow — but NOT on .card:
       cards scroll their own content instead of clipping it. */
    body, html, .section {
        overflow-x: hidden;
    }

    /* Footer disclaimer */
    div[style*="padding: 40px 20px 30px"] {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* Very Small Screens (iPhone SE, older devices) */
/* (very-small-screen ≤360px rules are consolidated into one comprehensive
   block lower in this file) */

/* Toast Notification Styles */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3);
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    max-width: 90vw;
    animation: toastSlideIn 0.3s ease forwards;
}

.toast.success { border-left: 4px solid #22c55e; }
.toast.error   { border-left: 4px solid #ef4444; }
.toast.info    { border-left: 4px solid #3b82f6; }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

/* Hide Hamburger Menu on Desktop / Wide Screens */
@media (min-width: 768px) {
    #mobile-menu-btn {
        display: none !important;
    }
}

/* Connected Wallet Button Pill Style */
#connect-btn.connected {
    background: linear-gradient(135deg, #166534, #15803d);
    color: white;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

#connect-btn.connected:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

#connect-btn .disconnect-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    font-size: 12px;
    line-height: 1;
}

/* ===== STYLE BLOCK 2 ===== */
/* ============================================
   HOME CYCLING COLOR ANIMATION (8 Theme Colors)
============================================ */
/* homeColorCycle is defined in the RETRO NEON RESTORATION layer */

/* ========================================
   PAGE TITLE COLORS - Match Navigation Colors
======================================== */

/* TOKENOMICS - Light gray like nav */
#tokenomics .neon-text,
#tokenomics h2.neon-text {
    color: #9ca3af !important;
}

/* LORE - Purple like nav */
#lore .neon-text,
#lore h2.neon-text {
    color: #c084fc !important;
}

/* REWARDS - Green like nav */
#rewards .neon-text,
#rewards h2.neon-text {
    color: #22c55e !important;
}

/* GALLERY - Pink/Magenta like nav */
#gallery .neon-text,
#gallery h2.neon-text {
    color: #ff00ff !important;
}

/* HALL - Gold/Amber like nav */
#hall .neon-text,
#hall h2.neon-text {
    color: #f59e0b !important;
}

/* WALL - Red like nav */
#wall .neon-text,
#wall h2.neon-text {
    color: #ef4444 !important;
}

/* POOL - Blue like nav */
#pool .neon-text,
#pool h2.neon-text {
    color: #3b82f6 !important;
}

/* ABSOLUTION - White like nav */
#absolution .neon-text,
#absolution h2.neon-text {
    color: #f1f5f9 !important;
}

/* LOTTERY page title - Already handled by .lotto-animated-title */

/* HOME page main title (RUGGY) - Keep multi-color, no override */
#home h1.neon-text {
    color: inherit !important;
}

/* ===== STYLE BLOCK 3 ===== */
body { font-family: 'Press Start 2P', system-ui, sans-serif; background: linear-gradient(135deg, #0a0a0a, #1a0033); color: white; margin: 0; padding: 0; }
.section { display: none; }
.section.active { display: block; }
.nav-link { 
    transition: all 0.3s ease; 
    cursor: pointer; 
    position: relative;
}

@media (max-width: 768px) {
    /* Completely hide the second (horizontal) navigation bar on mobile */
    #desktop-nav,
    #desktop-nav > div {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Extra safety for nav links */
    #desktop-nav .nav-link,
    #desktop-nav a {
        display: none !important;
    }

    h1, h2, h3, h4, .neon-text, .card h3, .explore-card h3 {
        white-space: normal !important;
        overflow-wrap: break-word;
        word-break: break-word;
        line-height: 1.3;
    }
}

/* =====================================================
   GLOBAL TEXT WRAPPING - All words must always be visible
   No ellipsis ever. Natural wrapping with good spacing.
   ===================================================== */
.card h3,
.explore-card h3,
.card p,
.explore-card p {
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: normal;
    overflow: visible;
}

/* ============================================
   UNIFORM TITLE EMOJIS
   Leading emojis in titles are wrapped in this span by
   normalizeTitleEmojis(). inline-block + line-height:1 takes the
   emoji out of the text line-box height calculation, so a second
   line of wrapped text can never crop its bottom — and every
   title across the site gets identical emoji size, alignment,
   and spacing relative to its text.
   ============================================ */
.title-emoji {
    /* Emoji sits centered on its own line above the title text —
       fully outside the text's line boxes, so nothing can clip it. */
    display: block;
    text-align: center;
    line-height: 1;
    font-size: 1.35em;
    margin: 0 auto 8px;
    text-indent: 0;
}

/* Hover effects (replaces inline onmouseover/onmouseout JS) */
.hover-scale { transition: transform 0.2s ease; }
.hover-scale:hover { transform: scale(var(--scale, 1.03)); }

.icon-glow { transition: all 0.3s ease; }
.icon-glow:hover {
    border-color: var(--glow) !important;
    box-shadow: 0 0 8px var(--glow);
}

.gallery-card { transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.gallery-card:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 0 20px #ff00ff, 0 10px 30px rgba(0,0,0,0.4);
    border-color: #ff00ff !important;
}

/* Wallet selection buttons (replaces 11 copies of identical inline
   style + onmouseover/onmouseout JS; colors come from custom props) */
.wallet-option {
    background: linear-gradient(145deg, var(--w1), var(--w2));
    color: white;
    font-weight: 700;
    padding: 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--wshadow), inset 0 1px 0 rgba(255,255,255,0.3);
    transition: all 0.2s ease;
    font-size: 15px;
}
.wallet-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--wshadow-h), inset 0 1px 0 rgba(255,255,255,0.4);
}

/* Slim scrollbars for scrollable cards */
.card::-webkit-scrollbar,
.explore-card::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.card::-webkit-scrollbar-thumb,
.explore-card::-webkit-scrollbar-thumb {
    background: #6b21a8;
    border-radius: 3px;
}
.card,
.explore-card {
    scrollbar-width: thin;
    scrollbar-color: #6b21a8 transparent;
}

/* Extra safety for all card content */
.card,
.explore-card {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* Active state: brighten the link's own color (respects inline color) */
.nav-link.active {
    filter: brightness(1.55) saturate(1.25);
    transform: translateY(-1px);
}

/* Hover state: brighten the link's own color */
.nav-link:hover {
    filter: brightness(1.4) saturate(1.2);
    transform: translateY(-1px);
}

/* Gallery Card Hover Effects */
.gallery-card {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
    will-change: transform;
}

.gallery-card:hover {
    transform: scale(1.045) translateY(-4px);
    box-shadow: 
        0 0 25px rgba(255, 0, 255, 0.6),
        0 15px 35px rgba(0, 0, 0, 0.5);
    border-color: #ff00ff;
}

/* nav-gradient keyframe removed - no longer used for navigation hover */
.card { 
    background: rgba(0,0,0,0.7); 
    border: 3px solid #6b21a8; 
    border-radius: 20px; 
    padding: 24px; 
    transition: all 0.4s ease;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    /* Content wider/taller than the card scrolls instead of clipping */
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 
        0 0 8px rgba(107, 33, 168, 0.6),
        0 0 16px rgba(107, 33, 168, 0.4);
    line-height: 1.65;
}

.card p,
.card li,
.card .stat-row {
    margin-bottom: 10px;
}

.card h3 {
    margin-bottom: 14px;
}

@media (max-width: 768px) {
    .card,
    .explore-card,
    [class*="card"] {
        /* was overflow:hidden !important — that clipped emoji tops in
           tight-line-height titles AND blocked card scrolling entirely */
        overflow: auto !important;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box !important;
        min-height: auto !important;
        padding: 16px !important;
    }
    
    .card h3 {
        margin-bottom: 10px !important;
        font-size: 17px !important;
        /* emoji glyphs are taller than Latin text — give them headroom */
        line-height: 1.45 !important;
        padding-top: 2px;
    }
    
    .card p,
    .card li,
    .card .stat-row {
        margin-bottom: 8px !important;
        font-size: 14px !important;
    }
    
    .card button,
    .card .buy-button,
    .card input,
    .card select {
        padding: 12px 16px !important;
        font-size: 14px !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        line-height: 1.4 !important;
        text-align: center !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .card p {
        line-height: 1.5;
    }

    .explore-card {
        padding: 14px !important;
    }
    
    .explore-card h3 {
        font-size: 15px !important;
        margin-bottom: 6px !important;
    }
    
    .explore-card p {
        font-size: 12.5px !important;
        margin-bottom: 6px !important;
    }

    #pool .card {
        overflow: auto;
        padding: 16px !important;
    }
    
    #pool #lock-period-options {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)) !important;
        gap: 8px !important;
    }
    
    #pool .lock-option {
        font-size: 11px !important;
        padding: 8px 4px !important;
    }
    
    #pool input,
    #pool button {
        font-size: 15px;
    }

    #absolution .card {
        overflow: auto;
        padding: 16px !important;
    }
    
    #absolution .buy-button {
        font-size: 14px !important;
        padding: 14px 16px !important;
        white-space: normal !important;
        line-height: 1.45 !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        text-indent: 0 !important;
        max-width: 100% !important;
        text-align: center !important;
    }
    
    #absolution input {
        font-size: 15px;
    }
    
    #absolution #absolution-stake-breakdown {
        font-size: 13px;
    }

    #tokenomics .card,
    #rewards .card,
    #dev-login .card {
        padding: 16px !important;
    }
}

#home .card:hover {
    transform: translateY(-6px) scale(1.01);
    border: 3px solid transparent;
    background: 
        linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)) padding-box,
        linear-gradient(90deg, #ff00ff, #c026d3, #a855f7, #ff00ff) border-box;
    background-size: 200% 100%;
    animation: nav-gradient 1.5s linear infinite;
    box-shadow: 
        0 0 12px #ff00ff,
        0 0 24px #c026d3,
        0 0 36px #a855f7;
}

/* Global hover gradient now disabled for all titles via rules at end of stylesheet */

#lore .card:hover {
    transform: none;
    border: 3px solid #6b21a8;
    background: rgba(0,0,0,0.7);
    animation: none;
}

#lore .card:hover h3,
#lore .card:hover p {
    background: none;
    -webkit-text-fill-color: #f3e8ff;
    animation: none;
}
.buy-button { 
    background: linear-gradient(to right, #22c55e, #16a34a); 
    color: white; 
    padding: 16px 20px; 
    border: none; 
    border-radius: 12px; 
    font-size: 15px; 
    font-weight: bold; 
    cursor: pointer; 
    width: 100%; 
    max-width: 100%;
    margin-top: 16px; 
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.4;
    text-align: center;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.modal { 
    position: fixed; 
    z-index: 100; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.88); 
    backdrop-filter: blur(8px);
    /* Hidden by default — JS sets inline display:flex to open. Previously
       display:flex here silently beat .section's display:none (later rule,
       equal specificity), making both modals render OPEN on page load. */
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content { 
    background: #1a0033; 
    padding: 32px 28px; 
    border: 3px solid #ff00ff; 
    width: 92%; 
    max-width: 520px; 
    border-radius: 20px; 
    max-height: 85vh; 
    overflow: auto; 
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 0 40px rgba(255, 0, 255, 0.35);
    animation: popupAppear 0.25s ease-out forwards;
    margin: 0; /* Remove any default margin */
}

@keyframes popupAppear {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.timer { font-size: 13px; color: #f59e0b; font-weight: bold; }

/* Better Chart.js Tooltip Styling for Readability */
.chartjs-tooltip {
    max-width: 520px !important;
    min-width: 280px !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    line-height: 1.65 !important;
    font-size: 14px !important;
    padding: 10px 14px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

input, button, textarea, select {
    max-width: 100%;
    box-sizing: border-box;
}

.card {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    max-width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    font-size: 13px;
}
th, td {
    padding: 10px 8px;
    text-align: center !important;
    vertical-align: middle;
    border-bottom: 1px solid #374151;
    white-space: normal;
}
th {
    color: #f59e0b;
    font-weight: bold;
}
th:first-child, td:first-child { width: 12%; }
th:nth-child(2), td:nth-child(2) { width: 50%; }
th:nth-child(3), td:nth-child(3) { width: 38%; }

.table-container {
    max-height: 420px;
    overflow: auto;
    border: 1px solid #374151;
    border-radius: 8px;
}

@media (max-width: 900px) {
    nav > div {
        flex-wrap: wrap;
    }
    nav .nav-link {
        font-size: 15px !important;
        padding: 8px 12px !important;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    nav .nav-link + a {
        margin-left: 4px;
    }

    .section {
        padding-left: 12px !important;
        padding-right: 12px !important;
        padding-top: 80px !important;
    }

    .card {
        padding: 16px !important;
    }

    .gallery-card {
        min-width: 180px !important;
    }

    #tokenomics > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }

    #feePieChart {
        max-width: 100% !important;
        margin: 0 auto;
        width: 100% !important;
        height: 100% !important;
    }

    #rewards > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    #hall > div[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .table-container {
        max-height: 380px;
        overflow: auto;
    }

    #top-holders-table,
    #longest-holders-table,
    #bagworkers-table,
    #banned-table {
        min-width: 620px;
    }

    #wall .card[style*="margin-bottom: 25px"] > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 10px !important;
    }

    #wall input#monitor-wallet-input {
        width: 100% !important;
        min-width: unset !important;
    }

    .card, table, canvas, img {
        max-width: 100% !important;
        box-sizing: border-box;
    }

    h2, h3, p, span, td, th {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    #tokenomics img,
    #rewards img,
    #lore img,
    #gallery img,
    #hall img,
    #wall img {
        height: auto !important;
        max-height: 220px !important;
    }

    h2.neon-text,
    .section h2 {
        font-size: 24px !important;
        white-space: normal !important;
        overflow: visible;
    }

    #wall .card[style*="margin-top: 30px"] > div[style*="display: grid"] {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 16px;
        padding-bottom: 10px;
    }

    #home > div {
        text-align: center;
    }
    
    #home .card {
        margin-left: auto;
        margin-right: auto;
    }

    #home-metrics,
    #home > div[style*="max-width: 1100px"] {
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

.topbar-scroll::-webkit-scrollbar {
    display: none;
}

/* =====================================================
   GLOBAL TITLE & SUBTITLE AUTO-FIT + INDENT ON OVERFLOW
   ===================================================== */
h1, h2, h3, h4, .neon-text, .section h2, .card h3, .explore-card h3 {
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: break-word;
    overflow: visible;
    /* Negative text-indent removed: it shifted the first line of
       CENTERED headings left, clipping leading emojis on mobile. */
    text-indent: 0;
    padding-left: 0;
    line-height: 1.3;
}

/* Responsive sizing for main titles */
h1.neon-text, h2.neon-text, .section h2 {
    font-size: clamp(24px, 7.5vw, 44px) !important;
}

@media (max-width: 767px) {
    #desktop-nav {
        padding-bottom: 8px;
    }
}

@media (max-width: 767px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .max-w-7xl, 
    [style*="max-width: 1280px"],
    [style*="max-width: 1100px"],
    [style*="max-width: 1200px"] {
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box;
    }

    * {
        max-width: 100% !important;
        box-sizing: border-box;
    }

    h1, h2, .text-4xl, .text-5xl, .text-6xl {
        font-size: clamp(22px, 7vw, 36px) !important;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .card, 
    .explore-card,
    [class*="card"] {
        margin-left: 8px !important;
        margin-right: 8px !important;
        padding: 16px !important;
        max-width: calc(100% - 16px) !important;
        overflow: auto !important;
        box-sizing: border-box !important;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        font-size: 13px;
    }

    th, td {
        white-space: normal;
        padding: 8px 6px !important;
    }

    #dev input,
    #dev select,
    #dev button {
        font-size: 14px !important;
        padding: 10px 12px !important;
    }

    #rewards .card {
        padding: 14px !important;
    }

    #gallery img {
        max-width: 100%;
        height: auto;
    }

    #tokenomics canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    #hall table,
    #wall table {
        font-size: 12px;
    }

    [style*="min-width"] {
        min-width: auto !important;
    }

    #hall .card,
    #wall .card {
        overflow: auto;
    }

    p, span, div {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    #desktop-nav a {
        font-size: 13px !important;
        padding: 6px 10px !important;
    }
}

/* ============================================
   DYNAMIC AUTO PADDING - Keeps banners under nav
   Works on both mobile and desktop
   ============================================ */
:root {
    --nav-height: 170px;

    /* ============================================
       DESIGN TOKENS — change the theme in one place.
       Names map to how the color is USED, so swapping
       a value re-themes everything that references it.
       (Existing literal hex values still work; these are
       here so new/edited rules can use var(--token).)
       ============================================ */

    /* Brand / neon */
    --c-neon-pink:    #ff00ff;   /* primary neon, logo, accents   (13x) */
    --c-neon-green:   #22c55e;   /* success, staking, "good"      (25x) */
    --c-green-deep:   #16a34a;   /* green gradient end             (6x) */
    --c-gold:         #fbbf24;   /* gold highlights, permanent     (10x) */
    --c-gold-deep:    #f59e0b;   /* amber/gold deep                (15x) */
    --c-amber:        #eab308;   /* community tier                 (5x) */
    --c-purple:       #a855f7;   /* MDR, purple accents            (6x) */
    --c-purple-deep:  #6b21a8;   /* deep purple borders/bg        (20x) */
    --c-blue:         #3b82f6;   /* info, links, consolation       (6x) */
    --c-red:          #ef4444;   /* danger, bans, burn            (10x) */

    /* Surfaces / text */
    --c-bg-900:       #0a0a0a;   /* page background */
    --c-bg-800:       #111827;   /* card background                (9x) */
    --c-bg-700:       #1f2937;   /* raised panel                  (12x) */
    --c-border:       #374151;   /* hairline borders               (8x) */
    --c-text-muted:   #9ca3af;   /* secondary text                (13x) */

    /* Neon glow shadows (use with currentColor-friendly elements) */
    --glow-soft:   0 0 8px currentColor;
    --glow-med:    0 0 16px currentColor, 0 0 32px currentColor;
    --glow-green:  0 0 8px #22c55e, 0 0 16px #16a34a;
    --glow-gold:   0 0 8px #fbbf24, 0 0 16px #f59e0b;

    /* Spacing scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;

    /* Radius scale */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

#home {
    padding-top: calc(var(--nav-height) + 20px) !important;
}

#tokenomics, #lore, #rewards, #gallery, #hall, #wall, #pool, #absolution, #lotto {
    padding-top: calc(var(--nav-height) + 16px) !important;
}

/* ============================================
   GLOBAL TITLE & SUBTITLE AUTO-FIT + INDENT
   All titles now auto-size and indent naturally
   instead of clipping when they overflow
   ============================================ */
h1, h2, h3, .neon-text, .section h2 {
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.25;
}

/* Responsive sizing for main page titles */
h2.neon-text,
.section h2 {
    font-size: clamp(26px, 7.5vw, 42px) !important;
}

h1.neon-text {
    font-size: clamp(38px, 11vw, 68px) !important;
}

@media (max-width: 768px) {
    #desktop-nav {
        padding: 4px 0 !important;
    }
    #desktop-nav > div {
        gap: 10px !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }
    #desktop-nav a {
        font-size: 13px !important;
        padding: 6px 10px !important;
    }
}

/* =====================================================
   SMART GLOBAL TEXT WRAPPING (Final Version)
   - Single word titles (ABSOLUTION, TOKENOMICS, etc.): Always stay on ONE line
   - Multi-word text: If it overflows, the ENTIRE word indents to next line
   - Applied to all important text on the website
   ===================================================== */
h1, h2, h3, .neon-text, 
.card h3, .explore-card h3,
.section h2, .section h3 {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.35;
    overflow: visible;
}

/* All titles, subtitles and card text: Must always show completely. No ellipsis ever. */
h1, h2, h3, .neon-text, 
.card h3, .explore-card h3,
.section h2, .section h3 {
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: break-word;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.45;
}

/* Mobile: Better wrapping and spacing */
@media (max-width: 768px) {
    h1, h2, h3, .neon-text,
    .card h3, .explore-card h3 {
        padding-left: 4px;
        padding-right: 4px;
    }
}

/* ==================== COMPREHENSIVE RESPONSIVE LAYOUT FOR MOBILE ==================== */
@media (max-width: 768px) {
    /* Navigation */
    nav {
        padding: 4px 10px !important;
    }
    #desktop-nav > div {
        gap: 8px !important;
        font-size: 12.5px !important;
    }

    /* Tokenomics: Stack columns */
    #tokenomics > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }

    /* Pool staking grid - responsive */
    #lock-period-options {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    .lock-option {
        font-size: 11.5px !important;
        padding: 10px 6px !important;
        transition: all 0.2s ease;
        white-space: normal !important;
        word-break: break-word;
        overflow: hidden;
        box-sizing: border-box;
    }

    .lock-option.selected {
        border-color: #22c55e !important;
        box-shadow: 0 0 12px #22c55e !important;
    }

    .lock-option:active {
        transform: scale(0.92);
        filter: brightness(0.85);
        transition: transform 0.05s ease;
    }

    .lock-option.selected {
        border-color: #22c55e !important;
        background: #052e16 !important;
        box-shadow: 0 0 12px #22c55e;
        transform: scale(1.02);
    }

    /* General cards */
    .card {
        padding: 15px !important;
        margin-left: 6px;
        margin-right: 6px;
    }

    /* Tables */
    .table-container {
        max-height: 300px;
    }

    /* Admin modal on mobile */
    #developer-modal .modal-content {
        width: 95% !important;
        max-width: 95% !important;
    }
}

@media (max-width: 480px) {
    #lock-period-options {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .card {
        padding: 13px !important;
    }

    /* Very small screens - tighter but still readable */
    .card h3 {
        font-size: 15px !important;
        line-height: 1.4 !important;
        padding-top: 2px;
    }
    
    .section {
        padding-top: 70px !important;
        padding-bottom: 30px !important;
    }
    
    /* Admin panel on very small screens */
    #developer-modal .modal-content {
        width: 97% !important;
        padding: 16px !important;
    }
    
    #dev-panel input,
    #dev-panel select {
        font-size: 13px !important;
        padding: 8px 10px !important;
    }
}

/* Lottery cards: extra breathing room on the right on mobile
   (the space-between rows were pressing amounts against the border) */
@media (max-width: 768px) {
    #lotto .card {
        padding-right: 24px !important;
    }
}

/* Extra small screens (iPhone SE, older Android) */
@media (max-width: 360px) {
    /* button + nav-link sizing for ≤360px (card/option spacing is in the
       consolidated block below) */
    button {
        font-size: 13px !important;
        padding: 10px 14px !important;
    }

    .nav-link {
        font-size: 12.5px !important;
        padding: 6px 8px !important;
    }
}

/* Lotto title styling lives in the RETRO NEON RESTORATION layer */

/* ===== UTILITY CLASSES (extracted from repeated inline styles) ===== */
.tile { cursor: pointer; border-radius: 16px; overflow: hidden; border: 2px solid #374151; background: #111827; }
.tile-img { width: 100%; height: 260px; object-fit: cover; display: block; }
.tile-img-sm { width: 100%; height: 160px; object-fit: cover; object-position: center 25%; }
.tile-caption { padding: 14px; text-align: center; }
.tile-title { margin: 0; font-weight: 600; color: #f3e8ff; }
.muted-sm { font-size: 13px; color: #9ca3af; }
.muted-sm-flat { font-size: 13px; color: #9ca3af; margin: 0; }
.pad-card { padding: 20px 20px 26px; }
.label-xs { font-size: 11px; display: block; margin-bottom: 4px; }
.center-mb30 { text-align: center; margin-bottom: 30px; }


/* =====================================================================
   RETRO NEON RESTORATION
   Sits last in the cascade on purpose. Multi-layer glows restore the
   vibrant arcade look; every glowing element keeps a dark text-stroke
   so it stays readable against the glow. The same-name @keyframes
   redefinitions below override the earlier, dimmer ones (last
   definition of a keyframe name wins).
   ===================================================================== */

/* --- Navigation links: full neon tube treatment.
       The faint white inner layer is the "hot glass core" of a real
       neon tube; the dark stroke keeps letterforms crisp inside it. --- */
nav .nav-link,
#desktop-nav .nav-link,
.nav-link {
    -webkit-text-stroke: 0.7px rgba(0, 0, 0, 0.85);
    text-shadow:
        0 0 1px rgba(255, 255, 255, 0.85),
        0 0 4px currentColor,
        0 0 10px currentColor,
        0 0 22px currentColor,
        0 0 38px currentColor !important;
}
nav .nav-link:hover {
    text-shadow:
        0 0 1px rgba(255, 255, 255, 0.95),
        0 0 6px currentColor,
        0 0 14px currentColor,
        0 0 30px currentColor,
        0 0 52px currentColor !important;
    filter: brightness(1.15);
}

/* --- Page titles & section headings: the brightest tubes on the sign,
       with a slow breathing pulse like a real storefront --- */
.page-title,
h1.neon-text, h2.neon-text,
.section h2,
.section-title {
    -webkit-text-stroke: 0.8px rgba(0, 0, 0, 0.8);
    text-shadow:
        0 0 1px rgba(255, 255, 255, 0.9),
        0 0 6px currentColor,
        0 0 16px currentColor,
        0 0 32px currentColor,
        0 0 56px currentColor !important;
    animation: neonBreathe 3.2s ease-in-out infinite;
}

@keyframes neonBreathe {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.18); }
}

/* Respect users who turn animations off */
@media (prefers-reduced-motion: reduce) {
    .page-title, h1.neon-text, h2.neon-text, .section h2, .section-title {
        animation: none;
    }
}

/* --- Card headings: bright but a notch below page titles --- */
.card h3,
.explore-card h3 {
    -webkit-text-stroke: 0.6px rgba(0, 0, 0, 0.75);
    text-shadow:
        0 0 1px rgba(255, 255, 255, 0.7),
        0 0 4px currentColor,
        0 0 10px currentColor,
        0 0 20px currentColor !important;
}

/* --- RUGGY logo: fully CSS-controlled. Each letter carries only a
       color token inline (style="--c: #ef4444"); ALL glow lives here. --- */
.logo-letter {
    color: var(--c, #ff00ff);
    -webkit-text-stroke: 0.7px rgba(0, 0, 0, 0.85);
    text-shadow:
        0 0 1px rgba(255, 255, 255, 0.9),
        0 0 6px currentColor,
        0 0 14px currentColor,
        0 0 28px currentColor,
        0 0 46px currentColor;
}

/* --- HOME nav link: cycling rainbow --- */
.home-cycling {
    animation: homeColorCycle 16s linear infinite !important;
    font-weight: 700;
    -webkit-text-stroke: 0.6px rgba(0, 0, 0, 0.6);
}

/* --- LOTTERY: flashing green <-> gold, all variants in one place --- */
#lotto-title.lotto-animated-title,
.nav-link.lotto-animated-title,
.card h3.lotto-animated-title {
    color: #22c55e;
    animation: lottoTextFlash 1.8s infinite alternate ease-in-out !important;
    text-shadow: 0 0 3px #22c55e, 0 0 10px #22c55e, 0 0 22px #eab308 !important;
    font-weight: 900;
    -webkit-text-stroke: 0.6px rgba(0, 0, 0, 0.65);
}
.nav-link.lotto-animated-title {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 1;
}
#lotto-title.lotto-animated-title:hover {
    animation-duration: 0.55s !important;
    filter: brightness(1.3) saturate(1.3) !important;
}
.nav-link.lotto-animated-title:hover,
.nav-link.lotto-animated-title.active {
    animation-duration: 0.6s !important;
    filter: brightness(1.4) saturate(1.3) !important;
    text-shadow: 0 0 4px #22c55e, 0 0 14px #22c55e, 0 0 30px #eab308 !important;
    transform: translateY(-1px);
}
/* Keep generic purple hovers off lotto text WITHOUT the old
   background-clip transparency hack (transparent fill + glow halos
   rendered as a blurry blob, especially on mobile). Solid color +
   faster flash reads far better. */
#lotto-title:hover,
.card h3.lotto-animated-title:hover {
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
}

/* --- Gallery captions glow on tile hover --- */
.gallery-card:hover p {
    color: #ff00ff;
    text-shadow: 0 0 4px #ff00ff, 0 0 12px rgba(255, 0, 255, 0.6);
}

/* --- HOME cycling animation: brighter ramp (same name overrides) --- */
@keyframes homeColorCycle {
    0%    { color: #9ca3af; text-shadow: 0 0 4px #9ca3af, 0 0 12px #9ca3af, 0 0 24px #6b7280; }
    12.5% { color: #c084fc; text-shadow: 0 0 4px #c084fc, 0 0 12px #c084fc, 0 0 24px #a855f7; }
    25%   { color: #22c55e; text-shadow: 0 0 4px #22c55e, 0 0 12px #22c55e, 0 0 24px #16a34a; }
    37.5% { color: #ff00ff; text-shadow: 0 0 4px #ff00ff, 0 0 12px #ff00ff, 0 0 24px #ec4899; }
    50%   { color: #fbbf24; text-shadow: 0 0 4px #fbbf24, 0 0 12px #fbbf24, 0 0 24px #f59e0b; }
    62.5% { color: #ef4444; text-shadow: 0 0 4px #ef4444, 0 0 12px #ef4444, 0 0 24px #dc2626; }
    75%   { color: #3b82f6; text-shadow: 0 0 4px #3b82f6, 0 0 12px #3b82f6, 0 0 24px #2563eb; }
    87.5% { color: #f1e7ff; text-shadow: 0 0 4px #f1e7ff, 0 0 12px #f1e7ff, 0 0 24px #c4b5fd; }
    100%  { color: #9ca3af; text-shadow: 0 0 4px #9ca3af, 0 0 12px #9ca3af, 0 0 24px #6b7280; }
}

/* --- Lottery flashing: punchy green <-> gold (same name overrides) --- */
@keyframes lottoTextFlash {
    0%   { color: #22c55e; text-shadow: 0 0 3px #22c55e, 0 0 10px #22c55e, 0 0 22px #eab308; }
    100% { color: #eab308; text-shadow: 0 0 3px #eab308, 0 0 10px #eab308, 0 0 22px #22c55e; }
}

/* --- Pixel-font readability: the arcade font is dense, give it air --- */
nav .nav-link {
    letter-spacing: 0.5px;
}
.section h2,
.page-title {
    line-height: 1.5;
    letter-spacing: 1px;
}

/* --- MOBILE TUNING: glow scales with glyph size. The desktop halos
       (up to 56px) overwhelm 15-24px mobile text, bleeding far outside
       the characters — so every glow is trimmed ~50-60% under 768px.
       Same selectors, smaller radii; the look survives, the blur doesn't. --- */
@media (max-width: 768px) {
    nav .nav-link,
    #desktop-nav .nav-link,
    .nav-link {
        text-shadow:
            0 0 1px rgba(255, 255, 255, 0.8),
            0 0 3px currentColor,
            0 0 7px currentColor,
            0 0 12px currentColor !important;
    }
    nav .nav-link:hover {
        text-shadow:
            0 0 1px rgba(255, 255, 255, 0.9),
            0 0 4px currentColor,
            0 0 9px currentColor,
            0 0 16px currentColor !important;
    }
    .page-title,
    h1.neon-text, h2.neon-text,
    .section h2,
    .section-title {
        text-shadow:
            0 0 1px rgba(255, 255, 255, 0.85),
            0 0 4px currentColor,
            0 0 10px currentColor,
            0 0 20px currentColor !important;
    }
    .card h3,
    .explore-card h3 {
        text-shadow:
            0 0 1px rgba(255, 255, 255, 0.6),
            0 0 3px currentColor,
            0 0 8px currentColor !important;
    }
    .logo-letter {
        text-shadow:
            0 0 1px rgba(255, 255, 255, 0.85),
            0 0 4px currentColor,
            0 0 9px currentColor,
            0 0 16px currentColor;
    }
    #lotto-title.lotto-animated-title,
    .nav-link.lotto-animated-title,
    .card h3.lotto-animated-title {
        text-shadow: 0 0 2px #22c55e, 0 0 7px #22c55e, 0 0 13px #eab308 !important;
    }
}

/* Body copy stays clean: never let glow bleed into paragraphs/small text */
p, li, td, th, input, button, .muted-sm, .muted-sm-flat, .label-xs {
    -webkit-text-stroke: 0;
}

/* ===== UTILITY CLASSES, BATCH 2 (extracted from repeated inline styles) ===== */
.btn-bare { cursor: pointer; padding: 0; overflow: visible; transition: transform 0.2s; }
.mb12 { margin-bottom:12px; }
.mb10 { margin-bottom:10px; }
.mb20 { margin-bottom: 20px; }
.gold { color: #fbbf24; }
.green { color: #22c55e; }
.gray { color: #9ca3af; }
.bold { font-weight: bold; }
.hint-green { font-size: 10px; color: #86efac; }
.feature-img { max-width: 100%; height: 280px; object-fit: cover; border-radius: 16px; border: 3px solid #6b21a8; }
.page-h2 { font-size: clamp(28px, 8vw, 42px); text-align: center; margin-bottom: 8px; }
.row-top { display: flex; align-items: flex-start; gap: 10px; }
.row-between { display: flex; justify-content: space-between; }
.text-14 { font-size: 14px; line-height: 1.4; }
.text-15 { font-size: 15px; line-height: 1.7; }
.text-14-flat { font-size: 14px; margin: 0; }
.muted-125 { font-size: 12.5px; color:#9ca3af; }
.muted-12 { font-size: 12px; color: #9ca3af; }
.cell { padding: 10px; text-align: left; }
.label-sm { font-size:12px; display:block; margin-bottom:4px; }
.w-full { width:100%; }
.page-wrap { padding-top: 110px; padding-bottom: 80px; max-width: 1100px; margin: 0 auto; }
.green-mb15 { color: #22c55e; margin-bottom: 15px; }
.stat-lg { font-size: 28px; font-weight: bold; min-height: 34px; }
.center-mb25 { text-align: center; margin-bottom: 25px; }
.fs15 { font-size: 15px; }
.row-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 13px; padding-bottom: 10px; border-bottom: 1px solid #374151; }
.stat-box-green { padding: 10px 6px; background: #052e16; border: 2px solid #166534; border-radius: 8px; text-align: center; cursor: pointer; font-size: 11px; }
.stat-box-green { padding: 10px 6px; background: #052e16; border: 2px solid #f59e0b; border-radius: 8px; text-align: center; cursor: pointer; font-size: 11px; box-shadow: 0 0 8px #f59e0b; }
.dev-input { width:100%; padding:9px; border-radius:6px; border:1px solid #6b21a8; background:#111827; color:white; font-size:12px; font-family: monospace; }
.dev-input { width:100%; padding:9px; border-radius:6px; border:1px solid #6b21a8; background:#111827; color:white; }
.dev-input-sm { width:100%; padding:8px; margin-bottom:6px; border-radius:6px; border:1px solid #6b21a8; background:#111827; color:white; font-size:13px; }

/* --- Hero (home page) typography: extracted from inline styles --- */
.hero-title {
    font-size: clamp(42px, 12vw, 68px);
    margin-bottom: 12px;
}
.hero-sub {
    font-size: clamp(18px, 4.5vw, 24px);
    color: #f3e8ff;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ===== UTILITY CLASSES, BATCH 3 (deduplicated inline styles; uN names are auto-generated) ===== */
.u1 { text-align: center; color: #9ca3af; margin-bottom: 35px; font-size: 15px; }
.u2 { font-size: 15px; color: #9ca3af; }
.u3 { color:#f59e0b; margin-bottom:10px; font-size:13px; }
.u4 { width: 100%; height: 100%; object-fit: cover; border-radius: 9999px; }
.u5 { font-size: 14px; color: #9ca3af; }
.u6 { font-size: 20px; font-weight: bold; }
.u7 { cursor: pointer; padding: 0; overflow: hidden; transition: transform 0.2s; }
.u8 { text-align: center; color: #9ca3af; margin-bottom: 30px; font-size: 15px; }
.u9 { color: #f59e0b; margin-bottom: 12px; }
.u10 { color: #ef4444; margin-bottom: 20px; }
.u11 { color: #f87171; margin-bottom: 8px; }
.u12 { color: #fbbf24; margin-bottom: 8px; }
.u13 { color: #3b82f6; margin-bottom: 15px; }
.u14 { font-size: 28px; font-weight: bold; color: #22c55e; min-height: 34px; }
.u15 { display: flex; justify-content: space-between; margin-bottom: 6px; }
.u16 { color:#86efac; font-size:12px; }
.u17 { padding-top: 110px; padding-bottom: 80px; max-width: 900px; margin: 0 auto; }
.u18 { padding-top: 110px; padding-bottom: 80px; max-width: 1400px; margin: 0 auto; }
.u19 { max-width: 100%; height: 260px; object-fit: cover; border-radius: 16px; border: 3px solid #6b21a8; }
.u20 { color: #f59e0b; margin-bottom: 15px; }
.u21 { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
.u22 { flex: 1; min-width: 280px; padding: 12px; border-radius: 8px; border: 2px solid #6b21a8; background: #111827; color: white; font-family: monospace; }
.u23 { width: auto; padding: 12px 24px; background: linear-gradient(to right, #3b82f6, #2563eb); }
.u24 { color: #f59e0b; margin-bottom: 20px; text-align: center; }
.u25 { font-size: 13px; color: #86efac; }
.u26 { font-size: 32px; font-weight: bold; color: #22c55e; }
.mb15 { margin-bottom: 15px; }
.u27 { font-size: 22px; font-weight: bold; color: #fbbf24; }
.u28 { display: flex; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid #374151; }
.u29 { margin-bottom:20px; padding:15px; background:#1f2937; border-radius:10px; }
.u30 { --w1: #c4b5fd; --w2: #7c3aed; --wshadow: rgba(124, 58, 237, 0.4); --wshadow-h: rgba(124, 58, 237, 0.5); }

/* ===== UTILITY CLASSES, BATCH 4 (canonicalized duplicates) ===== */
.u101 { flex-shrink: 0; }
.u102 { color: #f59e0b; }
.u103 { color: #f87171; }
.u104 { width: 100%; font-size: 13px; }
.u105 { margin-bottom: 30px; }
.u106 { color: #ef4444; }

/* ===== EXTRACTED LAYOUT BLOCKS (one-off styles > 120 chars moved out of
   the markup; xN names map 1:1 to the element that owned them) ===== */
.x201 { background: rgba(0,0,0,0.95); padding: 6px 16px; border-bottom: 1px solid #c026ff; position: fixed; width: 100%; z-index: 50; }
.x202 { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 6px; }
.x203 { position: relative; width: 100%; height: 48px; background: white; border-radius: 9999px; border: 3px solid #fbbf24; box-shadow: 0 0 12px rgba(251, 191, 36, 0.5); overflow: hidden; }
.x204 { position: absolute; left: 0; top: 0; height: 100%; width: 100%; background: linear-gradient(to right, #22c55e, #16a34a); transition: width 0.3s linear; border-radius: 9999px; z-index: 6; }
.x205 { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); font-size: 26px; z-index: 15; line-height: 1; background: white; border: 2px solid #22c55e; border-radius: 9999px; padding: 4px 7px; box-shadow: 0 0 8px rgba(34, 197, 94, 0.5); }
.x206 { position: absolute; top: 50%; transform: translateY(-50%); left: 100%; transition: left 0.25s linear; z-index: 10; width: 52px; height: 52px; border-radius: 8px; overflow: hidden; }
.x207 { --glow: #ff00ff; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9999px; background: #1f2937; border: 2px solid #6b21a8; }
.x208 { --glow: #c026d3; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9999px; background: #1f2937; border: 2px solid #6b21a8; }
.x209 { --glow: #3b82f6; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9999px; background: #1f2937; border: 2px solid #6b21a8; overflow: hidden; }
.x210 { --glow: #ec4899; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9999px; background: #1f2937; border: 2px solid #6b21a8; overflow: hidden; }
.x211 { background: #1f2937; color: #f59e0b; font-weight: 700; padding: 8px 14px; border-radius: 8px; border: 2px solid #6b21a8; cursor: pointer; font-size: 13px; white-space: nowrap; display: flex; align-items: center; gap: 6px; transition: all 0.2s ease; --glow: #f59e0b; }
.x212 { background: linear-gradient(to right, #ff00ff, #a855f7); color: white; font-weight: 700; padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer; font-size: 12px; white-space: nowrap; }
.x213 { background: #fbbf24; border-radius: 12px; border: 3px solid #f59e0b; z-index: 100000; box-shadow: 0 0 12px rgba(251, 191, 36, 0.6); }
.x214 { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 100000; background: rgba(15, 10, 31, 0.92); align-items: flex-start; justify-content: center; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.x215 { width: 92%; max-width: 420px; background: #120b2a; border: 2px solid #6b21a8; border-radius: 24px; box-shadow: 0 25px 60px -15px rgb(0 0 0 / 0.6); max-height: 80vh; overflow-y: auto; margin: 0 0 30px 0; }
.x216 { background: rgba(255,255,255,0.08); border: none; color: #c4b5fd; font-size: 26px; width: 42px; height: 42px; border-radius: 9999px; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; }
.x217 { padding: 16px 20px; border-radius: 14px; background: rgba(255,255,255,0.04); text-align: center; font-weight: 700; color: #22c55e; animation: lottoTextFlash 1.8s infinite alternate ease-in-out; }
.x218 { display: none; background: #1a0033; border-bottom: 2px solid #6b21a8; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); position: relative; z-index: 9999; }
.x219 { max-width: 1280px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.x220 { background: linear-gradient(145deg, #c4b5fd, #7c3aed); color: white; border: none; padding: 7px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 13px; transition: all 0.2s ease; }
.x221 { background: linear-gradient(145deg, #fbbf24, #d97706); color: white; border: none; padding: 7px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 13px; transition: all 0.2s ease; }
.x222 { background: linear-gradient(145deg, #4ade80, #16a34a); color: white; border: none; padding: 7px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 13px; transition: all 0.2s ease; }
.x223 { background: #374151; color: #e5e7eb; border: none; padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 18px; line-height: 1; }
.x224 { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; object-fit: cover; object-position: center 30%; z-index: 1; pointer-events: none; -webkit-touch-callout: none; user-select: none; }
.x225 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: stretch; justify-content: center; }
.x226 { position: relative; width: 100%; max-width: 520px; margin: 0 auto; background: #111827; border-radius: 20px; padding: 24px 20px; border: 1px solid #374151; box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3); overflow: hidden; box-sizing: border-box; contain: layout; }
.x227 { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #9ca3af; font-size: 14px; z-index: 1; display: none; text-align: center; }
.x228 { width: 100% !important; height: auto !important; aspect-ratio: 1.08 / 1; max-height: 460px; display: block; position: relative; z-index: 2; }
.x229 { max-height: 200px; overflow-y: auto; padding: 14px 16px; background: #1f2937; border-radius: 10px; border-left: 4px solid #6b21a8; font-size: 13.5px; display: none; line-height: 1.65; color: #d1d5db; }
.x230 { display: inline-block; width: 14px; height: 14px; background: #ef4444; border-radius: 3px; flex-shrink: 0; margin-top: 3px; }
.x231 { display: inline-block; width: 14px; height: 14px; background: #fbbf24; border-radius: 3px; flex-shrink: 0; margin-top: 3px; }
.x232 { display: inline-block; width: 14px; height: 14px; background: #22c55e; border-radius: 3px; flex-shrink: 0; margin-top: 3px; }
.x233 { display: inline-block; width: 14px; height: 14px; background: #a855f7; border-radius: 3px; flex-shrink: 0; margin-top: 3px; }
.x234 { max-width: 820px; margin: 0 auto 25px; padding: 14px 18px; background: #3f1f1f; border: 1px solid #ef4444; border-radius: 10px; text-align: center; }
.x235 { margin-bottom:15px; padding:10px; background:#1f2937; border-radius:8px; font-family:monospace; font-size:13px; color:#ddd; cursor:pointer; }
.x236 { display: none; background: #052e16; border-left: 5px solid #22c55e; border-radius: 10px; padding: 16px; font-size: 14px; line-height: 1.6; }
.x237 { width: 100%; padding: 12px; border-radius: 8px; border: 2px solid #166534; background: #052e16; color: white; font-size: 16px; }
.x238 { padding: 10px 4px; background: #052e16; border: 2px solid #166534; border-radius: 8px; text-align: center; cursor: pointer; font-size: 11px; }
.x239 { margin-top: 14px; padding: 12px; background: #3f1f1f; border: 1px solid #ef4444; border-radius: 8px; font-size: 12px; color: #fca5a5; line-height: 1.5; }
.x240 { flex: 1; min-width: 180px; padding: 12px; border-radius: 8px; border: 2px solid #374151; background: #111827; color: white; }
.x241 { margin-top: 12px; padding: 10px; background: #3f1f1f; border-radius: 6px; font-size: 13px; color: #fca5a5; display: none; }
.x242 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 30px; max-width: 1100px; margin: 0 auto; }
.x243 { flex: 1; padding: 14px; border-radius: 10px; border: 2px solid #6b21a8; background: #111827; color: white; font-size: 18px; text-align: center; }
.x244 { background: linear-gradient(to right, #fbbf24, #f59e0b); color: black; font-weight: bold; padding: 16px 28px; white-space: nowrap; }
.x245 { display: none; position: fixed; top: 0; left: 0; width: 420px; height: 100vh; z-index: 999999; background: #0f001f; border-right: 4px solid #f59e0b; box-shadow: 8px 0 40px rgba(0,0,0,0.9); overflow-y: auto; animation: slideInFromLeft 0.3s ease-out forwards; }
.x246 { position: sticky; top: 12px; right: 16px; float: right; background: #1f2937; border: 2px solid #f59e0b; color: #fbbf24; font-size: 24px; cursor: pointer; line-height: 1; font-weight: bold; width: 38px; height: 38px; border-radius: 9999px; display: flex; align-items: center; justify-content: center; z-index: 10; margin: 12px 16px 0 0; }
.x247 { background: #7f1d1d; color: #fca5a5; border: 1px solid #ef4444; padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; }
.x248 { margin-bottom: 24px; padding: 16px; background: #1f2937; border: 3px solid #f97316; border-radius: 12px; text-align: center; }
.x249 { background: linear-gradient(to right, #f97316, #ea580c); color: white; border: none; padding: 14px 20px; font-size: 15px; font-weight: bold; border-radius: 10px; cursor: pointer; width: 100%; }
.x250 { display: none; position: fixed; bottom: 24px; right: 24px; z-index: 999; width: 52px; height: 52px; border-radius: 9999px; background: linear-gradient(145deg, #7c3aed, #a855f7); color: white; border: none; cursor: pointer; box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5); transition: all 0.3s ease; font-size: 26px; line-height: 1; display: flex; align-items: center; justify-content: center; transform: translateY(-1px); }
.x251 { position: fixed; bottom: 90px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.x252 { text-align: center; padding: 40px 20px 30px; font-size: 11px; color: #6b7280; max-width: 700px; margin: 0 auto; line-height: 1.6; }
.x253 { max-width: 620px; text-align: center; background: #111827; border: 3px solid #6b21a8; border-radius: 20px; padding: 40px 30px; margin: 0 auto; }
.x254 { background: linear-gradient(to right, #22c55e, #16a34a); color: white; border: none; padding: 14px 28px; font-size: 16px; font-weight: bold; border-radius: 12px; cursor: pointer; }

/* --- Tokenomics: breathing room between the chart and the slice
       explanation box that appears below it --- */
#pie-explanation {
    margin-top: 18px;
}
#chart-container {
    margin-bottom: 6px;
}

/* =====================================================================
   MONEY RAIN — retro pixel dollar bills that fall when the distribution
   timer hits 00:00. Bills are pure CSS (no images): pixel-font "$",
   hard 2px borders, inner highlight frame, and a green neon glow to
   match the rest of the sign. GPU-only animation (transform), bills
   remove themselves on animationend.
   ===================================================================== */
.money-bill {
    position: fixed;
    top: -130px;
    z-index: 99990;
    pointer-events: none;          /* never blocks clicks */
    /* Real-dollar proportions (~2.35:1), big enough to read mid-fall.
       object-fit: cover fills the rectangle from the source image
       without distortion (crops excess instead of stretching). */
    width: 124px;
    height: 40px;
    object-fit: cover;
    border-radius: 3px;
    image-rendering: pixelated;    /* crisp retro scaling */
    filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.65));
    animation: billFall linear forwards;
    will-change: transform;
    border: 0;
    background: none;
}

/* Fallback if the bill image can't load: the original CSS-drawn pixel bill */
.money-bill-css {
    width: 124px;
    height: 40px;
    background: linear-gradient(180deg, #16a34a 0%, #15803d 60%, #166534 100%);
    border: 2px solid #052e16;
    border-radius: 2px;
    box-shadow:
        inset 0 0 0 2px #4ade80,
        0 0 10px rgba(34, 197, 94, 0.55);
    color: #d9f99d;
    font-family: 'Press Start 2P', monospace;
    font-size: 18px;
    line-height: 36px;
    text-align: center;
    text-shadow: 0 0 4px #22c55e;
    filter: none;
}
.money-bill-css::before {
    content: "$";
}

@keyframes billFall {
    0% {
        transform: translateY(-130px) translateX(0) rotate(var(--tilt, 0deg));
    }
    100% {
        transform: translateY(112vh) translateX(var(--drift, 0px)) rotate(var(--spin, 360deg));
    }
}

@media (prefers-reduced-motion: reduce) {
    .money-bill { display: none; }
    /* Honor reduced-motion globally: stop decorative spins/pulses/glows but
       keep functional transitions short rather than fully removed. */
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* =====================================================================
   ADMIN PANEL: collapsible sections + tool buttons
   ===================================================================== */
.admin-section {
    background: #160b2e;
    border: 1px solid #4c1d95;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}
.admin-section summary {
    cursor: pointer;
    padding: 11px 14px;
    font-weight: 700;
    font-size: 13.5px;
    color: #e9d5ff;
    list-style: none;
    user-select: none;
}
.admin-section summary::-webkit-details-marker { display: none; }
.admin-section summary::after {
    content: "▸";
    float: right;
    transition: transform 0.2s ease;
}
.admin-section[open] summary::after { transform: rotate(90deg); }
.admin-section-body { padding: 4px 14px 14px; }
.admin-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #d1d5db;
    margin: 10px 0;
    cursor: pointer;
}
.admin-tool-btn {
    width: 100%;
    margin-bottom: 8px;
    font-size: 12.5px;
    background: #1f2937;
    border: 1px solid #4b5563;
    color: #e5e7eb;
}

/* =====================================================================
   NEON INTENSITY LEVELS (admin > Appearance). Same selectors as the
   restoration layer, placed later with body-class specificity so they
   win cleanly. Soft reuses mobile-scale halos; Maximum goes full Vegas.
   ===================================================================== */
body.neon-soft .nav-link,
body.neon-soft nav .nav-link {
    text-shadow: 0 0 1px rgba(255,255,255,0.8), 0 0 3px currentColor, 0 0 7px currentColor, 0 0 12px currentColor !important;
}
body.neon-soft .page-title,
body.neon-soft h1.neon-text, body.neon-soft h2.neon-text,
body.neon-soft .section h2, body.neon-soft .section-title {
    text-shadow: 0 0 1px rgba(255,255,255,0.85), 0 0 4px currentColor, 0 0 10px currentColor, 0 0 20px currentColor !important;
}
body.neon-soft .card h3, body.neon-soft .explore-card h3 {
    text-shadow: 0 0 1px rgba(255,255,255,0.6), 0 0 3px currentColor, 0 0 8px currentColor !important;
}
body.neon-soft .logo-letter {
    text-shadow: 0 0 1px rgba(255,255,255,0.85), 0 0 4px currentColor, 0 0 9px currentColor, 0 0 16px currentColor;
}

body.neon-max .nav-link,
body.neon-max nav .nav-link {
    text-shadow: 0 0 2px rgba(255,255,255,1), 0 0 6px currentColor, 0 0 14px currentColor, 0 0 30px currentColor, 0 0 55px currentColor !important;
}
body.neon-max .page-title,
body.neon-max h1.neon-text, body.neon-max h2.neon-text,
body.neon-max .section h2, body.neon-max .section-title {
    text-shadow: 0 0 2px rgba(255,255,255,1), 0 0 8px currentColor, 0 0 22px currentColor, 0 0 45px currentColor, 0 0 80px currentColor !important;
}
body.neon-max .card h3, body.neon-max .explore-card h3 {
    text-shadow: 0 0 1px rgba(255,255,255,0.85), 0 0 6px currentColor, 0 0 14px currentColor, 0 0 28px currentColor !important;
}
body.neon-max .logo-letter {
    text-shadow: 0 0 2px rgba(255,255,255,1), 0 0 8px currentColor, 0 0 20px currentColor, 0 0 40px currentColor, 0 0 64px currentColor;
}

/* Breathing toggle (admin > Appearance) */
body.no-breathe .page-title,
body.no-breathe h1.neon-text, body.no-breathe h2.neon-text,
body.no-breathe .section h2, body.no-breathe .section-title {
    animation: none !important;
}

/* ===== MOBILE: absolution & inline input+button rows ===== */
@media (max-width: 600px) {
    /* The "Dollar Value You Rugged" row: stack input above its button */
    #absolution .mb15 > div[style*="display: flex"],
    #absolution div[style*="display: flex"][style*="flex-wrap: wrap"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    /* Inputs and buttons in those rows go full width, no min-width squeeze */
    .x240 {
        min-width: 0 !important;
        width: 100% !important;
    }
    #absolution .buy-button {
        min-width: 0 !important;
        width: 100% !important;
    }
    /* Lottery daily/weekly buy buttons: stack on very narrow screens */
    #lotto .mb20 > div[style*="display: flex"][style*="flex-wrap: wrap"] {
        flex-direction: column !important;
    }
}

/* Stake donut: stack svg above legend on narrow screens */
@media (max-width: 480px) {
    #stake-donut-wrap { flex-direction: column !important; gap: 16px !important; }
    #stake-donut-legend { flex-basis: 100% !important; width: 100%; max-width: 280px; }
}

/* ============================================
   ACCESSIBILITY: visible keyboard focus.
   :focus-visible only shows for keyboard nav (not mouse clicks),
   so it adds a clear focus ring for a11y without changing the
   look for mouse users or disturbing the neon aesthetic.
   ============================================ */
:focus-visible {
    outline: 3px solid #22d3ee !important;
    outline-offset: 2px !important;
    border-radius: 4px;
}
.nav-link:focus-visible,
.buy-button:focus-visible,
.wallet-option:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid #22d3ee !important;
    outline-offset: 2px !important;
}
/* Remove the default ring ONLY when focus came from a pointer */
:focus:not(:focus-visible) {
    outline: none;
}
/* Section focus (set programmatically on navigation) shouldn't show a ring */
.section:focus,
.section:focus-visible {
    outline: none !important;
}

/* ============================================
   ACCESSIBILITY: skip-to-content link.
   Visually hidden until it receives keyboard focus, then it
   appears at the top-left so keyboard users can jump past the nav.
   ============================================ */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200000;
    background: #22d3ee;
    color: #0a0a0a;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 0 0 10px 0;
    text-decoration: none;
}
.skip-link:focus {
    left: 0;
    outline: 3px solid #fff;
}

/* ============================================
   MOBILE: WCAG 44x44 minimum tap targets.
   Applies only on touch-sized viewports so desktop density is unchanged.
   ============================================ */
@media (max-width: 768px) {
    .nav-link,
    .buy-button,
    .wallet-option,
    .lock-option,
    #mobile-menu-btn,
    #mobile-menu-close-btn,
    #connect-btn,
    .admin-section summary,
    .admin-tool-btn {
        min-height: 44px;
        min-width: 44px;
    }
    /* Ensure the tap target is comfortably centered, not cramped */
    .nav-link,
    .wallet-option,
    .lock-option {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    /* Number/text inputs in the admin panel + forms: easier to tap */
    .dev-input,
    .dev-input-sm,
    input[type="number"],
    input[type="text"],
    select {
        min-height: 44px;
    }
}

/* ============================================
   VERY SMALL SCREENS (iPhone SE, older Android, <=360px):
   extra breathing room so cards/buttons don't feel cramped.
   ============================================ */
@media (max-width: 360px) {
    /* ---- Consolidated very-small-screen polish (≤360px) ---- */
    /* Cards: generous internal padding + breathing room between cards */
    .card,
    .explore-card {
        padding: 18px 16px !important;
        margin-bottom: 18px;
    }
    .card h3,
    .explore-card h3 {
        font-size: 15.5px !important;
        margin-bottom: 10px !important;
    }

    /* Tap targets: buttons + selectable options get comfortable size */
    .buy-button,
    .wallet-option,
    .lock-option {
        padding: 14px 16px !important;
        font-size: 14px !important;
        min-height: 48px; /* stronger tap target on tiny screens */
    }

    /* Lock-period grid: more gap so the 6 options don't feel packed */
    #lock-period-options {
        gap: 12px !important;
    }

    /* Mobile menu links: slightly more padding on the smallest screens */
    #mobile-menu .nav-link {
        padding: 15px 18px;
        font-size: 15px;
    }

    /* Absolution: the $ value input is .x240; widen it to full width on tiny
       screens so it doesn't get squeezed next to the Calculate button */
    .x240 {
        width: 100% !important;
        min-width: 0 !important;
        margin-bottom: 4px !important;
    }

    /* Admin panel: space out fields/buttons inside expanded <details> */
    details[open] input,
    details[open] button {
        margin-bottom: 10px !important;
    }

    /* Generic number/text inputs: comfortable height on tiny screens */
    input[type="text"],
    input[type="number"] {
        padding: 12px 14px !important;
    }
}

/* ============ Lottery winning-ticket glow (gold/green/blue by draw type) ============ */
@keyframes winnerPulseGold { 0%,100%{box-shadow:0 0 8px rgba(251,191,36,.6),inset 0 0 6px rgba(251,191,36,.3);} 50%{box-shadow:0 0 22px rgba(251,191,36,1),inset 0 0 12px rgba(251,191,36,.5);} }
@keyframes winnerPulseGreen { 0%,100%{box-shadow:0 0 8px rgba(34,197,94,.6),inset 0 0 6px rgba(34,197,94,.3);} 50%{box-shadow:0 0 22px rgba(34,197,94,1),inset 0 0 12px rgba(34,197,94,.5);} }
@keyframes winnerPulseBlue { 0%,100%{box-shadow:0 0 8px rgba(14,165,233,.6),inset 0 0 6px rgba(14,165,233,.3);} 50%{box-shadow:0 0 22px rgba(14,165,233,1),inset 0 0 12px rgba(14,165,233,.5);} }
.winner-row-gold  td { background:#3a2e08 !important; color:#fde68a !important; font-weight:bold; animation:winnerPulseGold 1.6s ease-in-out infinite; }
.winner-row-green td { background:#06301c !important; color:#86efac !important; font-weight:bold; animation:winnerPulseGreen 1.6s ease-in-out infinite; }
.winner-row-blue  td { background:#04293a !important; color:#7dd3fc !important; font-weight:bold; animation:winnerPulseBlue 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce){ .winner-row-gold td,.winner-row-green td,.winner-row-blue td{ animation:none; } }

/* ===== 5-NUMBER LOTTERY DRAW SPINNER (gold/green theme) ===== */
.lotto-reel {
    width: 64px; height: 84px;
    border-radius: 12px;
    background: linear-gradient(180deg, #0a2a14 0%, #06200f 100%);
    border: 2px solid #fbbf24;
    box-shadow: inset 0 0 14px rgba(0,0,0,0.6), 0 0 10px rgba(251,191,36,0.25);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative;
}
.lotto-reel span {
    font-size: 34px; font-weight: 800;
    color: #fde68a;
    text-shadow: 0 0 8px rgba(251,191,36,0.6);
    font-variant-numeric: tabular-nums;
}
.lotto-reel.spinning span { animation: reelSpin 0.09s linear infinite; }
.lotto-reel.landed {
    border-color: #22c55e;
    box-shadow: inset 0 0 14px rgba(0,0,0,0.5), 0 0 16px rgba(34,197,94,0.55);
}
.lotto-reel.landed span { color: #86efac; text-shadow: 0 0 10px rgba(34,197,94,0.7); }
@keyframes reelSpin {
    0%   { transform: translateY(-6px); opacity: 0.5; }
    50%  { transform: translateY(0);    opacity: 1;   }
    100% { transform: translateY(6px);  opacity: 0.5; }
}
@media (prefers-reduced-motion: reduce){
    .lotto-reel.spinning span { animation: none; }
}
