/* ===== sand-sort · 沙粒分类 ===== */

.ss-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 20px 24px;
    border-radius: var(--radius-lg);
    background: radial-gradient(ellipse at top, #ecfeff 0%, #fff 55%, #f0f9ff 100%);
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid #a5f3fc;
}

.ss-glow {
    position: absolute;
    top: -140px;
    left: 50%;
    width: 500px;
    height: 500px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.22) 0%, transparent 70%);
    pointer-events: none;
}

/* HUD */
.ss-hud {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 440px;
    margin-bottom: 10px;
}
.ss-hud-item {
    flex: 1;
    min-width: 96px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #a5f3fc;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.1);
    text-align: center;
}
.ss-hud-label {
    font-size: 11px;
    color: #0e7490;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}
.ss-hud-value {
    font-size: 20px;
    font-weight: 900;
    color: #0891b2;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}
.ss-hud-item.best {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(6, 182, 212, 0.35);
}
.ss-hud-item.best .ss-hud-label { color: rgba(255,255,255,0.8); }
.ss-hud-item.best .ss-hud-value { color: #fff; }

/* 各罐得分 */
.ss-jars-scores {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 440px;
    margin-bottom: 12px;
    justify-content: center;
}
.ss-jar-score {
    flex: 1;
    min-width: 50px;
    padding: 4px 6px;
    border-radius: 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    background: #fff;
    border: 1px solid #e2e8f0;
}
.ss-jar-score .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 3px;
    vertical-align: middle;
}
.ss-jar-score .val {
    font-size: 14px;
    font-weight: 900;
}

/* Canvas */
.ss-canvas-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}
.ss-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    background: linear-gradient(180deg, #faf5ff 0%, #fdf4ff 40%, #fef3c7 70%, #ecfccb 100%);
    box-shadow: 0 16px 50px rgba(8, 145, 178, 0.2);
    border: 2px solid #a5f3fc;
    touch-action: none;
}

/* 覆盖层 */
.ss-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(4px);
    border-radius: 14px;
    animation: ss-fade 0.25s ease;
}
.ss-overlay[hidden] { display: none; }
@keyframes ss-fade { from { opacity: 0; } to { opacity: 1; } }

.ss-overlay-card {
    text-align: center;
    padding: 26px 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.15);
    max-width: 82%;
    border: 1px solid #a5f3fc;
}
.ss-overlay-emoji { font-size: 48px; line-height: 1; margin-bottom: 10px; }
.ss-overlay-title { font-size: 22px; font-weight: 900; color: #0891b2; letter-spacing: -0.02em; }
.ss-overlay-text { font-size: 13px; color: #0e7490; margin: 8px 0 16px; }
.ss-overlay-actions { display: flex; gap: 10px; justify-content: center; }

/* 操作行 */
.ss-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 440px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.ss-btn {
    padding: 10px 22px;
    border-radius: 10px;
    border: 1px solid #a5f3fc;
    background: #fff;
    color: #0891b2;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.15s ease;
    user-select: none;
}
.ss-btn:hover { background: #ecfeff; transform: translateY(-1px); }
.ss-btn:active { transform: scale(0.95); }
.ss-btn.primary {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
}
.ss-hint {
    font-size: 12px;
    color: #0e7490;
    flex-basis: 100%;
    text-align: center;
}

/* 简介区 */
.ss-info { margin-bottom: 28px; }
.ss-info .detail-title-row { margin-bottom: 16px; }
.ss-info h1 { font-size: 28px; }

/* 响应式 */
@media (max-width: 768px) {
    .ss-hero { padding: 20px 14px 18px; }
    .ss-hud-item { min-width: 72px; padding: 8px 10px; }
    .ss-hud-value { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .ss-glow { display: none; }
}
