* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
}

.hidden {
    display: none !important;
}

.page {
    width: min(1200px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 28px 0;
}

.header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 22px;
}

.simple-header h1 {
    margin: 0 0 8px;
    font-size: 34px;
    letter-spacing: 1px;
}

.simple-header p {
    margin: 0;
    color: #94a3b8;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.online-box {
    min-width: 120px;
    text-align: center;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #bae6fd;
    padding: 11px 16px;
    border-radius: 999px;
}

.online-box strong {
    color: #f8fafc;
    font-size: 20px;
}

input, textarea, button {
    font: inherit;
}

input, textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: #020617;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 11px 12px;
    outline: none;
}

input:focus, textarea:focus {
    border-color: #38bdf8;
}

button {
    border: 0;
    background: #38bdf8;
    color: #082f49;
    font-weight: 700;
    border-radius: 12px;
    padding: 11px 16px;
    cursor: pointer;
    white-space: nowrap;
}

button:hover {
    filter: brightness(1.05);
}

.ghost-btn {
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
}

.player-card, .comment-card {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.video-wrap {
    position: relative;
    background: #000;
    aspect-ratio: 16 / 9;
}

video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.video-tip {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    padding: 12px 16px;
    border-radius: 999px;
    font-size: 14px;
    pointer-events: none;
}

.comment-card {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 150px);
    min-height: 580px;
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.comment-header h2 {
    margin: 0;
    font-size: 18px;
}

.status {
    font-size: 12px;
    color: #fde68a;
}

.status.ok {
    color: #86efac;
}

.status.bad {
    color: #fca5a5;
}

.comment-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.empty {
    color: #64748b;
    text-align: center;
    margin-top: 60px;
}

.comment-item {
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.55);
    border-radius: 14px;
    margin-bottom: 10px;
}

.comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-name {
    color: #7dd3fc;
    font-weight: 700;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-time {
    color: #64748b;
    font-size: 12px;
}

.comment-content {
    color: #e2e8f0;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-form {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 14px;
    display: grid;
    gap: 10px;
}

textarea {
    min-height: 86px;
    resize: vertical;
}

.auth-mask {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(8px);
}

.auth-card {
    width: min(420px, 100%);
    display: grid;
    gap: 14px;
    padding: 28px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.auth-card h1 {
    margin: 0;
    font-size: 28px;
}

.auth-card p {
    margin: 0;
    color: #94a3b8;
    line-height: 1.55;
}

.auth-error {
    min-height: 20px;
    color: #fca5a5;
    font-size: 14px;
}

.button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 920px) {
    .header {
        display: block;
    }

    .header-actions {
        margin-top: 16px;
        justify-content: space-between;
    }

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

    .comment-card {
        height: 620px;
    }
}
