* {
    box-sizing: border-box;
}

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

.hidden {
    display: none !important;
}

.page {
    width: min(1100px, 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: 4px 0 0;
    color: #94a3b8;
}

.simple-header strong {
    color: #f8fafc;
}

.user-line {
    font-size: 15px;
}

.online-box {
    min-width: 138px;
    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, button {
    font: inherit;
}

input {
    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 {
    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);
}

.main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.player-card, .viewer-comment-card, .anchor-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;
    text-align: center;
}

.viewer-comment-card {
    padding: 18px;
}

.viewer-comment-card h2, .anchor-card h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.viewer-comment-card p {
    margin: 0 0 14px;
    color: #94a3b8;
    line-height: 1.55;
}

.comment-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.comment-status {
    min-height: 22px;
    margin-top: 10px;
    color: #86efac;
    font-size: 14px;
}

.comment-status.error {
    color: #fca5a5;
}

.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(460px, 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;
}

.anchor-main {
    display: block;
}

.anchor-card {
    padding: 18px;
}

.anchor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.anchor-comment-list {
    display: grid;
    gap: 10px;
    max-height: calc(100vh - 180px);
    overflow: auto;
    padding-right: 4px;
}

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

.comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 6px;
}

.comment-meta strong {
    color: #f8fafc;
    font-size: 15px;
}

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

.empty-comment {
    color: #94a3b8;
    padding: 28px;
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 16px;
}

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

    .online-box {
        margin-top: 14px;
        display: inline-block;
    }

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

    .anchor-card-header {
        display: block;
    }

    .anchor-card-header button {
        margin-top: 12px;
    }
}
