/* ================================================
   Dadatune · 设计系统 v2
   统一设计语言：深色 · 高对比 · 品牌橙+紫+绿
   ================================================ */

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

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background:
        radial-gradient(circle at 20% 0%, rgba(243, 169, 60, 0.06), transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(123, 76, 255, 0.05), transparent 40%),
        #0f0f10;
    min-height: 100vh;
    color: #f5f5f7;
    padding: 20px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* ========== 顶部导航栏 ========== */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #1a1a1a;
    border-radius: 16px;
    border: 1px solid #2a2a2a;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    font-size: 1.5em;
    font-weight: 800;
    background: linear-gradient(135deg, #f3a93c 0%, #ffb74d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.nav-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-btn {
    background: #222223;
    border: 1px solid #2e2e30;
    color: #f5f5f7;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
    font-family: inherit;
}

.nav-btn:hover {
    background: #2a2a2c;
    border-color: #3a3a3c;
    transform: translateY(-1px);
}

.lang-switch {
    background: #1a1a1a;
    border: 1px solid #2e2e30;
    color: #f3a93c;
    font-weight: 700;
    padding: 10px 16px;
    min-width: 54px;
    text-align: center;
}

.lang-switch:hover {
    background: #2a2a2c;
    border-color: #f3a93c;
}

.nav-btn-primary {
    background: linear-gradient(135deg, #f3a93c 0%, #ffb74d 100%);
    color: #101010;
    border: 1px solid #f3a93c;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(243, 169, 60, 0.25);
}

.nav-btn-primary:hover {
    background: linear-gradient(135deg, #ffb74d 0%, #f5b04a 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(243, 169, 60, 0.35);
}

/* ========== 套餐标识 ========== */
.plan-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    padding: 6px 14px;
    background: #222223;
    border-radius: 12px;
    border: 1px solid #2e2e30;
    transition: all 0.15s;
}

.plan-indicator:hover {
    background: #2a2a2c;
}

.plan-badge {
    font-size: 0.7em;
    font-weight: 700;
    color: #f3a93c;
    letter-spacing: 0.5px;
}

.plan-badge.pro {
    color: #a88cff;
}

.plan-badge.studio {
    color: #4ade80;
}

.plan-usage {
    font-size: 0.7em;
    color: #888;
}

/* ========== 上传区入口卡片 ========== */
.upload-section {
    margin-bottom: 20px;
}

/* Hero 主卡片 */
.hero-card {
    background: #1a1a1a;
    border-radius: 16px;
    border: 1px solid #2a2a2a;
    padding: 48px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hero-tagline {
    font-size: 1.35em;
    font-weight: 700;
    color: #f5f5f7;
    letter-spacing: -0.3px;
    line-height: 1.5;
}

/* Hero 按钮 */
.btn-hero {
    align-items: center !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 22px 40px !important;
    min-width: 260px;
    gap: 8px;
}

.btn-hero .btn-text {
    font-size: 1.05em !important;
    font-weight: 800 !important;
    color: #101010 !important;
}

.btn-hero .btn-sub {
    font-size: 0.78em !important;
    color: rgba(16, 16, 16, 0.65) !important;
    font-weight: 400 !important;
}

.hero-tip-free {
    font-size: 0.72em;
    color: #666;
}

/* ========== Pro 模块：人声分离 ========== */
.pro-card {
    background: #1a1a1a;
    border-radius: 16px;
    border: 1px solid #2e2e30;
    padding: 32px 28px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pro-badge {
    font-size: 0.65em;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #f3a93c;
    background: rgba(243, 169, 60, 0.12);
    border: 1px solid rgba(243, 169, 60, 0.3);
    padding: 3px 10px;
    border-radius: 20px;
}

.pro-title {
    font-size: 1.15em;
    font-weight: 700;
    color: #f5f5f7;
}

.pro-desc {
    font-size: 0.8em;
    color: #888;
    text-align: center;
    max-width: 380px;
}

.pro-upload-area {
    border: 2px dashed #333;
    border-radius: 12px;
    padding: 28px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pro-upload-area:hover {
    border-color: #f3a93c;
    background: rgba(243, 169, 60, 0.04);
}

.pro-upload-icon {
    font-size: 2em;
}

.pro-upload-text {
    font-size: 0.9em;
    font-weight: 600;
    color: #ccc;
}

.pro-upload-tip {
    font-size: 0.72em;
    color: #555;
}

.pro-stems {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stem-filename {
    font-size: 0.75em;
    color: #666;
    text-align: center;
    word-break: break-all;
}

.stem-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.stem-item {
    background: #222223;
    border: 1px solid #2e2e30;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82em;
    color: #bbb;
}

.stem-icon {
    font-size: 1.1em;
}

.stem-name {
    flex: 1;
    font-weight: 600;
    color: #ccc;
}

.btn-xs {
    padding: 4px 8px !important;
    font-size: 0.7em !important;
    border-radius: 6px !important;
}

.pro-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.pro-loading-text {
    font-size: 0.9em;
    font-weight: 600;
    color: #ccc;
}

.pro-loading-sub {
    font-size: 0.75em;
    color: #666;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #333;
    border-top-color: #f3a93c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.btn-studio-bg {
    background: linear-gradient(135deg, #7b4cff 0%, #9a72ff 100%);
    border-color: #7b4cff;
    color: #fff;
}

.btn-studio-bg:hover {
    background: linear-gradient(135deg, #8b5cff 0%, #aa82ff 100%);
}

/* ========== 批量处理 ========== */
.batch-card {
    background: #1a1a1a;
    border-radius: 16px;
    border: 1px solid #2a2a2a;
    padding: 22px;
    margin-bottom: 24px;
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.batch-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.batch-count {
    font-size: 0.85em;
    color: #888;
    font-weight: 500;
}

.batch-progress {
    background: #141415;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 14px;
}

.progress-bar {
    height: 6px;
    background: #2a2a2a;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f3a93c, #ffb74d);
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    font-size: 0.85em;
    color: #888;
    text-align: center;
}

.batch-summary {
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 14px;
}

.batch-summary-info {
    color: #4ade80;
    font-weight: 600;
    margin-bottom: 10px;
}

.batch-summary-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ========== 批量AI母带 ========== */
.batch-ai-section {
    padding: 0 0 24px 0;
}

.batch-ai-section .batch-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #1e1e2a 100%);
    border: 1px solid #3a3a5a;
}

.batch-item {
    background: #141415;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid #2a2a2a;
}

.batch-item:hover {
    background: #1a1a1c;
}

.batch-item.expanded {
    border-color: #3a3a3a;
}

.batch-item-icon {
    font-size: 1.2em;
    margin-right: 10px;
}

.batch-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.batch-item-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.batch-item-name {
    font-size: 0.9em;
    color: #f5f5f7;
    font-weight: 600;
    word-break: break-all;
    flex: 1;
}

.batch-item-score {
    font-size: 0.78em;
    color: #888;
    white-space: nowrap;
}

.batch-item-score .delta {
    color: #4ade80;
}

.batch-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.batch-item-status {
    font-size: 0.75em;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.status-pending {
    background: rgba(100, 100, 100, 0.2);
    color: #888;
}

.status-processing {
    background: rgba(243, 169, 60, 0.2);
    color: #f3a93c;
}

.status-done {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.status-error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.batch-item-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.batch-item-btn {
    background: #222223;
    border: 1px solid #2e2e30;
    color: #f5f5f7;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75em;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 600;
}

.batch-item-btn:hover:not(:disabled) {
    background: #2a2a2c;
    border-color: #3a3a3c;
}

.batch-item-btn.primary {
    background: linear-gradient(135deg, #f3a93c 0%, #ffb74d 100%);
    color: #101010;
    border-color: #f3a93c;
}

.batch-item-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffb74d 0%, #f5b04a 100%);
}

.batch-item-detail {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #2a2a2a;
}

.batch-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.82em;
}

.batch-detail-label {
    color: #888;
}

.batch-detail-value {
    color: #f5f5f7;
    font-weight: 600;
}

.batch-detail-value .positive {
    color: #4ade80;
}

.batch-detail-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.batch-platform-pill {
    background: #222223;
    border: 1px solid #2e2e30;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    color: #888;
}

.batch-platform-pill.hot {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.3);
    color: #4ade80;
}

/* Hero 批量AI母带按钮 */
.btn-batch-ai {
    margin-left: 12px;
    background: linear-gradient(135deg, #8b5cff 0%, #aa82ff 100%) !important;
    border-color: #8b5cff !important;
}

.btn-batch-ai:hover:not(:disabled) {
    background: linear-gradient(135deg, #aa82ff 0%, #9b6dff 100%) !important;
    box-shadow: 0 6px 20px rgba(139, 92, 255, 0.4) !important;
}

/* ========== 统一卡片（设计系统核心）========== */
.card {
    background: #1a1a1a;
    border-radius: 18px;
    border: 1px solid #2a2a2a;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid #262627;
}

.card-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-title {
    font-size: 1em;
    font-weight: 700;
    color: #f5f5f7;
}

.card-subtitle {
    font-size: 0.78em;
    color: #888;
    font-weight: 400;
}

.section-title {
    font-size: 1em;
    font-weight: 700;
    color: #f5f5f7;
    margin-bottom: 14px;
}

.filename {
    font-size: 0.9em;
    color: #f5f5f7;
    font-weight: 600;
    word-break: break-all;
    flex: 1;
}

/* ========== 按钮 ========== */
.btn {
    background: #222223;
    border: 1px solid #2e2e30;
    color: #f5f5f7;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.88em;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 600;
    font-family: inherit;
}

.btn:hover:not(:disabled) {
    background: #2a2a2c;
    border-color: #3a3a3c;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.78em;
    border-radius: 10px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #f3a93c 0%, #ffb74d 100%);
    color: #101010;
    border: 1px solid #f3a93c;
    box-shadow: 0 4px 14px rgba(243, 169, 60, 0.25);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffb74d 0%, #f5b04a 100%);
    box-shadow: 0 6px 20px rgba(243, 169, 60, 0.4);
}

.btn-secondary {
    background: #222223;
    border: 1px solid #2e2e30;
    color: #f5f5f7;
}

.btn-secondary:hover:not(:disabled) {
    background: #2a2a2c;
    border-color: #3a3a3c;
}

/* ========== 音频 Player 卡片 ========== */
.player-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #1e1e1f 100%);
    position: relative;
    overflow: hidden;
}

.player-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.play-btn-big {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #1f1f22;
    color: #ffffff;
    border: 1px solid #2a2a2c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    font-family: inherit;
}

.play-btn-big:hover {
    transform: scale(1.05);
    background: #26262a;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.play-btn-big .play-icon {
    font-size: 1.7em;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;
}

.play-btn-big.is-playing .play-icon {
    font-size: 1.4em;
}

.player-main {
    flex: 1;
    min-width: 0;
}

.waveform-container {
    background: #141415;
    border-radius: 14px;
    padding: 18px 20px;
    min-height: 88px;
    border: 1px solid #262627;
}

.wf-layer {
    width: 100%;
    min-height: 56px;
}

.waveform-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78em;
    color: #888;
    margin-top: 10px;
    font-variant-numeric: tabular-nums;
}

.mastering-toggle-row {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.mastering-toggle {
    flex: 1;
    min-width: 120px;
    padding: 12px 18px;
    background: #222223;
    border: 1px solid #2e2e30;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    color: #bbb;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.mastering-toggle:hover:not(:disabled) {
    background: #2a2a2c;
    color: #f5f5f7;
    border-color: #3a3a3c;
}

.mastering-toggle.active {
    background: linear-gradient(135deg, #f3a93c 0%, #ffb74d 100%);
    color: #101010;
    border-color: #f3a93c;
    box-shadow: 0 4px 14px rgba(243, 169, 60, 0.25);
}

.mastering-toggle.mastering-toggle-ai {
    background: #222223;
    color: #bbb;
    border-color: #2e2e30;
    position: relative;
    overflow: visible;
}

.mastering-toggle.mastering-toggle-ai::after {
    content: attr(data-ai-level);
    position: absolute;
    top: -6px;
    right: -6px;
    background: #f3a93c;
    color: #101010;
    font-size: 0.6em;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.mastering-toggle.mastering-toggle-ai.active {
    background: linear-gradient(135deg, #f3a93c 0%, #ffb74d 100%);
    color: #101010;
    border-color: #f3a93c;
    box-shadow: 0 4px 14px rgba(243, 169, 60, 0.25);
}

/* ========== 下载区域卡片 ========== */
.download-card {
    background: #1a1a1a;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.download-item {
    background: #222223;
    border: 1px solid #2e2e30;
    border-radius: 14px;
    padding: 14px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.download-item:hover:not(:disabled) {
    background: #2a2a2c;
    border-color: #3a3a3c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.download-item:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.download-item-pro {
    background: linear-gradient(135deg, rgba(123, 76, 255, 0.08), rgba(123, 76, 255, 0.04));
    border-color: rgba(123, 76, 255, 0.22);
}

.download-item-pro:hover:not(:disabled) {
    border-color: #7b4cff;
    box-shadow: 0 6px 20px rgba(123, 76, 255, 0.18);
}

.download-name {
    font-size: 0.85em;
    font-weight: 600;
    color: #f5f5f7;
    text-align: center;
    line-height: 1.3;
}

.download-badge {
    font-size: 0.62em;
    font-weight: 800;
    color: #a88cff;
    background: rgba(123, 76, 255, 0.15);
    border: 1px solid rgba(123, 76, 255, 0.3);
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

@media (max-width: 700px) {
    .download-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ========== 一键优化卡片（主 CTA） ========== */
.action-card {
    background: linear-gradient(135deg, rgba(243, 169, 60, 0.08), rgba(255, 183, 77, 0.04));
    border: 1px solid rgba(243, 169, 60, 0.25);
    padding: 16px;
    margin-bottom: 20px;
}

/* 主 CTA 按钮 — 水平三栏布局：图标 / 文字 / 箭头 */
.action-hero {
    width: 100%;
    padding: 22px 28px;
    min-height: 96px;
    background: linear-gradient(135deg, #f3a93c 0%, #ffb74d 50%, #ffcc80 100%);
    border: none;
    border-radius: 16px;
    color: #1a1a1a;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow:
        0 8px 28px rgba(243, 169, 60, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.action-hero::before {
    /* 顶部高光 */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent);
    pointer-events: none;
}

.action-hero:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow:
        0 14px 40px rgba(243, 169, 60, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    filter: brightness(1.04);
}

.action-hero:active:not(:disabled) {
    transform: translateY(0);
}

.action-hero:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(0.1);
}

.action-hero-icon {
    font-size: 2.2em;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    line-height: 1;
}

.action-hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.action-hero-title {
    font-size: 1.5em;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #1a1a1a;
    line-height: 1.2;
}

.action-hero-sub {
    font-size: 0.82em;
    font-weight: 500;
    color: rgba(26, 26, 26, 0.72);
    letter-spacing: 0.2px;
    line-height: 1.4;
}

.action-hero-arrow {
    flex-shrink: 0;
    font-size: 1.8em;
    font-weight: 700;
    color: #1a1a1a;
    opacity: 0.75;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.action-hero:hover:not(:disabled) .action-hero-arrow {
    transform: translateX(6px);
    opacity: 1;
}

/* 响应式：窄屏紧凑布局 */
@media (max-width: 600px) {
    .action-card {
        padding: 12px;
    }
    .action-hero {
        padding: 18px 20px;
        min-height: 84px;
        gap: 14px;
        border-radius: 14px;
    }
    .action-hero-icon {
        width: 44px;
        height: 44px;
        font-size: 1.6em;
        border-radius: 10px;
    }
    .action-hero-title {
        font-size: 1.2em;
    }
    .action-hero-sub {
        font-size: 0.72em;
    }
    .action-hero-arrow {
        font-size: 1.4em;
    }
}

/* ========== 综合评分卡片 ========== */
.score-body {
    display: flex;
    gap: 32px;
    align-items: stretch;
}

@media (max-width: 700px) {
    .score-body {
        flex-direction: column;
        gap: 20px;
    }
}

.score-left {
    flex-shrink: 0;
    min-width: 180px;
    background: linear-gradient(135deg, rgba(243, 169, 60, 0.1) 0%, rgba(243, 169, 60, 0.04) 100%);
    border: 1px solid rgba(243, 169, 60, 0.2);
    border-radius: 14px;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.score-left:not(.base-only) {
    /* 保留基础样式，会被 JS 切换优化态 */
}

.score-label {
    font-size: 0.8em;
    font-weight: 700;
    color: #f3a93c;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.total-score-value-big {
    font-size: 4.5em;
    font-weight: 800;
    color: #f3a93c;
    line-height: 1;
    letter-spacing: -2px;
    margin: 4px 0;
}

.score-change {
    font-size: 1em;
    color: #4ade80;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.change-arrow {
    font-size: 1em;
}

.change-label {
    font-size: 0.8em;
    font-weight: 500;
    color: #888;
    margin-left: 4px;
}

.score-delta {
    display: inline-block;
    font-size: 0.8em;
    font-weight: 600;
    color: #bbb;
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 6px;
}

/* 优化态：整体变成绿色系 */
.score-section.optimized .score-left {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.12) 0%, rgba(74, 222, 128, 0.04) 100%);
    border-color: rgba(74, 222, 128, 0.25);
}

.score-section.optimized .score-label {
    color: #4ade80;
}

.score-section.optimized .total-score-value-big {
    color: #4ade80;
}

.score-right {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.dimensions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    flex: 1;
    width: 100%;
}

@media (max-width: 500px) {
    .dimensions-grid {
        grid-template-columns: 1fr;
    }
}

.dim-card {
    background: rgba(255, 255, 255, 0.025);
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dim-name {
    font-size: 0.78em;
    color: #999;
    font-weight: 500;
}

.dim-score {
    font-size: 1.15em;
    font-weight: 700;
    color: #f5f5f7;
    font-variant-numeric: tabular-nums;
}

.dim-bar-bg {
    height: 5px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.dim-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f3a93c, #ffb74d);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.score-section.optimized .dim-bar-fill,
.dim-card.optimized .dim-bar-fill {
    background: linear-gradient(90deg, #4ade80, #6ee7b7);
}

.dim-gain {
    font-size: 0.72em;
    color: #4ade80;
    margin-left: 6px;
    font-weight: 700;
}

/* ========== 平台发行预测卡片 ========== */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 600px) {
    .platform-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.platform-item {
    background: linear-gradient(135deg, #1a1a1a 0%, #222223 100%);
    border-radius: 14px;
    padding: 18px 14px;
    text-align: center;
    border: 1px solid #2a2a2a;
    transition: all 0.15s;
}

.platform-item:hover {
    border-color: #3a3a3c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.platform-name {
    font-size: 0.82em;
    color: #888;
    font-weight: 500;
    margin-bottom: 6px;
}

.platform-score {
    font-size: 1.8em;
    font-weight: 800;
    color: #f5f5f7;
    line-height: 1;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.platform-diff {
    font-size: 0.75em;
    color: #4ade80;
    font-weight: 700;
}

.platform-diff.negative {
    color: #f87171;
}

.platform-progress {
    height: 4px;
    background: #2a2a2a;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 10px;
}

.platform-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f3a93c, #ffb74d);
    border-radius: 2px;
    transition: width 0.5s;
}

/* ========== Loading Overlay ========== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid #2a2a2a;
    border-top-color: #f3a93c;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    color: #f5f5f7;
    font-size: 1em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ========== Modal / 弹窗 ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    padding: 20px;
}

.modal {
    background: #1a1a1a;
    border-radius: 18px;
    padding: 28px;
    max-width: 820px;
    width: 100%;
    border: 1px solid #2a2a2a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.8em;
    cursor: pointer;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.modal-close:hover {
    background: #2a2a2a;
    color: #f5f5f7;
}

.modal-title {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 6px;
    color: #f5f5f7;
}

.modal-subtitle {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 24px;
}

.modal-footer {
    margin-top: 20px;
    font-size: 0.75em;
    color: #666;
    text-align: center;
}

/* ============================================================
   Pricing (Lander-style 3-column layout)
   ============================================================ */
.pricing-modal {
    max-width: 960px;
}

.pricing-title {
    font-size: 2em;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.pricing-subtitle {
    color: #9a9a9f;
    margin-bottom: 28px;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: stretch;
}

.plan-card {
    background: #1c1c1e;
    border-radius: 18px;
    padding: 26px 22px;
    border: 1px solid #2c2c2e;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.plan-card:hover {
    border-color: #3a3a3c;
    transform: translateY(-3px);
}

.plan-card-popular {
    border: 1.5px solid #f3a93c;
    background: linear-gradient(180deg, rgba(243, 169, 60, 0.08) 0%, #1c1c1e 45%);
    box-shadow: 0 8px 30px rgba(243, 169, 60, 0.15);
}

/* "MOST POPULAR" ribbon on top of Professional */
.plan-ribbon {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f3a93c, #ffb74d);
    color: #1a1a1c;
    font-size: 0.68em;
    font-weight: 800;
    padding: 5px 16px;
    border-radius: 999px;
    letter-spacing: 0.6px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(243, 169, 60, 0.3);
}

.plan-header {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.plan-name {
    font-size: 0.78em;
    font-weight: 700;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.plan-name-pro {
    color: #f3a93c;
}

.plan-price-row {
    display: flex;
    align-items: baseline;
    line-height: 1;
}

.plan-price-big {
    font-size: 2.6em;
    font-weight: 800;
    color: #f5f5f7;
    letter-spacing: -1px;
}

.plan-price-suffix {
    font-size: 0.95em;
    font-weight: 500;
    color: #8e8e93;
    margin-left: 4px;
}

.plan-billing-text {
    font-size: 0.72em;
    color: #6c6c70;
    margin-top: 8px;
    letter-spacing: 0.2px;
    font-weight: 500;
}

.plan-billing-text-pro {
    color: #a0a0a5;
}

.plan-desc {
    font-size: 0.82em;
    color: #9a9a9f;
    margin-bottom: 14px;
    min-height: 34px;
    line-height: 1.5;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

.plan-features li {
    font-size: 0.82em;
    color: #d1d1d6;
    padding: 6px 0;
    line-height: 1.45;
}

.plan-feature-muted {
    color: #48484a !important;
}

.btn-lg {
    padding: 12px 22px;
    font-size: 0.92em;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-top: auto;
}

.btn-glow {
    background: linear-gradient(135deg, #f3a93c, #ffb74d);
    color: #1a1a1c;
    border: none;
    box-shadow: 0 6px 20px rgba(243, 169, 60, 0.35);
}

.btn-glow:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(243, 169, 60, 0.5);
}

/* Responsive: stack on narrow screens */
@media (max-width: 720px) {
    .plan-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .plan-card-popular {
        transform: translateY(0);
    }
}

/* 登录弹窗 */
.login-modal {
    max-width: 420px;
    text-align: center;
}

.login-header {
    margin-bottom: 24px;
}

.login-logo {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.login-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #f5f5f7;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 0.85em;
    color: #888;
}

.oauth-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.oauth-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid #2e2e30;
    background: #222223;
    color: #f5f5f7;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    text-align: left;
}

.oauth-btn:hover {
    background: #2a2a2c;
    border-color: #3a3a3c;
    transform: translateY(-1px);
}

.oauth-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.login-terms {
    font-size: 0.72em;
    color: #666;
    margin-top: 12px;
}

/* 购买详情 */
.purchase-detail {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(243, 169, 60, 0.06);
    border: 1px solid rgba(243, 169, 60, 0.15);
    border-radius: 12px;
    margin-bottom: 14px;
}

.purchase-icon {
    font-size: 1.8em;
}

.purchase-name {
    font-size: 0.9em;
    font-weight: 700;
    color: #f5f5f7;
    margin-bottom: 2px;
}

.purchase-price {
    font-size: 1.3em;
    font-weight: 800;
    color: #f3a93c;
}

.purchase-features {
    list-style: none;
    margin-bottom: 18px;
}

.purchase-features li {
    font-size: 0.85em;
    color: #bbb;
    padding: 4px 0;
    line-height: 1.5;
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #f5f5f7;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid #2a2a2a;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    animation: fade-in 0.25s ease;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ========== Footer ========== */
.page-footer {
    text-align: center;
    font-size: 0.75em;
    color: #555;
    margin-top: 20px;
    padding: 20px 24px;
    border-top: 1px solid #2a2a2a;
    border-radius: 0 0 16px 16px;
}

.page-footer .footer-version {
    display: block;
    margin-top: 6px;
    color: #444;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

/* ========== 响应式微调 ========== */
@media (max-width: 600px) {
    body { padding: 12px; }
    .top-nav { padding: 12px 16px; }
    .logo { font-size: 1.2em; }
    .nav-btn { padding: 8px 14px; font-size: 0.78em; }
    .card { padding: 18px; border-radius: 14px; }
    .card-header { padding-bottom: 14px; margin-bottom: 16px; }
    .play-btn-big { width: 56px; height: 56px; }
    .player-row { gap: 14px; }
    .total-score-value-big { font-size: 3.5em; }
    .platform-score { font-size: 1.5em; }
    .plan-grid .plan-card { flex: 1 1 100%; }
}

@media (max-width: 900px) {
    .plan-grid .plan-card { flex: 1 1 calc(50% - 14px); }
}
