@charset "utf-8";

/* ============================================================
   sky-stones v5 — 北极星小站同款毛玻璃 UI
   玻璃参数继承 home 项目：
   - 背景: scale(1.10) + blur(10px)
   - 卡片: rgba(0,0,0,.25) + blur(10px) + 白色细边框
   - 弹窗: blur(12px)
   ============================================================ */

/* ---------- 变量 ---------- */
:root {
    --glass-bg:      rgba(0, 0, 0, 0.25);
    --glass-border:  rgba(255, 255, 255, 0.25);
    --glass-blur:    blur(10px);
    --glass-strong:  rgba(0, 0, 0, 0.40);
    --glass-hover:   rgba(0, 0, 0, 0.40);

    --text:          #efefef;
    --text-dim:     rgba(239, 239, 239, 0.65);
    --text-muted:   rgba(239, 239, 239, 0.45);

    --red:           #D05D5A;
    --red-dark:      #B71C1C;
    --black-stone:   #6B6B6B;

    --radius:        6px;
    --radius-lg:     12px;
    --gap:           1rem;

    --font:          'MiSans', system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-logo:     'Pacifico-1', cursive;
    --font-led:      'UnidreamLED', monospace;

    --t-fast:        0.25s;
    --t-base:        0.30s;
    --t-slow:        0.50s;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    min-height: 100%;
    font-family: var(--font);
    background-color: #333;
    color: var(--text);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--text); text-decoration: none; transition: color var(--t-base); }
a:hover { color: white; }

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: transparent;
    color: inherit;
}

img { display: block; max-width: 100%; }

::selection { background: var(--red); color: #fff; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-dark); }

/* ---------- 通用毛玻璃卡片 ---------- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius);
}

/* ---------- 通用 hover/active 动画（继承 home cards 逻辑） ---------- */
.cards {
    transition: transform var(--t-slow), box-shadow var(--t-slow), background var(--t-base);
}
.cards:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.cards:active {
    transform: scale(0.95);
    transition-duration: var(--t-base);
}

/* ============================================================
   背景
   ============================================================ */
.bg-wrap {
    position: fixed;
    inset: 0;
    z-index: 0;
    transition: filter var(--t-fast), transform var(--t-fast);
}

#bg {
    position: fixed;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scale(1.10);
    filter: blur(10px);
    transition: opacity 1.2s, transform .25s, filter .25s;
    backface-visibility: hidden;
    z-index: -2;
}
img.error { display: none; }

.cover {
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(rgba(0,0,0,0) 0, rgba(0,0,0,.5) 100%),
        radial-gradient(rgba(0,0,0,0) 33%, rgba(0,0,0,.3) 166%);
    transition: opacity 1.5s ease;
    z-index: -1;
}

/* ============================================================
   加载动画（home 同款）
   ============================================================ */
#loading-box .loading-left-bg,
#loading-box .loading-right-bg {
    position: fixed;
    z-index: 999998;
    width: 50%; height: 100%;
    background-color: rgba(81,81,81,0.85) !important;
    transition: all 0.7s cubic-bezier(0.42, 0, 0, 1.01);
    backdrop-filter: blur(10px);
}
#loading-box .loading-right-bg { right: 0; }

#loading-box > .spinner-box {
    position: fixed;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%; height: 100vh;
}
#loading-box .spinner-box .loading-word {
    position: absolute;
    color: #fff;
    font-size: 0.95rem;
    transform: translateY(64px);
    text-align: center;
}
p.loading-title { font-size: 1.25rem; margin: 20px 10px 4px; }

div.loaded div.loading-left-bg { transform: translate(-100%, 0); }
div.loaded div.loading-right-bg { transform: translate(100%, 0); }
div.loaded div.spinner-box { display: none !important; }

/* ============================================================
   应用主体容器
   ============================================================ */
.app-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px 60px;
}

/* ============================================================
   顶栏
   ============================================================ */
.topbar {
    width: 100%;
    max-width: 560px;
    padding: 18px 0 14px;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---------- 头像区域（Home main-img 同款） ---------- */
.main-img {
    display: flex;
    align-items: center;
}

.main-img img {
    border-radius: 50%;
    width: 90px;
    height: 90px;
    object-fit: cover;
    display: block;
    transition: transform var(--t-slow);
}
.main-img img:hover { transform: rotate(360deg); }

.logo-ring {
    width: 106px;
    height: 106px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.img-title {
    width: 100%;
    margin-left: 12px;
    transform: translateY(-8%);
}

span.img-title {
    display: block;
    font-size: 3.5rem;
    font-family: 'Pacifico-1' !important;
    color: #fff;
    line-height: 1;
}

span.img-text {
    display: block;
    font-size: 1.5rem;
    font-family: 'Pacifico-1' !important;
    color: var(--text-dim);
    margin-top: 4px;
}

/* 顶栏按钮 */
.topbar-actions { display: flex; gap: 6px; }

.icon-btn {
    width: 38px; height: 38px;
    border-radius: var(--radius);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1.5px solid var(--glass-border);
    color: var(--text-dim);
    display: flex; align-items: center; justify-content: center;
    transition: all var(--t-slow);
}
.icon-btn:hover {
    background: var(--glass-hover);
    color: var(--text);
    transform: scale(1.04);
}
.icon-btn:active { transform: scale(0.95); }

/* ============================================================
   状态信息条（home message 同款玻璃）
   ============================================================ */
.status-strip {
    width: 100%;
    max-width: 560px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    transition: border-color var(--t-base);
    min-height: 88px;
}

/* 左侧状态色条 */
.status-strip::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--glass-border);
    transition: background var(--t-base), box-shadow var(--t-base);
    border-radius: 3px 0 0 3px;
}
.status-strip.is-red::before    { background: var(--red); }
.status-strip.is-black::before  { background: var(--black-stone); }
.status-strip.is-active::before { background: var(--red); box-shadow: 0 0 12px var(--red); }

.status-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-body { flex: 1; min-width: 0; }

.status-text {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.status-text .stone-red   { color: var(--red); font-weight: 600; }
.status-text .stone-black { color: var(--black-stone); font-weight: 600; }

.status-meta {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-countdown {
    font-family: var(--font-led);
    font-size: 1rem;
    font-weight: bold;
    color: var(--red);
    flex-shrink: 0;
    min-width: 44px;
    text-align: right;
    display: none;
}
.status-countdown.is-show { display: block; }

/* 时间警告 */
.time-warning {
    font-size: 0.72rem;
    margin-top: 6px;
    color: var(--text-dim);
    display: none;
}
.time-warning.is-error { color: #FF6B6B; display: block; }
.time-warning.is-warn  { color: #FFB020; display: block; }

/* ============================================================
   快捷操作条
   ============================================================ */
.action-bar {
    width: 100%;
    max-width: 560px;
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.action-btn {
    flex: 1;
    height: 36px;
    border-radius: var(--radius);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1.5px solid var(--glass-border);
    color: var(--text-dim);
    font-size: 0.82rem;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    transition: all var(--t-slow);
}
.action-btn:hover {
    background: var(--glass-hover);
    color: var(--text);
    transform: scale(1.02);
}
.action-btn:active { transform: scale(0.96); }

.action-btn--primary {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}
.action-btn--primary:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    color: #fff;
}

/* ============================================================
   日历容器（home link-card / message 同款玻璃）
   ============================================================ */
.calendar-wrap {
    width: 100%;
    max-width: 560px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 18px 14px 14px;
}

/* 月份导航 */
.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

/* Home 同款 img-title 文字样式，供 cal-month 使用 */
.cal-month {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.03em;
    user-select: none;
}

.nav-arrow {
    width: 36px; height: 36px;
    border-radius: var(--radius);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1.5px solid var(--glass-border);
    color: var(--text-dim);
    display: flex; align-items: center; justify-content: center;
    transition: all var(--t-slow);
}
.nav-arrow:hover {
    background: var(--glass-hover);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
    transform: scale(1.06);
}
.nav-arrow:active { transform: scale(0.95); }

/* 星期表头 */
.cal-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
}

.wk {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    padding: 4px 0;
    letter-spacing: 0.05em;
    user-select: none;
}
.wk.is-weekend { color: var(--red); opacity: 0.7; }

/* 日历格子 */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.day-cell {
    aspect-ratio: 1;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.18s ease;
    overflow: hidden;
    padding: 2px;
}
.day-cell:hover {
    transform: scale(1.08);
    border-color: rgba(255,255,255,0.2);
    z-index: 2;
    background: rgba(255,255,255,0.1);
}
.day-cell.is-other { opacity: 0.35; }
.day-cell.is-today::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    border: 2px solid var(--red);
    box-shadow: 0 0 8px rgba(208,93,90,0.35);
    pointer-events: none;
}

/* 红石格子 */
.day-cell.is-red {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    border-color: rgba(208,93,90,0.4);
}
.day-cell.is-red:hover {
    box-shadow: 0 4px 20px rgba(208,93,90,0.5);
    transform: scale(1.10);
    z-index: 3;
}

/* 黑石格子 */
.day-cell.is-black {
    background: linear-gradient(135deg, #555 0%, #3a3a3a 100%);
    border-color: rgba(107,107,107,0.4);
}
.day-cell.is-black:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    transform: scale(1.10);
    z-index: 3;
}

.day-num {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    line-height: 1;
    pointer-events: none;
}
.day-cell.is-other .day-num { color: var(--text-muted); }
.day-cell:not(.is-red):not(.is-black) .day-num { color: rgba(255,255,255,0.75); }

.day-info {
    font-size: 0.5rem;
    color: rgba(255,255,255,0.85);
    text-align: center;
    line-height: 1.1;
    margin-top: 1px;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    pointer-events: none;
}
.day-time {
    font-size: 0.45rem;
    color: rgba(255,255,255,0.65);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    pointer-events: none;
}

/* ============================================================
   图例
   ============================================================ */
.legend {
    width: 100%;
    max-width: 560px;
    display: flex;
    gap: 16px;
    padding: 12px 4px;
    justify-content: center;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-dim);
}
.legend-dot {
    width: 10px; height: 10px;
    border-radius: 3px;
}
.legend-dot.is-red    { background: var(--red); }
.legend-dot.is-black  { background: var(--black-stone); }
.legend-dot.is-today  { background: transparent; border: 2px solid var(--red); }

/* ============================================================
   页脚（Home power 同款）
   ============================================================ */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    height: 46px;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.25);
    z-index: 100;
}

.power {
    line-height: 46px;
    color: #eeeeee;
    animation: fade;
    -webkit-animation: fade 0.75s;
    -moz-animation: fade 0.75s;
    -o-animation: fade 0.75s;
    -ms-animation: fade 0.75s;
}

.fixed-bottom { position: fixed; bottom: 0; left: 0; right: 0; }
.footer { background: rgba(0,0,0,0.25); }

/* ============================================================
   模态框（home mores / link-card 同款玻璃 + 更大 blur）
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal.is-show { display: flex; }

.modal-box {
    background: rgba(50, 50, 50, 0.88);
    backdrop-filter: blur(12px);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.3s ease;
}
.modal-box--wide { max-width: 520px; }
.modal-box--sm   { max-width: 320px; }

@keyframes modalIn {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.modal-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 14px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}
.modal-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}
.modal-close {
    width: 30px; height: 30px;
    border-radius: var(--radius);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    display: flex; align-items: center; justify-content: center;
    transition: all var(--t-base);
}
.modal-close:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    transform: rotate(90deg);
}

.modal-bd {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
    color: var(--text);
}

.modal-ft {
    padding: 12px 20px 16px;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.modal-ft--row   { justify-content: flex-end; }
.modal-ft--center { justify-content: center; }

/* 详情行 */
.detail-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--glass-border);
}
.detail-row:last-child { border-bottom: none; }
.detail-key {
    font-size: 0.8rem;
    color: var(--text-dim);
    width: 40px;
    flex-shrink: 0;
}

.stone-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}
.stone-pill.is-red   { background: var(--red); color: #fff; }
.stone-pill.is-black { background: var(--black-stone); color: #fff; }
.stone-pill.is-none  { background: rgba(255,255,255,0.1); color: var(--text-dim); }

/* 说明弹窗 */
.info-section { margin-bottom: 16px; }
.info-section:last-child { margin-bottom: 0; }
.info-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}
.info-section p {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.8;
}
.inline-red   { color: var(--red); font-weight: 600; }
.inline-black { color: var(--black-stone); font-weight: 600; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
    height: 36px;
    padding: 0 18px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    transition: all var(--t-slow);
    cursor: pointer;
    white-space: nowrap;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1.5px solid var(--glass-border);
    color: var(--text-dim);
}
.btn:hover {
    background: var(--glass-hover);
    color: var(--text);
    border-color: rgba(255,255,255,0.35);
    transform: scale(1.02);
}
.btn:active { transform: scale(0.96); }

.btn-primary {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}
.btn-primary:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    color: #fff;
}

/* ============================================================
   开关
   ============================================================ */
.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-dim);
    cursor: pointer;
    width: 100%;
}
.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
    position: absolute; inset: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1.5px solid var(--glass-border);
    border-radius: 22px;
    transition: var(--t-base);
}
.toggle-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 14px; height: 14px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: var(--t-base);
}
.toggle input:checked + .toggle-track {
    background: var(--red);
    border-color: var(--red);
}
.toggle input:checked + .toggle-track .toggle-thumb {
    transform: translateX(18px);
    background: #fff;
}

/* ============================================================
   预览图片
   ============================================================ */
.preview-img {
    max-width: 100%;
    border-radius: var(--radius);
    max-height: 60vh;
    margin: 0 auto;
}

/* ============================================================
   Tooltip
   ============================================================ */
.tip {
    position: fixed;
    background: rgba(20,20,20,0.90);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.72rem;
    padding: 5px 10px;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    pointer-events: none;
    z-index: 9999;
    display: none;
    max-width: 220px;
    line-height: 1.5;
}

/* ============================================================
   彩蛋（home achievementEgg 同款）
   ============================================================ */
#achievementEgg {
    position: fixed;
    top: 50%;
    left: -120%;
    transform: translateY(-50%);
    z-index: 9999;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: #fff;
    padding: 14px 20px;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: left 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}
#achievementEgg.is-show { left: 0; }
.egg-icon { font-size: 1.5rem; opacity: 0.9; }
.egg-title { font-size: 1rem; font-weight: 700; }
.egg-desc  { font-size: 0.78rem; opacity: 0.85; }

/* ============================================================
   截图容器（隐藏）
   ============================================================ */
.screenshot-host {
    position: fixed;
    top: -9999px; left: -9999px;
    width: 560px;
    background: rgba(50, 50, 50, 0.92);
    backdrop-filter: blur(10px);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 18px 14px 14px;
}

/* ============================================================
   淡入动画（home animation.css 同款）
   ============================================================ */
@keyframes fade {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes fade-in {
    0%   { opacity: 0; backdrop-filter: blur(0px); }
    100% { opacity: 1; backdrop-filter: blur(10px); }
}

/* ============================================================
   iziToast 弹窗样式（Home 完全同款）
   ============================================================ */
.iziToast {
    backdrop-filter: blur(10px) !important;
}

.iziToast > .iziToast-body .iziToast-title {
    font-size: 16px !important;
}

.iziToast-body .iziToast-message {
    line-height: 18px !important;
}

.iziToast > .iziToast-body .iziToast-message {
    margin: 6px 0px 4px 0px !important;
}

.iziToast:after {
    box-shadow: none !important;
}

.iziToast > .iziToast-body .iziToast-texts {
    margin: 6px 6px !important;
    display: flex !important;
    align-items: center;
}

.iziToast-message {
    word-break: break-all !important;
}

.iziToast > .iziToast-close {
    background: url('../img/ui_icons/close.svg') no-repeat 50% 50% !important;
    background-size: 8px !important;
}
