@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&display=swap');

:root {
    --bg-fade-dark: #020408;
    --bg-fade-light: #080f1a;
    --terminal-inner: #03070d;
    --neon-blue: #00f2fe;
    --neon-green: #00ff87;
    --neon-red: #ff0055;
    --neon-amber: #ffb300;
    --text-color: #a5c2eb;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Fira Code', monospace;
}

body {
    background: radial-gradient(circle, var(--bg-fade-light) 0%, var(--bg-fade-dark) 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 20px;
}

/* --- ROUNDED MAIN TERMINAL FRAME --- */
.terminal-frame {
    position: relative;
    width: 100%;
    max-width: 720px;
    height: 620px;
    background-color: var(--terminal-inner);
    border: 1px solid rgba(0, 242, 254, 0.15);
    border-radius: 16px;
    /* Smooth rounded body corners */
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 0 40px rgba(0, 0, 0, 0.9);
}

/* --- HIGH VISIBILITY ROUNDED PIECES --- */
.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid var(--neon-blue);
    z-index: 10;
    filter: drop-shadow(0 0 5px var(--neon-blue));
}

/* Aligned precisely to mirror the 16px border-radius curves */
.top-left {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 16px;
}

.top-right {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 16px;
}

.bottom-left {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 16px;
}

.bottom-right {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 16px;
}

/* --- INNER VIEWPORT MATRIX SCREEN --- */
.terminal-screen {
    width: 100%;
    height: 100%;
    padding: 30px;
    overflow-y: auto;
    position: relative;
}

/* --- SYSTEM LOG BOOT DISPLAY STREAM --- */
.stream-layout {
    font-size: 13px;
    line-height: 1.8;
    color: var(--neon-green);
    text-shadow: 0 0 6px rgba(0, 255, 135, 0.3);
    white-space: pre-wrap;
}

.stream-line {
    opacity: 0;
    transform: translateY(4px);
    animation: echoIn 0.2s ease forwards;
}

@keyframes echoIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- BANNER PANEL --- */
.banner-panel {
    margin-bottom: 15px;
}

.ascii-logo {
    font-size: 9.5px;
    color: var(--neon-blue);
    line-height: 1.15;
    text-align: center;
    font-weight: bold;
}

.subtitle {
    font-size: 11px;
    opacity: 0.35;
    text-align: center;
    margin-top: 6px;
    letter-spacing: 1px;
}

/* --- MENU MODULE CARD --- */
.menu-layout {
    margin-top: 10px;
}

.card-border-text {
    color: rgba(165, 194, 235, 0.2);
    font-size: 12px;
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    padding: 12px 16px;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.25s ease;
}

.menu-btn:hover {
    background: rgba(0, 242, 254, 0.08);
    border-color: var(--neon-blue);
    box-shadow: inset 0 0 8px rgba(0, 242, 254, 0.1);
    transform: translateX(4px);
}

.btn-num {
    color: var(--neon-green);
    font-weight: bold;
    margin-right: 8px;
}

.btn-desc {
    color: rgba(165, 194, 235, 0.4);
    font-size: 12px;
    float: right;
}

/* --- GAME HUD DASHBOARD --- */
.game-layout {
    display: flex;
    flex-direction: column;
    height: auto;
}

.stats-dashboard {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1.3fr;
    gap: 10px;
    font-size: 12px;
    border-bottom: 1px dashed rgba(0, 242, 254, 0.15);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

#hp-bar-container {
    display: inline-flex;
    width: 80px;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0 6px;
}

#hp-bar {
    height: 100%;
    width: 100%;
    transition: width 0.3s ease;
}

.amber-text {
    color: var(--neon-amber);
}

/* --- COMPACT RESPONSIVE GALLOWS DISPLAY --- */
.gallows-container {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.02);
    padding: 10px;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    max-height: 180px;
}

#gallows-art {
    color: var(--neon-blue);
    font-size: 11px;
    line-height: 1.25;
}

/* --- PROGRESS BLOCK --- */
.decrypt-section {
    margin-bottom: 15px;
}

.section-label {
    font-size: 11px;
    opacity: 0.4;
    margin-bottom: 4px;
}

.green-glow {
    color: var(--neon-green);
    font-size: 26px;
    letter-spacing: 5px;
    text-shadow: 0 0 8px rgba(0, 255, 135, 0.3);
}

/* --- CONSOLE SUB INPUT LINE --- */
.input-console {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.prompt {
    color: var(--neon-blue);
    font-weight: bold;
    font-size: 13px;
}

#console-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--neon-green);
    font-size: 14px;
    font-weight: bold;
    width: 100%;
}

.msg-log {
    margin-top: 10px;
    font-size: 12px;
    font-weight: bold;
}

/* --- SYSTEM GLOBAL UTILS --- */
.hidden {
    display: none !important;
}

.dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--neon-red);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--neon-red);
    margin-left: 4px;
    vertical-align: top;
}