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

:root {
    --bg-overlay: linear-gradient(135deg, rgba(8, 18, 28, 0.78), rgba(8, 56, 72, 0.56));
    --panel-bg: rgba(255, 255, 255, 0.13);
    --panel-border: rgba(255, 255, 255, 0.3);
    --text-main: #f7fbff;
    --text-sub: #d3e5f7;
    --btn-off: linear-gradient(145deg, #274958, #1f3844);
    --btn-on: linear-gradient(145deg, #28a68f, #35c59f);
    --on-glow: rgba(60, 238, 180, 0.5);
}

body {
    min-height: 100vh;
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-main);
    background: url(../static/classcpp2.jpg) no-repeat center/cover fixed;
}

.page {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.backdrop {
    position: absolute;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
}

.panel {
    position: relative;
    width: min(980px, 100%);
    border-radius: 22px;
    border: 1px solid var(--panel-border);
    background: var(--panel-bg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    padding: 28px;
    animation: panel-in 0.55s ease;
}

.header {
    text-align: center;
    margin-bottom: 22px;
}

.kicker {
    letter-spacing: 0.22em;
    font-size: 12px;
    color: #b9d5ea;
    margin-bottom: 10px;
}

.header h1 {
    font-size: clamp(26px, 5vw, 42px);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-sub);
    font-size: 15px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.light-btn {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    padding: 18px 14px;
    color: #fff;
    cursor: pointer;
    background: var(--btn-off);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.14), 0 8px 18px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
    animation: tile-in 0.45s ease both;
}

.light-btn:nth-child(1) { animation-delay: 0.05s; }
.light-btn:nth-child(2) { animation-delay: 0.11s; }
.light-btn:nth-child(3) { animation-delay: 0.17s; }
.light-btn:nth-child(4) { animation-delay: 0.23s; }
.light-btn:nth-child(5) { animation-delay: 0.29s; }
.light-btn:nth-child(6) { animation-delay: 0.35s; }

.light-btn::after {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.24), transparent 55%);
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.25s ease;
}

.light-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.07);
}

.light-btn:hover::after {
    opacity: 0.25;
}

.light-btn:active {
    transform: translateY(-1px) scale(0.99);
}

.light-btn.is-on {
    background: var(--btn-on);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 10px 22px rgba(31, 190, 155, 0.36), 0 0 0 1px rgba(255, 255, 255, 0.18);
    animation: tile-in 0.45s ease both, glow 2s ease-in-out infinite;
}

.name {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.state {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 13px;
    opacity: 0.92;
}

.footer {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-sub);
    font-size: 14px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot.ok {
    background: #4ef0a6;
    box-shadow: 0 0 0 4px rgba(78, 240, 166, 0.2);
}

.dot.err {
    background: #ff7070;
    box-shadow: 0 0 0 4px rgba(255, 112, 112, 0.2);
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .panel {
        padding: 20px;
        border-radius: 16px;
    }

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

    .name {
        font-size: 18px;
    }
}

@keyframes panel-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes tile-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    0% {
        box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 10px 22px rgba(31, 190, 155, 0.30), 0 0 0 0 var(--on-glow);
    }
    60% {
        box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 10px 22px rgba(31, 190, 155, 0.42), 0 0 0 10px rgba(60, 238, 180, 0);
    }
    100% {
        box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 10px 22px rgba(31, 190, 155, 0.30), 0 0 0 0 rgba(60, 238, 180, 0);
    }
}
