/* sandbox-center.css - 推演中心 & 重构后 Tab 样式 */

/* ===== 发现 Tab 子标签 ===== */
.discover-sub-tabs {
    display: flex;
    gap: 6px;
    padding: 8px 0 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.discover-sub-btn {
    padding: 6px 16px;
    border: 1px solid var(--divider, #eee);
    border-radius: 20px;
    background: var(--glass-bg, #fff);
    color: var(--text-secondary, #666);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: var(--font-body, sans-serif);
}
.discover-sub-btn.active {
    background: var(--primary, #7C5CFC);
    color: #fff;
    border-color: var(--primary, #7C5CFC);
}

/* ===== 推演中心：引导卡片 ===== */
.sandbox-center-guide {
    text-align: center;
    padding: 80px 20px;
}
.sandbox-center-guide .guide-icon {
    font-size: 64px;
    margin-bottom: 20px;
}
.sandbox-center-guide h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color, #1a1a1a);
    margin: 0 0 12px;
}
.sandbox-center-guide p {
    font-size: 14px;
    color: var(--text-secondary, #666);
    line-height: 1.8;
    margin: 0 0 28px;
}
.guide-start-btn {
    display: inline-block;
    padding: 14px 48px;
    background: linear-gradient(135deg, #7C5CFC, #a78bfa);
    color: #fff;
    border: none;
    border-radius: 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: var(--font-body, sans-serif);
}
.guide-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 92, 252, 0.3);
}
.guide-time {
    display: block;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted, #aaa);
}

/* ===== Profile Summary Bar ===== */
.profile-summary-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--glass-bg, #fff);
    border-radius: var(--radius-md, 12px);
    border: 1px solid var(--glass-border, rgba(0,0,0,0.06));
    margin-bottom: 16px;
}
.radar-chart-mini {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
}
.profile-text {
    flex: 1;
    min-width: 0;
}
.profile-summary-text {
    font-size: 14px;
    color: var(--text-secondary, #666);
    line-height: 1.6;
}

/* ===== Top 10 Cards Grid ===== */
.top10-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .top10-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 1024px) {
    .top10-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.match-card {
    background: var(--glass-bg, #fff);
    border-radius: var(--radius-md, 12px);
    border: 1px solid var(--glass-border, rgba(0,0,0,0.06));
    padding: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}
.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* ===== Avatar (with blur/lock) ===== */
.match-avatar-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    margin-bottom: 12px;
    background: #f5f3ff;
}
.match-avatar-wrap > img {
    position: absolute;
    top: 0; left: 0;
}
.match-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s;
}
.match-avatar.blurred {
    filter: blur(14px);
}
.avatar-lock-overlay {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.15);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    pointer-events: none;
}

/* ===== Match info ===== */
.match-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.match-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color, #1a1a1a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}
.match-score-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary, #7C5CFC);
    background: rgba(124, 92, 252, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}
.match-reason {
    font-size: 12px;
    color: var(--text-secondary, #888);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.match-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.match-tag {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(124, 92, 252, 0.06);
    color: var(--primary, #7C5CFC);
    border-radius: 8px;
}
.match-actions {
    display: flex;
    gap: 8px;
}
.btn-quick-sandbox, .btn-timeline-sandbox {
    flex: 1;
    padding: 8px 4px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body, sans-serif);
}
.btn-quick-sandbox {
    background: linear-gradient(135deg, #7C5CFC, #a78bfa);
    color: #fff;
}
.btn-quick-sandbox:hover {
    box-shadow: 0 4px 12px rgba(124, 92, 252, 0.3);
}
.btn-timeline-sandbox {
    background: rgba(124, 92, 252, 0.08);
    color: var(--primary, #7C5CFC);
}
.btn-timeline-sandbox:hover {
    background: rgba(124, 92, 252, 0.15);
}

/* ===== Sandbox History ===== */
.sandbox-history-section {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--divider, #eee);
}
.history-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color, #1a1a1a);
    margin: 0 0 12px;
}
.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--glass-bg, #fff);
    border-radius: var(--radius-sm, 8px);
    border: 1px solid var(--glass-border, rgba(0,0,0,0.06));
    cursor: pointer;
    transition: background 0.2s;
}
.history-item:hover {
    background: rgba(124, 92, 252, 0.04);
}
.history-scenario {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color, #1a1a1a);
}
.history-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}
.history-status {
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 500;
}
.history-status.completed {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}
.history-status.running {
    background: rgba(124, 92, 252, 0.1);
    color: var(--primary, #7C5CFC);
}
.history-time {
    color: var(--text-muted, #aaa);
}

/* ===== 我的 Tab (Profile) ===== */
.profile-tab-card {
    padding: 0;
}
.profile-tab-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 16px 20px;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border-radius: var(--radius-md, 12px);
    margin-bottom: 12px;
}
.profile-tab-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.profile-tab-info {
    flex: 1;
    min-width: 0;
}
.profile-tab-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color, #1a1a1a);
    margin-bottom: 4px;
}
.profile-tab-meta {
    font-size: 13px;
    color: var(--text-secondary, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-tab-menu {
    background: var(--glass-bg, #fff);
    border-radius: var(--radius-md, 12px);
    border: 1px solid var(--glass-border, rgba(0,0,0,0.06));
    overflow: hidden;
}
.profile-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-color, #1a1a1a);
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--divider, #f0f0f0);
}
.profile-menu-item:last-child {
    border-bottom: none;
}
.profile-menu-item:hover {
    background: rgba(124, 92, 252, 0.04);
}

/* ===== Sandbox 推演模态框：左右分栏布局（大屏） ===== */
@media (min-width: 900px) {
    .sandbox-container {
        display: flex !important;
        flex-direction: row !important;
        max-width: 1100px !important;
        width: 95vw !important;
    }
    #sandboxClassicView {
        display: flex !important;
        flex-direction: row !important;
        flex: 1;
    }
    .sandbox-main-panel {
        flex: 6;
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    .sandbox-side-panel {
        flex: 4;
        border-left: 1px solid rgba(124, 92, 252, 0.12);
        padding: 16px;
        overflow-y: auto;
        max-height: 80vh;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    /* 关系温度计 */
    .sandbox-thermometer {
        background: rgba(124, 92, 252, 0.06);
        border-radius: 12px;
        padding: 16px;
    }
    .sandbox-thermometer-title {
        font-size: 13px;
        font-weight: 600;
        color: var(--text-secondary, #888);
        margin-bottom: 10px;
    }
    .sandbox-thermometer-bar-bg {
        height: 8px;
        background: rgba(0,0,0,0.08);
        border-radius: 4px;
        overflow: hidden;
    }
    .sandbox-thermometer-bar-fill {
        height: 100%;
        border-radius: 4px;
        background: linear-gradient(90deg, #7C5CFC, #e84393);
        transition: width 0.5s ease;
    }
    .sandbox-thermometer-value {
        text-align: right;
        font-size: 20px;
        font-weight: 700;
        color: var(--primary, #7C5CFC);
        margin-top: 6px;
    }

    /* 阶段标签 */
    .sandbox-stage-label {
        display: inline-block;
        padding: 6px 14px;
        border-radius: 16px;
        font-size: 13px;
        font-weight: 600;
        background: rgba(124, 92, 252, 0.1);
        color: var(--primary, #7C5CFC);
    }

    /* 选择时间线 */
    .sandbox-choices-timeline {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .sandbox-choice-item {
        font-size: 12px;
        padding: 8px 12px;
        background: rgba(124, 92, 252, 0.04);
        border-radius: 8px;
        border-left: 3px solid var(--primary, #7C5CFC);
        color: var(--text-secondary, #666);
    }

    /* 对方性格标签 */
    .sandbox-partner-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .sandbox-partner-tag {
        font-size: 11px;
        padding: 3px 10px;
        border-radius: 10px;
        background: rgba(232, 67, 147, 0.08);
        color: #e84393;
    }
}

/* 小屏隐藏侧边栏 */
@media (max-width: 899px) {
    .sandbox-side-panel {
        display: none !important;
    }
}
