/* --- RESET & VARIABLES --- */
:root {
    --bg-color: #050505;
    --terminal-bg: #0a0a0a;
    --neon-green: #39ff14;
    --neon-blue: #00f3ff;
    --neon-pink: #ff0099;
    --neon-red: #ff3131;
    --cyber-yellow: #fcee0a;
    --text-color: #e0e0e0;
    --pixel-font: 'Press Start 2P', cursive;
    --section-spacing: 40px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--pixel-font);
    font-size: 11px;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
}

/* --- UTILITIES & EFFECTS --- */
.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
}

.full-width {
    width: 100%;
    display: block;
}

/* CRT Scanline Overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 999;
    opacity: 0.3;
}

/* Cyberpunk Box Style */
.cyberpunk-box {
    background-color: var(--terminal-bg);
    border: 2px solid var(--neon-blue);
    padding: 20px;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
    max-width: 100%;
    overflow: hidden;
}

.cyberpunk-box::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px;
    width: 10px; height: 10px;
    border-top: 2px solid var(--neon-green);
    border-left: 2px solid var(--neon-green);
}
.cyberpunk-box::after {
    content: '';
    position: absolute;
    bottom: -2px; right: -2px;
    width: 10px; height: 10px;
    border-bottom: 2px solid var(--neon-green);
    border-right: 2px solid var(--neon-green);
}

/* Buttons */
.cyber-button {
    font-family: var(--pixel-font);
    background: var(--terminal-bg);
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    padding: 10px 20px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cyber-button:hover {
    background: var(--neon-green);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--neon-green);
}

/* --- HEADER --- */
.cyber-header {
    padding: 20px 0;
    border-bottom: 3px solid var(--neon-blue);
    margin-bottom: var(--section-spacing);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.brand-section {
    flex-shrink: 0;
}

.header-gif {
    width: 280px;
    height: auto;
    border: 2px solid var(--neon-pink);
    cursor: pointer;
    image-rendering: pixelated;
    transition: filter 0.3s;
    max-width: 100%;
}

.header-gif:hover {
    filter: brightness(1.2) drop-shadow(0 0 10px var(--neon-pink));
}

.header-right-side {
    display: flex;
    flex-grow: 1;
    gap: 20px;
    align-items: stretch;
}

.project-display {
    flex-grow: 2;
    border-color: var(--neon-pink);
}

.display-screen {
    background-color: rgba(0,0,0,0.5);
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.terminal-text {
    color: var(--neon-green);
    font-size: 0.75rem;
    margin-bottom: 8px;
    height: 1.2rem;
    overflow: hidden;
}

.static-line {
    color: var(--neon-blue);
    opacity: 0.8;
}

.status-controls {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-width: 200px;
}

.system-status {
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.status-light.online {
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
    animation: pulse 2s infinite;
}

.icon-button span {
    font-size: 24px;
    line-height: 1;
}

/* --- HERO FIGHT --- */
.hero-fight {
    margin-bottom: var(--section-spacing);
    border: 2px solid var(--neon-red);
    overflow: hidden;
    padding: 20px;
    background: rgba(0,0,0,0.5);
}

.fight-gif {
    width: 100%;
    height: auto;
    object-fit: contain; 
    image-rendering: pixelated;
    display: block;
    margin: 0 auto;
    max-width: 100%;
    cursor: pointer;
}

/* --- BRAND & SOCIAL ROW --- */
.brand-social-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--section-spacing);
    gap: 20px;
}

.brand-footer-style h1 {
    font-size: 2rem;
    color: var(--neon-green);
    text-shadow: 3px 3px var(--neon-pink);
    margin: 0;
}

.social-bar {
    flex-grow: 1;
    max-width: 400px;
}

.flicker-box {
    border-color: var(--cyber-yellow);
    width: 100%;
}

.social-icons {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.social-svg, .social-img {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 0 10px var(--neon-blue));
    transition: transform 0.2s, filter 0.2s;
}

.social-icon:hover .social-svg,
.social-icon:hover .social-img {
    transform: scale(1.2);
    filter: drop-shadow(0 0 20px var(--neon-blue));
}

/* --- DASHBOARD GRID --- */
.main-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 20px;
    margin-bottom: 20px;
}

.panel-title {
    font-size: 1rem;
    color: var(--cyber-yellow);
    margin-bottom: 15px;
    border-bottom: 2px dashed var(--neon-blue);
    padding-bottom: 5px;
}

.log-terminal {
    height: 350px;
    overflow-y: auto;
    background: rgba(0,0,0,0.7);
    padding: 10px;
    font-size: 0.7rem;
    border: 1px solid var(--neon-green);
}

.log-entry { margin-bottom: 8px; color: var(--neon-green); font-family: monospace; }
.log-time { color: var(--neon-blue); margin-right: 5px;}
.log-highlight { color: var(--cyber-yellow); }
.log-danger { color: var(--neon-red); }

.hologram-display {
    text-align: center;
    position: relative;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 243, 255, 0.05);
    overflow: hidden;
    cursor: pointer;
}

#random-bunny-display {
    max-width: 85%;
    max-height: 85%;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 15px var(--neon-blue));
}

/* --- NEW GALLERY BLOCK --- */
.unit-gallery-row {
    margin-bottom: var(--section-spacing);
}

.mini-previews-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    padding: 10px 0;
}

.mini-gif {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid var(--neon-blue);
    background: #000;
    cursor: pointer;
    image-rendering: pixelated;
    transition: all 0.2s;
    object-fit: cover;
}

.mini-gif:hover {
    border-color: var(--neon-pink);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 0, 153, 0.4);
}

.mini-gif.active {
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

/* --- LEADERBOARD --- */
.table-container { height: 320px; overflow-y: auto; }
.cyber-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.cyber-table th { color: var(--neon-pink); padding: 10px 5px; border-bottom: 1px solid var(--neon-blue); text-align: left; }
.cyber-table td { padding: 10px 5px; border-bottom: 1px dotted var(--neon-blue); }
.rank-up { color: var(--neon-green); }
.rank-down { color: var(--neon-red); }
.market-ticker { margin-top: 10px; font-size: 0.75rem; text-align: right; color: var(--neon-blue); }

/* --- CONTRACT & BUY --- */
.contract-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    align-items: center;
    margin-bottom: var(--section-spacing);
}

.hidden-gif { width: 100%; max-width: 250px; image-rendering: pixelated; opacity: 0.8; cursor: pointer; }
.contract-info h2 { font-size: 1.2rem; color: var(--neon-pink); margin-bottom: 15px; }
.address-box {
    background: rgba(0,0,0,0.5);
    padding: 15px;
    border: 1px solid var(--neon-blue);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}
.address-box code { font-family: monospace; color: var(--neon-green); font-size: 0.8rem; }
.buy-button {
    background: var(--neon-red);
    color: white;
    border-color: var(--neon-red);
    font-size: 1.5rem;
    width: 100%;
    padding: 15px;
    text-align: center;
}

/* --- FOOTER --- */
.cyber-footer { padding: 30px 0; background: var(--terminal-bg); border-top: 3px solid var(--neon-blue); text-align: center; font-size: 0.7rem; color: #888; }
.footer-links a { color: var(--neon-blue); text-decoration: none; margin: 0 10px; }
.separator { color: var(--neon-pink); }
.disclaimer { font-size: 0.6rem; opacity: 0.6; max-width: 800px; margin: 20px auto 0; }

/* --- ANIMATIONS --- */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes scanDown { 0% { top: -10%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.scan-effect { position: absolute; top: 0; left: 0; width: 100%; height: 8px; background: rgba(0, 243, 255, 0.4); box-shadow: 0 0 15px var(--neon-blue); animation: scanDown 4s linear infinite; }
.blinking-cursor { animation: pulse 0.8s infinite step-end; }

/* --- MOBILE ADAPTATION --- */
@media (max-width: 1100px) {
    .header-content { flex-direction: column; align-items: center; }
    .header-right-side { width: 100%; flex-direction: column; }
    .header-gif { width: 200px; }
    .main-layout-grid { grid-template-columns: 1fr 1fr; }
    .leaderboard-panel { grid-column: span 2; }
    .mini-previews-container { grid-template-columns: repeat(3, 1fr); }
    .brand-social-row { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
    .main-layout-grid { grid-template-columns: 1fr; }
    .leaderboard-panel { grid-column: span 1; }
    .contract-section { grid-template-columns: 1fr; text-align: center; }
    .address-box { flex-direction: column; }
    .brand-footer-style h1 { font-size: 1.5rem; }
    .cyberpunk-box { padding: 15px; }
    .arena-vs { font-size: 0.9rem; word-break: break-word; }
}

/* --- АДАПТИВНЫЙ ARENA TITLE BAR --- */
.arena-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    margin-bottom: 15px;
    font-size: 1rem;
    text-transform: uppercase;
    flex-wrap: wrap;
    gap: 10px;
}

.arena-left {
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
}

.arena-vs {
    color: var(--neon-red);
    text-shadow: 0 0 15px var(--neon-red);
    font-size: 1.2rem;
    text-align: center;
    flex-basis: 100%;
    order: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-indicator {
    color: var(--cyber-yellow);
    animation: pulse 1.5s infinite;
    margin: 0 10px;
}

.arena-right {
    color: var(--neon-blue);
}

@media (max-width: 768px) {
    .arena-title-bar {
        flex-direction: column;
        text-align: center;
        font-size: 0.8rem;
    }
    .arena-vs {
        font-size: 1rem;
        order: 1;
    }
    .arena-left, .arena-right {
        font-size: 0.9rem;
    }
}

.glitch-pulse {
    color: var(--neon-red);
    animation: pulse 1s infinite;
    display: inline-block;
    margin-left: 10px;
}