/* v1.4 短视频风格竖屏小游戏共享样式（.shorts- 作用域，禁止裸标签覆写既有类） */

.shorts-stage {
    width: min(100vw, 480px);
    max-height: 100dvh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #1b2030, #0f1320);
    border-radius: 18px;
    overflow: hidden;
    box-sizing: border-box;
}

/* 顶部只读 HUD（≈14%）：分数 / 连击 / 时间条 */
.shorts-hud {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, .04);
}
.shorts-cell { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.shorts-label { font-size: .72rem; color: #9aa3b8; }
.shorts-value { font-size: 1.25rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.shorts-value.pulse { animation: shorts-pop-scale .12s ease; }
.combo-badge { color: #6b7280; transition: transform .12s ease, color .12s ease; }
.combo-badge.active { color: #ffd54a; transform: scale(1.12); text-shadow: 0 0 10px rgba(255, 213, 74, .6); }
.shorts-time-cell { align-items: stretch; }
.shorts-timebar { display: block; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .12); margin-top: 4px; overflow: hidden; }
.shorts-timebar i { display: block; height: 100%; width: 100%; background: #43c67c; transition: width .25s linear; }
.shorts-value.urgent { color: #ff6b6b; animation: shorts-breathe .9s ease-in-out infinite; }

/* 中部玩法舞台（≈58%） */
.shorts-arena {
    position: relative;
    flex: 1 1 auto;
    min-height: 220px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 14px; padding: 16px; touch-action: manipulation; user-select: none;
}

/* 底部主命中区（≈28%，落拇指可达区） */
.shorts-actions { display: flex; gap: 10px; padding: 12px; justify-content: center; }

/* 旋转圆环舒尔特 */
.shorts-ring {
    position: relative;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, .25);
    box-shadow: 0 0 0 10px rgba(255, 255, 255, .03), inset 0 0 36px rgba(106, 210, 255, .12);
    animation: shorts-spin var(--rot, 2200ms) linear infinite;
    transform: rotate(0deg);
}
.shorts-ring-cell {
    position: absolute;
    width: 44px; height: 44px;
    border: none; border-radius: 50%;
    background: linear-gradient(150deg, #6ad2ff, #1668c8); color: #fff;
    box-shadow: 0 10px 24px rgba(22, 104, 200, .28);
    font-weight: 800; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; touch-action: manipulation;
    transform: translate(-50%, -50%);
    transition: box-shadow .12s ease, filter .12s ease;
}
.shorts-ring-cell span {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    /* 反向动画抵消父级旋转，让数字始终保持正向可读 */
    animation: shorts-spin-rev var(--rot, 2200ms) linear infinite;
}
.shorts-ring-cell.is-next {
    background: linear-gradient(150deg, #ffd54a, #f28c28);
    color: #2b1600;
    box-shadow: 0 0 0 4px rgba(255, 213, 74, .22), 0 12px 30px rgba(242, 140, 40, .36);
}
.shorts-ring-cell:active { filter: brightness(1.15); }

/* 斯特鲁普 */
.shorts-stroop-word { font-size: 3.2rem; font-weight: 900; line-height: 1; }
.shorts-stroop-options { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.shorts-stroop-opt {
    min-width: 56px; min-height: 48px; border: none; border-radius: 12px; color: #fff;
    font-weight: 800; font-size: 1rem; cursor: pointer; touch-action: manipulation;
}

/* 反口令 */
.shorts-cmd { font-size: 2.2rem; font-weight: 900; color: #fff; }
.shorts-cmd-hint { font-size: .9rem; color: #ffd54a; }
.shorts-cmd-options { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 320px; }
.shorts-cmd-opt {
    min-width: 84px; min-height: 48px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 12px;
    background: rgba(255, 255, 255, .08); color: #fff; font-weight: 700; cursor: pointer; touch-action: manipulation;
}

/* 双目标专注：两路刺激区（移动端 responsive，R3） */
.shorts-dual { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 320px; }
.shorts-lane {
    min-height: 96px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.1rem; color: #fff;
    background: linear-gradient(150deg, rgba(255, 111, 174, .25), rgba(195, 26, 99, .25));
    border: 2px solid rgba(255, 255, 255, .18); cursor: pointer; touch-action: manipulation; user-select: none;
}
.shorts-lane:active { transform: scale(.98); border-color: #ff6fae; }
@media (min-width: 481px) {
    .shorts-dual { flex-direction: row; max-width: 460px; }
    .shorts-lane { flex: 1; min-height: 140px; }
}

/* 命中飘字 + 涟漪 */
.shorts-pop {
    position: absolute; transform: translate(-50%, -50%);
    color: #ffd54a; font-weight: 900; font-size: 1.2rem; pointer-events: none;
    animation: shorts-pop .6s ease-out forwards;
}
/* 失误红闪 + 抖动（≤180ms） */
.shorts-flash-err { box-shadow: inset 0 0 0 3px #ff5b5b; }
.shorts-shake { animation: shorts-shake .18s ease; }
/* 漏过灰化淡出 */
.shorts-faded { opacity: .4; transition: opacity .2s ease; }
/* 里程碑边缘光晕 */
.shorts-glow { box-shadow: inset 0 0 30px rgba(255, 213, 74, .5); }
/* 结算白闪 */
.shorts-white-flash { animation: shorts-white .3s ease; }

/* 结算分享卡（新类名，不复用 .game-over-modal） */
.shorts-share-card {
    position: fixed; inset: 0; z-index: 50;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .55); padding: 16px;
}
.shorts-card-inner {
    width: min(92vw, 380px); background: linear-gradient(180deg, #232a40, #161b2c);
    border-radius: 18px; padding: 20px; color: #fff; text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.shorts-newrecord { color: #ffd54a; font-weight: 800; margin-bottom: 6px; }
.shorts-rating { font-size: 1.4rem; font-weight: 900; }
.shorts-final { font-size: 2.4rem; font-weight: 900; margin: 4px 0; }
.shorts-caption { color: #c7cee0; font-size: .95rem; margin: 6px 0 12px; }
.shorts-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.shorts-metric { background: rgba(255, 255, 255, .06); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; }
.shorts-metric span { font-size: .72rem; color: #9aa3b8; }
.shorts-metric b { font-size: 1.1rem; }
.shorts-card-btns { display: flex; gap: 10px; justify-content: center; }
.shorts-share-tip { margin-top: 12px; font-size: .78rem; color: #8b93a8; }

/* 横屏遮罩（请竖屏体验） */
.shorts-landscape-mask { display: none; }
@media (orientation: landscape) and (max-height: 560px) {
    .shorts-landscape-mask {
        display: flex; align-items: center; justify-content: center; position: fixed; inset: 0;
        z-index: 80; background: #0f1320; color: #fff; font-size: 1.1rem; text-align: center; padding: 20px;
    }
}

@keyframes shorts-spin { to { transform: rotate(360deg); } }
@keyframes shorts-spin-rev { to { transform: rotate(-360deg); } }
@keyframes shorts-pop { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.8); } 100% { opacity: 0; transform: translate(-50%, -160%) scale(1.1); } }
@keyframes shorts-pop-scale { 0% { transform: scale(1); } 50% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes shorts-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes shorts-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes shorts-white { 0% { background: rgba(255, 255, 255, 0); } 40% { background: rgba(255, 255, 255, .85); } 100% { background: rgba(255, 255, 255, 0); } }

/* v1.5.2 修复：分享结算卡内三按钮在窄卡片里溢出/挤压。
   原 .btn 全局 padding:14px 36px + min-height:48px 在 380px 卡片里三按钮总宽 ~430px，
   超出 .shorts-card-inner 内容宽 (~340px)，导致按钮挤压变形/水平溢出。
   覆盖为 flex 等宽 + 紧凑 padding，让三按钮在窄卡片里等宽占满不溢出。 */
.shorts-card-btns .btn {
    padding: 9px 10px;
    min-height: 38px;
    font-size: 0.88rem;
    flex: 1 1 0;
    min-width: 0;
    letter-spacing: 0;
}
