/* Cache Nuke Button — style.css — Military Terminal Theme */

:root {
    --bg: #080A05;
    --surface: #0D110A;
    --surface2: #131A10;
    --border: #1F2E1A;
    --red: #EF4444;
    --red2: #FCA5A5;
    --yellow: #F59E0B;
    --green: #22C55E;
    --green2: #86EFAC;
    --orange: #F97316;
    --text: #BACC9E;
    --muted: #4B6035;
    --mono: 'Share Tech Mono', 'Courier New', monospace;
    --hdr: 'Rajdhani', sans-serif;
}

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

html,
body {
    height: 100%;
}

body {
    background: var(--bg);
    background-image: repeating-linear-gradient(0deg, transparent, transparent 30px, rgba(255, 255, 255, 0.015) 30px, rgba(255, 255, 255, 0.015) 31px);
    color: var(--text);
    font-family: var(--mono);
    font-size: 12px;
    height: 100%;
    overflow: hidden;
}

.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ── Header ──────────────────────────────────────────── */
.app-header {
    flex-shrink: 0;
    border-bottom: 2px solid var(--red);
}

.caution-bar {
    background: repeating-linear-gradient(45deg, var(--yellow) 0 14px, #0D0D00 14px 28px);
    height: 10px;
    animation: caution-scroll 8s linear infinite;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0;
}

@keyframes caution-scroll {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 80px 0;
    }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 20px;
    text-align: center;
}

.skull {
    font-size: 2rem;
    text-shadow: 0 0 12px var(--red);
}

.main-title {
    font-family: var(--hdr);
    font-size: 2rem;
    font-weight: 700;
    color: var(--red);
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.5), 0 0 40px rgba(239, 68, 68, 0.2);
    letter-spacing: 0.08em;
    line-height: 1;
}

.subtitle {
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.12em;
    margin-top: 4px;
}

/* ── Main ────────────────────────────────────────────── */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 240px 1fr 280px;
    min-height: 0;
    overflow: hidden;
}

/* ── Panels ──────────────────────────────────────────── */
.left-panel,
.right-panel {
    padding: 12px;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.right-panel {
    border-right: none;
    border-left: 1px solid var(--border);
}

.panel-title {
    font-size: 0.7rem;
    color: var(--green);
    letter-spacing: 0.1em;
    font-weight: 600;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.divider {
    border-top: 1px solid var(--border);
    margin: 4px 0;
}

/* Storage report */
.storage-report {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sr-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
}

.sr-name {
    color: var(--muted);
}

.sr-size {
    color: var(--green2);
}

.sr-bar-wrap {
    height: 3px;
    background: var(--surface2);
    border-radius: 2px;
    margin-top: 2px;
}

.sr-bar {
    height: 3px;
    background: var(--green);
    border-radius: 2px;
    transition: width 0.4s;
}

/* Targets list */
.targets-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.target-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    background: var(--surface2);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.2s;
}

.target-item:hover {
    border-color: var(--red);
}

.target-item.active {
    border-color: var(--red);
}

.target-cb {
    accent-color: var(--red);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.target-nm {
    font-size: 0.7rem;
    color: var(--text);
    flex: 1;
}

.target-st {
    font-size: 0.62rem;
}

.target-st.ok {
    color: var(--green);
}

.target-st.err {
    color: var(--red);
}

/* History log */
.history-log {
    font-size: 0.65rem;
    color: var(--muted);
    overflow-y: auto;
    max-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.log-entry {
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.log-from-ts {
    color: #3A5028;
    font-size: 0.6rem;
}

.log-empty {
    color: #2A3A1E;
    font-size: 0.65rem;
}

/* ── Centre: Button ──────────────────────────────────── */
.button-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
}

.button-label-top,
.button-label-bot {
    font-family: var(--hdr);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--yellow);
    text-align: center;
}

/* Button housing / rings */
.button-housing {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(239, 68, 68, 0.2);
    animation: ring-pulse 2s ease-in-out infinite;
}

.ring-outer {
    width: 220px;
    height: 220px;
    animation-delay: 0s;
}

.ring-mid {
    width: 180px;
    height: 180px;
    animation-delay: 0.3s;
}

.ring-inner {
    width: 140px;
    height: 140px;
    animation-delay: 0.6s;
}

@keyframes ring-pulse {

    0%,
    100% {
        border-color: rgba(239, 68, 68, 0.15);
    }

    50% {
        border-color: rgba(239, 68, 68, 0.5);
    }
}

.nuke-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #991B1B, #450A0A);
    border: 4px solid var(--red);
    cursor: pointer;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.4), 0 0 60px rgba(239, 68, 68, 0.15), inset 0 0 20px rgba(0, 0, 0, 0.5);
    transition: all 0.15s;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.nuke-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.7), 0 0 80px rgba(239, 68, 68, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.nuke-btn:active {
    transform: scale(0.96);
}

.nuke-label {
    font-family: var(--hdr);
    font-size: 1.6rem;
    font-weight: 700;
    color: #FF6B6B;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.8);
    line-height: 1;
}

.nuke-sub {
    font-size: 0.5rem;
    color: rgba(255, 107, 107, 0.5);
    letter-spacing: 0.1em;
}

.kbd-hint {
    font-size: 0.65rem;
    color: var(--muted);
    text-align: center;
}

kbd {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 5px;
    font-family: var(--mono);
    font-size: 0.65rem;
}

/* Before/After */
.ab-compare {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    width: 100%;
}

.ab-compare.hidden {
    display: none;
}

.ab-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.ab-label {
    font-size: 0.68rem;
    color: var(--muted);
}

.ab-val {
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--mono);
}

.ab-before {
    color: var(--orange);
}

.ab-after {
    color: var(--green);
}

.ab-freed {
    color: var(--red2);
}

/* ── Terminal ────────────────────────────────────────── */
.terminal {
    flex: 1;
    overflow-y: auto;
    background: #020402;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    font-size: 0.7rem;
    line-height: 1.7;
    color: var(--green2);
}

.term-line {}

.term-hl {
    color: var(--yellow);
}

.term-red {
    color: var(--red2);
}

.term-ok {
    color: var(--green);
}

.term-cursor {
    display: inline-block;
    animation: blink 1s step-end infinite;
    color: var(--green);
}

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

.action-btn {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 0.68rem;
    font-family: var(--mono);
    cursor: pointer;
    transition: all 0.15s;
}

.action-btn:hover {
    border-color: var(--green);
    color: var(--green2);
}

/* ── Explosion Overlay ───────────────────────────────── */
.explosion-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.explosion-overlay.hidden {
    display: none;
}

.explosion-ring {
    position: absolute;
    border-radius: 50%;
    background: transparent;
    border: 6px solid;
}

.r1 {
    border-color: var(--red);
    animation: explode 0.6s ease-out forwards;
    width: 50px;
    height: 50px;
}

.r2 {
    border-color: var(--orange);
    animation: explode 0.6s 0.1s ease-out forwards;
    width: 50px;
    height: 50px;
}

.r3 {
    border-color: var(--yellow);
    animation: explode 0.6s 0.2s ease-out forwards;
    width: 50px;
    height: 50px;
}

@keyframes explode {
    from {
        transform: scale(0);
        opacity: 1;
    }

    to {
        transform: scale(15);
        opacity: 0;
    }
}

.nuke-emoji {
    font-size: 4rem;
    z-index: 2;
    animation: nuke-pop 0.4s 0.15s ease-out both;
}

@keyframes nuke-pop {
    from {
        transform: scale(0) rotate(-20deg);
    }

    to {
        transform: scale(1) rotate(0);
    }
}

.nuke-text {
    position: absolute;
    bottom: 35%;
    z-index: 2;
    font-family: var(--hdr);
    font-size: 5rem;
    font-weight: 900;
    color: var(--red);
    letter-spacing: 0.12em;
    text-shadow: 0 0 20px var(--red), 0 0 60px var(--orange);
    animation: nuke-text-in 0.3s 0.3s ease-out both;
}

@keyframes nuke-text-in {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {

    body,
    .app {
        overflow: auto;
        height: auto;
    }

    .main-content {
        grid-template-columns: 1fr;
    }

    .button-panel {
        border: 1px solid var(--border);
        margin: 12px;
        border-radius: 8px;
    }

    .left-panel,
    .right-panel {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}