/*
 * theme-base.css — 三套皮肤共用基础层
 * 只放：reset、无障碍工具类、切换器、首次引导弹层。
 * 不含任何皮肤专属配色；强调色一律走 var(--theme-accent)，由各皮肤在 .sjy-theme-x 下注入。
 */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body { margin: 0; }

body.sjy-modal-open { overflow: hidden; }

img { max-width: 100%; height: auto; }

a { -webkit-tap-highlight-color: transparent; }

.sjy-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* ============ 切换器（右下角常驻浮动胶囊） ============ */
.sjy-switcher {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(12, 14, 20, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.32);
    font-family: ui-sans-serif, system-ui, "Noto Sans SC", sans-serif;
}

.sjy-switcher__caption {
    font-size: 11px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    padding-left: 4px;
}

.sjy-switcher__list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sjy-switcher__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sjy-switcher__item:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.sjy-switcher__item.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
}

.sjy-switcher__dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sjy-switcher__item--a .sjy-switcher__dot { background: #39d353; }
.sjy-switcher__item--b .sjy-switcher__dot { background: #c41e3a; }
.sjy-switcher__item--c .sjy-switcher__dot { background: linear-gradient(135deg, #39d353 0 50%, #c41e3a 50% 100%); }

@media (max-width: 600px) {
    .sjy-switcher { right: 10px; bottom: 10px; padding: 6px 8px; gap: 6px; }
    .sjy-switcher__caption { display: none; }
    .sjy-switcher__name { display: none; }
    .sjy-switcher__item { padding: 8px; }
}

/* ============ 首次引导弹层 ============ */
.sjy-onboarding {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 6, 10, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: sjy-fade 0.3s ease;
}
.sjy-onboarding[hidden] { display: none; }

.sjy-onboarding__panel {
    width: 100%;
    max-width: 820px;
    background: #11141c;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 36px 32px 28px;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    font-family: ui-sans-serif, system-ui, "Noto Sans SC", sans-serif;
    animation: sjy-rise 0.35s ease;
}

.sjy-onboarding__kicker {
    margin: 0 0 8px;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.42);
}

.sjy-onboarding__title {
    margin: 0 0 8px;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
}

.sjy-onboarding__sub {
    margin: 0 0 26px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.55);
}

.sjy-onboarding__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.sjy-onboarding__card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.sjy-onboarding__card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}

.sjy-onboarding__thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0d1117;
}
.sjy-onboarding__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 缩略图缺失时的色块兜底 */
.sjy-onboarding__thumb--a.is-fallback { background: linear-gradient(135deg, #0d1117 0 60%, #39d353 60% 100%); }
.sjy-onboarding__thumb--b.is-fallback { background: linear-gradient(135deg, #faf9f7 0 60%, #c41e3a 60% 100%); }
.sjy-onboarding__thumb--c.is-fallback { background: linear-gradient(135deg, #0d1117 0 50%, #faf9f7 50% 100%); }

.sjy-onboarding__cardbody {
    padding: 14px 14px 16px;
    text-align: left;
}
.sjy-onboarding__cardname {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.sjy-onboarding__cardname em { font-style: normal; font-size: 0.8rem; color: rgba(255,255,255,0.45); font-family: ui-monospace, "JetBrains Mono", monospace; }
.sjy-onboarding__carddesc {
    display: block;
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
}
.sjy-onboarding__card--c { border-color: rgba(255, 255, 255, 0.28); }

.sjy-onboarding__skip {
    background: none;
    border: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 12px;
    transition: color 0.2s ease;
}
.sjy-onboarding__skip:hover { color: #fff; }

@media (max-width: 640px) {
    .sjy-onboarding__cards { grid-template-columns: 1fr; }
    .sjy-onboarding__panel { padding: 26px 18px 20px; }
    .sjy-onboarding__card { flex-direction: row; }
    .sjy-onboarding__thumb { width: 38%; aspect-ratio: auto; }
}

@keyframes sjy-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sjy-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
    .sjy-onboarding, .sjy-onboarding__panel { animation: none; }
    .sjy-switcher__item, .sjy-onboarding__card { transition: none; }
}
