@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Cinzel:wght@400;700&display=swap');

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

html, body {
    min-height: 100%;
    font-family: 'Press Start 2P', monospace;
    color: #fff;
    background: #050a20;
}

body {
    background:
            radial-gradient(1px 1px at 20% 30%, #fff, transparent),
            radial-gradient(1px 1px at 60% 70%, #fff, transparent),
            radial-gradient(1px 1px at 80% 10%, #fff, transparent),
            radial-gradient(1px 1px at 40% 90%, #fff, transparent),
            radial-gradient(2px 2px at 10% 60%, #aaddff, transparent),
            radial-gradient(1px 1px at 90% 50%, #fff, transparent),
            radial-gradient(1px 1px at 55% 20%, #ffeedd, transparent),
            radial-gradient(1px 1px at 30% 80%, #fff, transparent),
            radial-gradient(2px 2px at 70% 40%, #ccddff, transparent),
            radial-gradient(1px 1px at 5% 5%, #fff, transparent),
            #050a20;
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---- Общий «диалог» FF ---- */
.panel {
    width: min(92vw, 820px);
    padding: 4px;
    background: linear-gradient(180deg, #5a6fc4 0%, #3a4a9a 40%, #2a3570 100%);
    border-radius: 10px;
    box-shadow:
            0 0 0 3px #0a0f2a,
            0 0 0 6px #7d92e0,
            0 0 40px rgba(120, 160, 255, 0.5),
            inset 0 0 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 30px;
    position: relative;
}

.panel-inner {
    background: linear-gradient(180deg, #1a2560 0%, #0d1440 100%);
    border: 2px solid #aabaff;
    border-radius: 6px;
    padding: 36px 44px;
    position: relative;
}

.panel-inner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(140,170,255,0.12), transparent);
    pointer-events: none;
    border-radius: 6px 6px 0 0;
}

.corner {
    position: absolute;
    width: 14px; height: 14px;
    border: 3px solid #c8d4ff;
    z-index: 11;
}
.corner.tl { top: 8px; left: 8px; border-right: none; border-bottom: none; border-radius: 4px 0 0 0; }
.corner.tr { top: 8px; right: 8px; border-left: none; border-bottom: none; border-radius: 0 4px 0 0; }
.corner.bl { bottom: 8px; left: 8px; border-right: none; border-top: none; border-radius: 0 0 0 4px; }
.corner.br { bottom: 8px; right: 8px; border-left: none; border-top: none; border-radius: 0 0 4px 0; }

/* ---- Типографика ---- */
h1.title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-align: center;
    font-size: clamp(18px, 3.2vw, 32px);
    letter-spacing: 3px;
    color: #eaf0ff;
    text-shadow:
            0 0 10px rgba(150,190,255,0.9),
            0 0 20px rgba(100,150,255,0.6),
            2px 2px 0 #0a0f2a;
    margin-bottom: 22px;
    line-height: 1.4;
}
h1.title .accent {
    color: #ffe9a8;
    text-shadow:
            0 0 10px rgba(255,220,130,0.9),
            0 0 20px rgba(255,190,80,0.6),
            2px 2px 0 #0a0f2a;
}
.subtitle {
    font-family: 'Cinzel', serif;
    text-align: center;
    font-size: clamp(11px, 1.5vw, 15px);
    color: #a9b8ff;
    letter-spacing: 1px;
    margin-bottom: 28px;
}
.text {
    font-size: clamp(9px, 1.15vw, 12px);
    line-height: 2;
    color: #d8e2ff;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 18px;
}
.text.center { text-align: center; }
.text .gold { color: #ffe9a8; text-shadow: 0 0 6px rgba(255,220,130,0.7), 2px 2px 0 #000; }

/* ---- Меню ---- */
.menu {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
}
.menu-item {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(8px, 1.1vw, 11px);
    padding: 12px 20px;
    color: #b0c0ff;
    background: rgba(20,30,80,0.6);
    border: 2px solid #4a5cb0;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    text-shadow: 1px 1px 0 #000;
    position: relative;
    text-decoration: none;
    display: inline-block;
}
.menu-item:hover, .menu-item.active {
    color: #fff;
    background: rgba(60,90,200,0.8);
    border-color: #ffe9a8;
    box-shadow: 0 0 15px rgba(255,220,130,0.6);
    transform: translateY(-2px);
}
.menu-item::before {
    content: '►';
    position: absolute;
    left: -18px;
    opacity: 0;
    color: #ffe9a8;
    transition: opacity 0.2s;
}
.menu-item:hover::before, .menu-item.active::before { opacity: 1; }

/* ---- Таблица статуса ---- */
.stat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(8px, 1.1vw, 11px);
    margin-top: 10px;
}
.stat-table th, .stat-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px dashed #3a4a9a;
    text-shadow: 1px 1px 0 #000;
}
.stat-table th {
    color: #ffe9a8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: clamp(7px, 1vw, 10px);
}
.stat-table td { color: #d8e2ff; }
.stat-table tr:last-child td { border-bottom: none; }

.status-ok { color: #7dff9a !important; text-shadow: 0 0 8px rgba(120,255,150,0.7), 1px 1px 0 #000; }
.status-warn { color: #ffe9a8 !important; text-shadow: 0 0 8px rgba(255,220,130,0.7), 1px 1px 0 #000; }
.status-bad { color: #ff8a8a !important; text-shadow: 0 0 8px rgba(255,120,120,0.7), 1px 1px 0 #000; }

/* ---- Кристалл ---- */
.crystal-wrap {
    display: flex;
    justify-content: center;
    margin: 10px 0 24px;
}
.crystal-wrap svg {
    width: 70px;
    height: 100px;
    filter: drop-shadow(0 0 20px rgba(120,200,255,0.9))
    drop-shadow(0 0 40px rgba(80,160,255,0.5));
    animation: float 4s ease-in-out infinite, glow 2.5s ease-in-out infinite alternate;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@keyframes glow {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* ---- Курсор ---- */
.cursor {
    display: inline-block;
    width: 0.6em; height: 1em;
    background: #ffe9a8;
    vertical-align: middle;
    margin-left: 4px;
    animation: blink 1s steps(2) infinite;
    box-shadow: 0 0 8px rgba(255,220,130,0.8);
}
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ---- Футер ---- */
.footer {
    margin-top: auto;
    padding: 16px 0 6px;
    text-align: center;
    font-size: 8px;
    color: #5566aa;
    text-shadow: 1px 1px 0 #000;
    letter-spacing: 2px;
    line-height: 2;
}
.footer a { color: #7d92e0; text-decoration: none; }
.footer a:hover { color: #ffe9a8; }

/* ---- Падающие искры ---- */
.spark {
    position: fixed;
    width: 2px; height: 2px;
    background: #aaccff;
    border-radius: 50%;
    box-shadow: 0 0 6px #aaccff;
    animation: fall linear infinite;
    z-index: 1;
    pointer-events: none;
}
@keyframes fall {
    from { transform: translateY(-10vh); opacity: 1; }
    to   { transform: translateY(110vh); opacity: 0; }
}

@media (max-width: 600px) {
    .panel-inner { padding: 26px 20px; }
    .stat-table th, .stat-table td { padding: 8px 5px; }
}