/* Unified Theme and Layout Tokens */
:root {
    --deep-black: #020503;
    --acid-green: #A3FF00;
    --safety-orange: #FF8C00;
    --terminal-gray: #808A7D;
    --surface-container: rgba(31, 32, 30, 0.7);
    --surface-transparent: rgba(19, 20, 18, 0.6);
    --outline: rgba(141, 146, 140, 0.2);
    --outline-variant: #434843;
}

body {
    background-color: var(--deep-black);
    color: #e4e2e0;
    font-family: 'Roboto Mono', monospace;
    overflow-x: hidden;
    background-image: 
        linear-gradient(rgba(163, 255, 0, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(163, 255, 0, 0.01) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Glassmorphic Panels */
.glass-panel, .bento-card {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: var(--surface-transparent);
    border: 1px solid var(--outline);
    border-radius: 0px !important; /* Aggressively geometric sharp corners */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover, .bento-card:hover {
    border-color: var(--acid-green);
    box-shadow: 0 0 20px rgba(163, 255, 0, 0.15), inset 0 0 10px rgba(163, 255, 0, 0.08);
}

/* 3D Bento hover perspective classes */
.bento-perspective {
    perspective: 1000px;
}

/* HUD Corner Brackets */
.bracket-corner {
    position: relative;
}

.bracket-corner::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--acid-green);
    border-left: 2px solid var(--acid-green);
    pointer-events: none;
    z-index: 10;
}

.bracket-corner::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid var(--acid-green);
    border-right: 2px solid var(--acid-green);
    pointer-events: none;
    z-index: 10;
}

/* Segmented progress bars (population indicators) */
.segmented-progress {
    display: flex;
    gap: 3px;
    width: 100%;
}

.progress-block {
    height: 6px;
    flex: 1;
    background: var(--outline-variant);
    transition: all 0.4s ease;
}

.progress-block.active {
    background: var(--acid-green);
    box-shadow: 0 0 5px var(--acid-green);
}

.progress-block.active-orange {
    background: var(--safety-orange);
    box-shadow: 0 0 5px var(--safety-orange);
}

/* Blinking Cursor Indicator */
.terminal-cursor::after {
    content: '_';
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Neon Text Glow */
.terminal-glow {
    text-shadow: 0 0 8px rgba(163, 255, 0, 0.4);
}

/* Custom details-summary animations for Rules accordions */
details[open] summary .expand-icon {
    transform: rotate(180deg);
}

details {
    overflow: hidden;
}

details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

.accordion-content {
    transition: max-height 0.4s ease-out, opacity 0.3s ease;
    opacity: 0;
    max-height: 0;
}

details[open] + .accordion-content {
    opacity: 1;
    max-height: 500px;
}

/* Layout Padding constraints */
.content-max-width {
    max-width: 1440px;
    width: 100%;
}

/* Glassmorphic Slide Drawer (Mobile nav) */
.mobile-drawer {
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(2, 5, 3, 0.95);
    backdrop-filter: blur(20px);
}

.mobile-drawer.open {
    transform: translateX(0);
}
