/* ===== 星河小站 前台样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #0b1030;
    color: #fff;
}

#scene {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
}

/* 顶栏 */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    z-index: 20;
    background: linear-gradient(180deg, rgba(8,12,35,.55), transparent);
}
.logo {
    font-size: 17px;
    letter-spacing: 2px;
    text-shadow: 0 0 12px rgba(120,160,255,.6);
}
.topbar .right { display: flex; align-items: center; gap: 10px; }
.nick { font-size: 13px; color: #ffe9a8; }
.btn-mini {
    padding: 6px 16px;
    border: 1px solid rgba(150,180,255,.5);
    border-radius: 20px;
    background: rgba(30,45,110,.45);
    color: #dbe4ff;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}
.btn-mini:hover { background: rgba(80,110,255,.5); }

/* 公告 */
.notice {
    position: fixed;
    top: 58px; left: 50%;
    transform: translateX(-50%);
    max-width: 88%;
    padding: 8px 18px;
    border-radius: 20px;
    background: rgba(20,30,80,.55);
    border: 1px solid rgba(140,170,255,.35);
    font-size: 13px;
    color: #e4ebff;
    z-index: 20;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    backdrop-filter: blur(6px);
}

/* 提示语 */
.hint {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: rgba(255,255,255,.75);
    letter-spacing: 2px;
    z-index: 20;
    text-shadow: 0 0 10px rgba(0,0,0,.6);
    animation: pulse 2.6s infinite;
    pointer-events: none;
}
@keyframes pulse { 0%,100%{opacity:.55} 50%{opacity:1} }

/* 留言按钮 */
.msg-toggle {
    position: fixed;
    right: 16px;
    bottom: 64px;
    padding: 10px 18px;
    border: 1px solid rgba(150,180,255,.5);
    border-radius: 24px;
    background: rgba(25,38,100,.55);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    z-index: 20;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 18px rgba(0,0,0,.35);
    transition: transform .15s;
}
.msg-toggle:active { transform: scale(.95); }

/* 留言面板 */
.msg-panel {
    position: fixed;
    right: 16px;
    bottom: 118px;
    width: 320px;
    max-width: calc(100vw - 32px);
    max-height: 56vh;
    background: rgba(16,24,60,.92);
    border: 1px solid rgba(140,170,255,.35);
    border-radius: 14px;
    z-index: 30;
    display: none;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.msg-panel.show { display: flex; }
.msg-head {
    padding: 12px 16px;
    font-size: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(140,170,255,.2);
}
.msg-head .close { cursor: pointer; font-size: 20px; color: #aeb9e8; line-height: 1; }
.msg-list { padding: 10px 14px; overflow-y: auto; flex: 1; }
.msg-list .loading, .msg-list .empty { text-align: center; color: #8fa0d8; font-size: 13px; padding: 20px 0; }
.msg-item { margin-bottom: 12px; border-bottom: 1px dashed rgba(140,170,255,.18); padding-bottom: 10px; }
.msg-item .m-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.msg-item .m-name { color: #ffd98a; }
.msg-item .m-time { color: #7f8fc4; }
.msg-item .m-content { font-size: 13px; line-height: 1.7; color: #e4ebff; word-break: break-word; }
.msg-more {
    text-align: center;
    padding: 8px;
    font-size: 13px;
    color: #8ea4ff;
    cursor: pointer;
    border-top: 1px dashed rgba(140,170,255,.2);
}
.msg-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid rgba(140,170,255,.2); }
.msg-input textarea {
    flex: 1;
    height: 44px;
    resize: none;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(140,170,255,.35);
    background: rgba(8,14,40,.7);
    color: #fff;
    font-size: 13px;
    outline: none;
}
.msg-input textarea:focus { border-color: #6f8dff; }
.msg-input button {
    width: 64px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #4a6bff, #7a5cff);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}
.msg-input button:active { opacity: .85; }

/* 登录弹窗 */
.mask {
    position: fixed;
    inset: 0;
    background: rgba(5,8,25,.7);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.login-box {
    width: 340px;
    max-width: calc(100vw - 48px);
    background: rgba(18,26,64,.97);
    border: 1px solid rgba(140,170,255,.4);
    border-radius: 16px;
    padding: 30px 28px 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.login-box h3 { text-align: center; letter-spacing: 3px; margin-bottom: 6px; }
.login-box .sub { text-align: center; color: #8fa0d8; font-size: 12px; margin-bottom: 20px; }
.login-box input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid rgba(140,170,255,.35);
    background: rgba(8,14,40,.8);
    color: #fff;
    font-size: 14px;
    outline: none;
}
.login-box input:focus { border-color: #6f8dff; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-row button {
    width: 120px;
    margin-bottom: 12px;
    border: 1px solid rgba(140,170,255,.45);
    border-radius: 10px;
    background: rgba(40,60,150,.5);
    color: #dbe4ff;
    font-size: 12px;
    cursor: pointer;
}
.code-row button:disabled { opacity: .5; cursor: not-allowed; }
.login-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #4a6bff, #7a5cff);
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 4px;
    cursor: pointer;
    margin-top: 6px;
}
.login-btn:active { opacity: .85; }
.login-box .tip { text-align: center; color: #ff9d9d; font-size: 12px; margin-top: 12px; min-height: 16px; }

/* 移动端适配 */
@media (max-width: 480px) {
    .msg-panel { right: 8px; bottom: 108px; width: calc(100vw - 16px); max-height: 52vh; }
    .msg-toggle { right: 10px; bottom: 56px; }
    .notice { top: 54px; }
}
