/* 牛马精神病院 - 低饱和暖色风格 */

/* ===== CSS变量 ===== */
:root {
    --primary: #e8915a;
    --secondary: #6aab8e;
    --accent: #d4a853;
    --bg: #1c1c28;
    --card-bg: rgba(255,255,255,0.05);
    --card-border: rgba(255,255,255,0.08);
    --text: #d8d8e0;
    --text-light: #8a8a9a;
    --text-muted: #5a5a6a;
    --divider: rgba(255,255,255,0.08);
    --gradient-primary: linear-gradient(135deg, #5b7bb4, #7b93c4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== 页面容器 ===== */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* ===== 页面容器 ===== */
/* 注意：页面显示/隐藏由JS直接控制，这里不设置display */

/* ===== 首页 ===== */
.home-screen {
    min-height: 100vh;
    padding: 40px 20px;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
}

.home-content {
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.logo {
    font-size: 4rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 20px rgba(232, 145, 90, 0.4));
    animation: logoBounce 2s ease-in-out infinite;
}

@keyframes logoBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(-3deg); }
    75% { transform: translateY(-8px) rotate(3deg); }
}

.title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.subtitle-accent {
    color: var(--accent);
    font-weight: 600;
}

/* 主按钮 - 带呼吸动画 */
.btn-main {
    display: inline-block;
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(232, 145, 90, 0.4);
    animation: btnBreathe 2.5s ease-in-out infinite;
    transition: transform 0.2s, box-shadow 0.2s;
}

@keyframes btnBreathe {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(232, 145, 90, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 6px 30px rgba(232, 145, 90, 0.6);
        transform: scale(1.02);
    }
}

.btn-main:hover {
    background: #d07a48;
    animation: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(232, 145, 90, 0.5);
}

.btn-main:active {
    transform: scale(0.98);
}

/* 数据卡片 */
.realtime-data {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    text-align: left;
}

.realtime-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--divider);
}

.realtime-row:last-child {
    border-bottom: none;
}

.realtime-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.realtime-value {
    font-weight: 600;
    font-size: 0.95rem;
}

.realtime-value.pink {
    color: var(--primary);
}

.dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--secondary);
    border-radius: 50%;
    margin-right: 6px;
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(106, 171, 142, 0.4);
    }
    50% { 
        opacity: 0.7;
        box-shadow: 0 0 0 4px rgba(106, 171, 142, 0);
    }
}

/* 排行榜入口 */
.ranking-btn {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 20px;
}

.ranking-btn:hover {
    background: var(--card-bg);
}

/* 运势卡片 */
.fortune-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 18px 20px;
    text-align: left;
    cursor: pointer;
}

.fortune-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.fortune-icon {
    font-size: 1.3rem;
}

.fortune-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--accent);
}

.fortune-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.fortune-tips {
    color: var(--secondary);
    font-size: 0.85rem;
}

.fortune-more {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 10px;
}

/* Banner广告 */
.banner-ad {
    margin-top: 25px;
    width: 100%;
}

.banner-placeholder {
    background: var(--card-bg);
    border: 1px dashed var(--card-border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== 测试页 ===== */
.quiz-screen {
    min-height: 100vh;
    padding: 20px;
    background: var(--bg);
}

.quiz-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: var(--card-bg);
    border-radius: 12px;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-light);
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--divider);
    border-radius: 3px;
    margin: 0 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s;
}

.quiz-container {
    max-width: 500px;
    margin: 0 auto;
}

.question-number {
    display: inline-block;
    background: var(--gradient-primary);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 25px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
    transition: all 0.2s;
}

.option:hover {
    border-color: #5b7bb4;
    background: rgba(91, 123, 180, 0.08);
}

.option.selected {
    background: rgba(91, 123, 180, 0.15);
    border-color: #5b7bb4;
}

.option-letter {
    width: 30px;
    height: 30px;
    background: var(--divider);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.option.selected .option-letter {
    background: #5b7bb4;
    color: #fff;
}

/* ===== 结果页 ===== */
.result-screen {
    min-height: 100vh;
    padding: 20px;
    background: var(--bg);
}

.result-container {
    max-width: 500px;
    margin: 0 auto;
}

/* 诊断卡片 - 暗色风格 */
.share-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 20px;
    color: var(--text);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.share-card * {
    color: inherit;
}

.share-header {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 18px;
}

.share-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.share-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 5px;
    font-family: monospace;
}

/* 等级徽章 */
.rank-badge {
    background: rgba(232, 145, 90, 0.08);
    border: 1px solid rgba(232, 145, 90, 0.2);
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    margin-bottom: 18px;
    position: relative;
}

.rank-badge::after {
    content: '已确诊';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    transform: rotate(-5deg);
    opacity: 0.8;
}

.rank-icon {
    font-size: 3.5rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 12px rgba(232, 145, 90, 0.3));
}

.rank-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 5px;
    text-shadow: 0 2px 12px rgba(232, 145, 90, 0.3);
}

.rank-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 扎心语录 */
.result-quote {
    background: rgba(232, 145, 90, 0.08);
    border-left: 4px solid var(--primary);
    border-radius: 0 10px 10px 0;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 0.95rem;
    color: var(--text);
    font-style: italic;
}

/* 分数统计 - 横向一排 */
.result-stats-grid {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.result-stat-item {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border-radius: 14px;
    padding: 18px 10px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.result-stat-icon {
    font-size: 1.6rem;
    margin-bottom: 2px;
}

.result-stat-name {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.result-stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 2px 8px rgba(212, 168, 83, 0.3);
}

/* 病情对比 */
.comparison-container {
    background: rgba(106, 171, 142, 0.08);
    border: 1px solid rgba(106, 171, 142, 0.2);
    border-radius: 12px;
    padding: 15px 18px;
    margin-bottom: 18px;
}

.comparison-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    justify-content: center;
}

.comparison-icon {
    font-size: 1.3rem;
}

.comparison-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
}

.comparison-changes {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.comparison-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
}

.comparison-item.up {
    background: rgba(106, 171, 142, 0.12);
}

.comparison-item.down {
    background: rgba(232, 145, 90, 0.12);
}

.comparison-item.stable {
    background: rgba(255,255,255,0.04);
}

.comparison-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.comparison-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
}

.comparison-item.up .comparison-value {
    color: var(--secondary);
}

.comparison-item.down .comparison-value {
    color: var(--primary);
}

.comparison-last {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* 并发症 */
.diagnosis-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.diagnosis-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.diagnosis-header-icon {
    font-size: 1.2rem;
}

.diagnosis-header-text {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
}

.diagnosis-badge {
    background: rgba(232, 145, 90, 0.15);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
}

.diagnosis-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.diagnosis-item {
    background: rgba(255,255,255,0.04);
    border-left: 3px solid var(--primary);
    border-radius: 0 10px 10px 0;
    padding: 12px 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.diagnosis-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.diagnosis-content {
    flex: 1;
}

.diagnosis-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 3px;
}

.diagnosis-desc {
    font-size: 0.8rem;
    color: var(--text-light);
}

.diagnosis-footer {
    margin-top: 12px;
    padding: 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.06);
}

/* 结果按钮 */
.result-actions {
    margin-bottom: 20px;
}

.action-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.btn-half {
    flex: 1;
    padding: 14px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-full {
    width: 100%;
    padding: 14px;
}

.btn-share {
    background: var(--secondary);
    color: #fff;
}

.btn-pk {
    background: #5b7bb4;
    color: #fff;
}

.btn-rank {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--card-border);
}

.btn-restart {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--card-border);
}

.btn-board {
    background: var(--gradient-primary);
    color: #fff;
}

/* 通用按钮样式 */
.btn {
    display: inline-block;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(232, 145, 90, 0.3);
}

.btn-primary:hover {
    background: #d07a48;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 145, 90, 0.4);
}

/* ===== 排行榜 ===== */
.ranking-screen {
    min-height: 100vh;
    padding: 20px;
    background: var(--bg);
}

.ranking-header {
    text-align: center;
    margin-bottom: 25px;
}

.ranking-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--accent);
}

.ranking-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.ranking-tabs {
    display: flex;
    gap: 0;
    background: var(--card-bg);
    border-radius: 25px;
    padding: 3px;
    max-width: 200px;
    margin: 0 auto;
}

.ranking-tab {
    flex: 1;
    padding: 8px 20px;
    border: none;
    border-radius: 22px;
    background: transparent;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.ranking-tab.active {
    background: var(--gradient-primary);
    color: #fff;
}

/* 地区Tab样式 */
.location-tabs {
    margin-top: 12px;
    max-width: 280px;
}

.location-tabs .ranking-tab {
    font-size: 0.8rem;
    padding: 6px 14px;
}

/* 当前位置显示 */
.current-location {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ranking-list {
    max-width: 500px;
    margin: 0 auto;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 18px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    margin-bottom: 10px;
}

.ranking-item.is-me {
    background: rgba(91, 123, 180, 0.12);
    border-color: #5b7bb4;
}

.rank-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.rank-number.top3 {
    background: linear-gradient(135deg, #d4a853, #c49a48);
    color: #fff;
}

.rank-number.normal {
    background: var(--divider);
    color: var(--text-light);
}

.rank-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.rank-info {
    flex: 1;
}

.rank-name {
    font-weight: 600;
    margin-bottom: 3px;
}

.rank-title-small {
    font-size: 0.8rem;
    color: var(--text-light);
}

.me-badge {
    display: inline-block;
    background: var(--secondary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-left: 6px;
}

.rank-like-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    opacity: 0.6;
}

.rank-like-btn:hover {
    opacity: 1;
}

.rank-like-btn.liked {
    opacity: 1;
}

/* 城市排行榜样式 */
.city-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    margin-bottom: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.city-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.city-card-top {
    border-color: rgba(212, 168, 83, 0.3);
    background: rgba(212, 168, 83, 0.06);
}

.city-card-rank {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    background: var(--divider);
    color: var(--text-light);
}

.city-card-rank.top3 {
    background: linear-gradient(135deg, #d4a853, #c49a48);
    color: #fff;
    font-size: 1rem;
}

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

.city-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.city-card-emoji {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.city-card-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    white-space: nowrap;
}

.city-card-nickname {
    font-size: 0.7rem;
    color: var(--primary);
    background: rgba(232, 145, 90, 0.12);
    padding: 2px 8px;
    border-radius: 8px;
    white-space: nowrap;
    font-weight: 600;
}

.city-card-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.city-card-stats {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.city-stat-players,
.city-stat-score {
    text-align: center;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    min-width: 56px;
}

.city-stat-num {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

.city-stat-label {
    display: block;
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* 我的城市卡片 */
.my-city-card {
    background: rgba(91, 123, 180, 0.12) !important;
    border-color: #5b7bb4 !important;
}

.back-btn {
    margin-top: 20px;
    text-align: center;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.my-rank-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 18px 20px;
    text-align: center;
    margin-bottom: 15px;
}

.my-rank-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.my-rank-position {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.my-rank-percent {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
}

.my-rank-tip {
    font-size: 0.8rem;
    color: var(--secondary);
    margin-top: 8px;
}

/* ===== PK弹窗 ===== */
.pk-modal .modal-content {
    text-align: center;
}

.pk-code-box {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.pk-code-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.pk-code-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 4px;
}

.pk-my-score {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* PK结果弹窗 */
.pk-result-modal .modal-content {
    padding: 0;
}

.pk-result-header {
    text-align: center;
    padding: 25px 25px 15px;
}

.pk-result-emoji {
    font-size: 3rem;
    margin-bottom: 10px;
}

.pk-result-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.pk-result-desc {
    font-size: 0.9rem;
    color: var(--text-light);
}

.pk-result-body {
    padding: 0 25px 20px;
}

/* 血条对决 */
.pk-battle-arena {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.pk-battle-header {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 15px;
}

.pk-health-bars {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pk-player-side {
    flex: 1;
    text-align: center;
}

.pk-avatar {
    font-size: 2.2rem;
    margin-bottom: 5px;
}

.pk-name {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.pk-health-wrap {
    width: 100%;
}

.pk-health-bar {
    height: 16px;
    background: var(--divider);
    border-radius: 8px;
    overflow: hidden;
}

.pk-health-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.8s ease;
}

.pk-health-my .pk-health-fill {
    background: linear-gradient(90deg, #5a9e7a, #6aab8e);
}

.pk-health-opp .pk-health-fill {
    background: linear-gradient(90deg, #c47a5a, #e8915a);
}

.pk-health-critical {
    animation: none;
}

.pk-vs-center {
    text-align: center;
    flex-shrink: 0;
}

.pk-vs-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
}

.pk-score-diff {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
}

.pk-ko-badge {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 5px;
}

.pk-score-final {
    font-size: 1.4rem;
    font-weight: 700;
}

.pk-result-verdict {
    text-align: center;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 10px;
    margin-bottom: 15px;
}

.verdict-win {
    color: var(--secondary);
    font-weight: 700;
}

.verdict-lose {
    color: var(--primary);
    font-weight: 700;
}

.verdict-draw {
    color: var(--accent);
    font-weight: 700;
}

.pk-title-badge {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 15px;
    text-align: center;
}

.pk-title-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.pk-title-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
}

.pk-funny-comment,
.pk-suggestion {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 12px 15px;
    margin-top: 12px;
}

.pk-funny-label,
.pk-suggestion-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.pk-funny-text {
    font-size: 0.9rem;
    color: var(--primary);
    font-style: italic;
}

.pk-suggestion-text {
    font-size: 0.9rem;
    color: #7b93c4;
}

.pk-dimensions {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.pk-dimensions-title {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
    text-align: center;
}

.pk-dimension-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--divider);
}

.pk-dimension-item:last-child {
    border-bottom: none;
}

.pk-dimension-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

.pk-dimension-name {
    flex: 1;
    font-size: 0.9rem;
}

.pk-dimension-score {
    font-size: 1rem;
    font-weight: 700;
}

.pk-floating-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.pk-btn {
    flex: 1;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.pk-btn-retry {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--card-border);
}

.pk-btn-share {
    background: var(--secondary);
    color: #fff;
}

.pk-btn-revenge {
    background: var(--primary);
    color: #fff;
}

/* ===== 诊断动画 ===== */
.diagnosis-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.diagnosis-box {
    text-align: center;
    padding: 40px;
}

.diagnosis-icon-large {
    font-size: 4rem;
    margin-bottom: 20px;
}

.diagnosis-text {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.diagnosis-progress {
    width: 200px;
    height: 4px;
    background: var(--divider);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.diagnosis-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s;
}

/* ===== 弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #2a2a3a;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s;
    border: 1px solid var(--card-border);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.modal-icon {
    font-size: 1.5rem;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-content {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.modal-btn-primary {
    background: var(--primary);
    color: #fff;
}

.modal-btn-secondary {
    background: var(--divider);
    color: var(--text);
}

/* 视频弹窗 */
.video-modal {
    text-align: center;
}

.video-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.video-icon {
    font-size: 1.5rem;
}

.video-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.video-content {
    margin-bottom: 15px;
}

.video-placeholder {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 40px 20px;
}

.video-emoji {
    font-size: 3rem;
    margin-bottom: 10px;
}

.video-text {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.video-progress {
    width: 100%;
    max-width: 200px;
    height: 4px;
    background: var(--divider);
    border-radius: 2px;
    margin: 0 auto 10px;
    overflow: hidden;
}

.video-progress-bar {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
}

.video-countdown {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
}

.video-tip {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* 昵称输入 */
.nickname-input {
    width: 100%;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    text-align: center;
}

.nickname-input:focus {
    outline: none;
    border-color: #5b7bb4;
}

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: calc(100% - 40px);
    max-width: 360px;
}

.toast {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
    border-left: 4px solid var(--text-light);
}

.toast.success {
    border-left-color: var(--secondary);
}

.toast.error {
    border-left-color: var(--primary);
}

.toast.warning {
    border-left-color: var(--accent);
}

.toast.info {
    border-left-color: #5b7bb4;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--divider);
    border-top-color: #5b7bb4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== 分享卡片（隐藏画布） ===== */
.share-card-image {
    width: 375px;
    padding: 28px;
    background: linear-gradient(135deg, #252538 0%, #1e1e30 100%);
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
}

.share-card-header {
    text-align: center;
    margin-bottom: 20px;
}

.share-card-logo {
    font-size: 3rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(232, 145, 90, 0.3));
}

.share-card-title {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #e8915a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.share-card-subtitle {
    font-size: 0.85rem;
    color: #888;
    letter-spacing: 2px;
}

.share-card-body {
    text-align: center;
    margin-bottom: 20px;
}

.share-card-rank {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 8px;
    text-shadow: 0 2px 12px rgba(232, 145, 90, 0.4);
}

.share-card-grade {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 20px;
}

.share-card-scores {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
}

.share-card-score-item {
    text-align: center;
}

.share-card-score-label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 3px;
}

.share-card-score-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 2px 8px rgba(212, 168, 83, 0.3);
}

.share-card-quote {
    font-size: 0.95rem;
    color: #d0d0d8;
    font-style: italic;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.share-card-footer {
    text-align: center;
}

.share-card-qrcode {
    margin-bottom: 10px;
}

.share-card-qrcode img {
    border-radius: 6px;
    display: block;
    margin: 0 auto;
}

.share-card-brand {
    font-size: 0.8rem;
    color: #666;
}

/* PK分享卡片 - 病历诊断风 */
.pk-share-card {
    background: #f5f0e8;
    color: #2c3e50;
    padding: 24px;
    font-family: 'PingFang SC', sans-serif;
}

.pk-share-header {
    text-align: center;
    border-bottom: 2px solid #8b4513;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.pk-share-logo {
    font-size: 2rem;
    margin-bottom: 5px;
}

.pk-share-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #8b4513;
}

.pk-share-subtitle {
    font-size: 0.85rem;
    color: #a0522d;
}

.pk-share-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #8b4513;
    margin-bottom: 12px;
}

.pk-share-result {
    background: rgba(139, 69, 19, 0.08);
    border: 1px solid rgba(139, 69, 19, 0.2);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 12px;
    text-align: center;
}

.pk-share-verdict {
    font-size: 1.4rem;
    font-weight: 800;
    color: #c41e3a;
    margin-bottom: 12px;
}

.pk-share-vs-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.pk-share-player {
    text-align: center;
    flex: 1;
}

.pk-share-avatar {
    font-size: 2rem;
    margin-bottom: 5px;
}

.pk-share-name {
    font-size: 0.8rem;
    color: #5a4a3a;
}

.pk-share-score {
    font-size: 1.6rem;
    font-weight: 800;
    color: #8b4513;
}

.pk-share-vs-divider {
    text-align: center;
}

.pk-vs-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(139, 69, 19, 0.5);
}

.pk-score-diff {
    font-size: 1rem;
    font-weight: 700;
    color: #27ae60;
}

.pk-share-diagnosis {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.pk-diag-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(139, 69, 19, 0.2);
}

.pk-diag-row:last-child {
    border-bottom: none;
}

.pk-diag-label {
    font-size: 0.75rem;
    color: #8b4513;
    font-weight: 600;
}

.pk-diag-value {
    font-size: 0.8rem;
    color: #2c3e50;
    text-align: right;
}

.pk-diag-highlight {
    background: linear-gradient(135deg, #e8915a, #d4a853);
    color: #fff;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
}

.pk-share-signature {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pk-sign-line {
    font-size: 0.75rem;
    color: #8b4513;
}

.pk-sign-name {
    font-weight: 600;
}

.pk-stamp {
    background: #c41e3a;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    transform: rotate(-5deg);
}

.pk-share-footer {
    border-top: 2px solid #8b4513;
    padding-top: 12px;
    text-align: center;
}

.pk-qr-box {
    margin-bottom: 8px;
}

.pk-qr-box img {
    border-radius: 6px;
    border: 2px solid #8b4513;
}

.pk-hashtags {
    font-size: 0.65rem;
    color: #a0522d;
}

/* ===== 隐藏类 ===== */
.hidden {
    display: none !important;
}

/* ===== 漂浮emoji ===== */
.floating-emoji {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.25;
    pointer-events: none;
    animation: floatEmoji 6s ease-in-out infinite;
}

.floating-emoji:nth-child(odd) {
    animation-duration: 5s;
    animation-delay: -2s;
}

.floating-emoji:nth-child(even) {
    animation-duration: 7s;
    animation-delay: -3s;
}

@keyframes floatEmoji {
    0%, 100% { 
        transform: translateY(0) translateX(0) rotate(0deg); 
        opacity: 0.25;
    }
    25% { 
        transform: translateY(-15px) translateX(5px) rotate(5deg); 
        opacity: 0.35;
    }
    50% { 
        transform: translateY(-20px) translateX(-3px) rotate(-3deg); 
        opacity: 0.25;
    }
    75% { 
        transform: translateY(-10px) translateX(8px) rotate(3deg); 
        opacity: 0.3;
    }
}

/* ===== 搞笑标识 ===== */
.fun-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    animation: badgeWiggle 3s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(232, 145, 90, 0.3);
}

@keyframes badgeWiggle {
    0%, 100% { transform: rotate(-1deg) scale(1); }
    25% { transform: rotate(1.5deg) scale(1.02); }
    50% { transform: rotate(-1deg) scale(1); }
    75% { transform: rotate(1deg) scale(0.98); }
}

/* ===== 上榜入口 ===== */
.board-entry {
    margin-bottom: 15px;
}

/* ===== 按钮行布局 ===== */
.primary-row .btn-half,
.secondary-row .btn-half {
    flex: 1;
}

/* ===== 响应式 ===== */
@media (max-width: 480px) {
    .title {
        font-size: 1.6rem;
    }
    
    .btn-main {
        padding: 14px 20px;
    }
    
    .result-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .question-text {
        font-size: 1rem;
    }
    
    .pk-floating-actions {
        flex-direction: column;
    }
    
    .modal {
        padding: 20px;
    }
}
