/* ============================================
   砍价进行中详情页 - 专属样式
   设计理念：让人爽、让人冲、让人分享
   ============================================ */

/* 服务器信息卡 - 顶部紧凑 */
.server-info-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #E9EDF3;
    margin-bottom: 16px;
}

.server-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--brand-blue-light) 0%, #D6E8F7 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.server-info {
    flex: 1;
}

.server-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--action-red);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.server-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.server-specs {
    font-size: 12px;
    color: var(--text-gray);
}

.server-price-info {
    text-align: right;
    min-width: 132px;
}

.original-price {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: line-through;
}

.target-price {
    font-size: 13px;
    color: var(--text-gray);
}

.renew-price {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.35;
    color: #2563EB;
    white-space: nowrap;
}

.renew-price.current {
    color: #D97706;
}

.renew-price.success {
    color: #2563EB;
}

/* 核心进度卡 - 主舞台 */
.progress-hero-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #E9EDF3;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    padding: 28px;
    margin-bottom: 16px;
}

/* 主数值区 - 距离0元只差 */
.hero-main {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px dashed #E9EDF3;
    margin-bottom: 24px;
}

.hero-label {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.hero-label .fire {
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

.hero-amount {
    font-family: "DIN Alternate", "Helvetica Neue", sans-serif;
    font-size: 56px;
    font-weight: 700;
    color: var(--action-red);
    line-height: 1;
    margin-bottom: 12px;
}

.hero-amount .currency {
    font-size: 32px;
    margin-right: 2px;
}

.hero-sub {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-body);
}

.hero-sub .sep {
    width: 4px;
    height: 4px;
    background: var(--text-light);
    border-radius: 50%;
}

.hero-sub .highlight {
    color: var(--brand-blue);
    font-weight: 600;
}

.hero-sub .countdown-inline {
    font-family: "DIN Alternate", monospace;
    color: var(--text-dark);
    font-weight: 600;
}

/* 三个指标卡 */
.metrics-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    flex: 1;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.2s;
}

.metric-card.cut {
    background: linear-gradient(135deg, #E8F4FD 0%, #D6E8F7 100%);
}

.metric-card.progress {
    background: linear-gradient(135deg, #E8F8EC 0%, #D4F1DC 100%);
}

.metric-card.helpers {
    background: linear-gradient(135deg, #FFF8E6 0%, #FFEFC7 100%);
}

.metric-value {
    font-family: "DIN Alternate", sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.metric-card.cut .metric-value { color: var(--brand-blue); }
.metric-card.progress .metric-value { color: #22C55E; }
.metric-card.helpers .metric-value { color: #D97706; }

.metric-label {
    font-size: 12px;
    color: var(--text-gray);
    margin-top: 4px;
}

/* 进度条 */
.progress-section {
    margin-bottom: 20px;
}

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

.progress-title {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.progress-percent {
    font-family: "DIN Alternate", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--action-red);
}

.progress-bar-wrap {
    height: 12px;
    background: #F0F2F5;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-blue) 0%, #3B82F6 50%, var(--action-red) 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* 里程碑 - 统一图标风格 */
.milestone-row {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    position: relative;
}

.milestone-row::before {
    content: '';
    position: absolute;
    top: 34px;
    left: 24px;
    right: 24px;
    height: 2px;
    background: #E9EDF3;
}

.milestone-node {
    text-align: center;
    position: relative;
    z-index: 1;
}

.milestone-icon {
    width: 36px;
    height: 36px;
    background: #F5F7FA;
    border: 2px solid #E9EDF3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    font-size: 14px;
    color: var(--text-gray);
    transition: all 0.3s;
}

.milestone-node.completed .milestone-icon {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: white;
}

.milestone-node.active .milestone-icon {
    background: var(--action-red-light);
    border-color: var(--action-red);
    color: var(--action-red);
    animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(227, 77, 89, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(227, 77, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(227, 77, 89, 0); }
}

.milestone-text {
    font-size: 11px;
    color: var(--text-gray);
}

.milestone-node.completed .milestone-text,
.milestone-node.active .milestone-text {
    color: var(--text-dark);
    font-weight: 500;
}

/* 下一步建议条 - P0 新增 */
.suggestion-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: linear-gradient(90deg, #FFF8E6 0%, #FFFBF0 100%);
    border: 1px solid #FFE4A0;
    border-radius: 10px;
    margin-bottom: 16px;
}

.suggestion-icon {
    width: 36px;
    height: 36px;
    background: #FFD666;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.suggestion-content {
    flex: 1;
}

.suggestion-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.suggestion-desc {
    font-size: 12px;
    color: #92400E;
}

.suggestion-desc .amount {
    font-weight: 700;
    color: var(--action-red);
}

.btn-suggestion {
    height: 36px;
    padding: 0 20px;
    background: var(--action-red);
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-suggestion:hover {
    background: var(--action-red-dark);
    transform: translateY(-1px);
}

/* 加速任务卡 */
.task-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #E9EDF3;
    padding: 20px;
    margin-bottom: 16px;
}

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

.task-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-progress {
    font-size: 12px;
    color: var(--text-gray);
}

.task-progress .done {
    color: var(--status-success);
    font-weight: 600;
}

.task-progress .reward {
    color: var(--action-red);
    font-weight: 600;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-section);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.task-item:last-child {
    margin-bottom: 0;
}

.task-item:hover {
    background: #F0F2F5;
}

.task-item.highlight {
    background: linear-gradient(90deg, var(--action-red-light) 0%, #FFF5F5 100%);
    border: 1px solid rgba(227, 77, 89, 0.2);
}

.task-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.task-info {
    flex: 1;
}

.task-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-desc {
    font-size: 12px;
    color: var(--text-gray);
}

.task-item.highlight .task-desc {
    color: var(--action-red);
}

.task-reward {
    font-family: "DIN Alternate", sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--action-red);
    margin-right: 12px;
}

.task-reward.big {
    font-size: 18px;
}

.btn-task {
    height: 32px;
    padding: 0 16px;
    background: white;
    border: 1px solid var(--brand-blue);
    color: var(--brand-blue);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-task:hover {
    background: var(--brand-blue);
    color: white;
}

.btn-task.primary {
    background: var(--action-red);
    border-color: var(--action-red);
    color: white;
}

.btn-task.primary:hover {
    background: var(--action-red-dark);
}

/* 助力榜卡 */
.rank-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #E9EDF3;
    overflow: hidden;
}

.rank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #E9EDF3;
}

.rank-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-count {
    font-size: 13px;
    color: var(--text-gray);
}

/* 冲榜提示 */
.rank-boost-tip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(90deg, var(--reward-gold-light) 0%, #FFFDF5 100%);
    border-bottom: 1px solid #F5E6C4;
}

.boost-icon {
    font-size: 20px;
}

.boost-text {
    flex: 1;
    font-size: 13px;
    color: #92400E;
}

.boost-text strong {
    color: var(--action-red);
}

.boost-reward {
    font-size: 13px;
    font-weight: 600;
    color: var(--reward-gold);
}

/* TOP3 展示 */
.top3-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 24px;
    padding: 24px 20px;
    background: linear-gradient(180deg, var(--reward-gold-light) 0%, white 100%);
}

.podium-item {
    text-align: center;
    flex: 1;
    max-width: 100px;
}

.podium-item.first { order: 2; }
.podium-item.second { order: 1; }
.podium-item.third { order: 3; }

.podium-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 8px;
}

.podium-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid #E9EDF3;
}

.podium-item.first .podium-avatar {
    width: 56px;
    height: 56px;
    border-color: var(--reward-gold);
}

.podium-item.second .podium-avatar {
    border-color: #C0C0C0;
}

.podium-item.third .podium-avatar {
    border-color: #CD7F32;
}

.podium-rank {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #E9EDF3;
    color: var(--text-gray);
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.podium-item.first .podium-rank {
    background: var(--reward-gold);
    color: white;
}

.podium-item.second .podium-rank {
    background: #C0C0C0;
    color: white;
}

.podium-item.third .podium-rank {
    background: #CD7F32;
    color: white;
}

.podium-crown {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
}

.podium-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.podium-amount {
    font-family: "DIN Alternate", sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--action-red);
}

.podium-tag {
    display: inline-block;
    padding: 1px 6px;
    background: var(--brand-blue-light);
    color: var(--brand-blue);
    font-size: 10px;
    border-radius: 4px;
    margin-top: 4px;
}

/* 助力列表 */
.rank-list-wrap {
    padding: 0 20px 16px;
}

.rank-filter {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid #E9EDF3;
    margin-bottom: 12px;
}

.filter-btn {
    padding: 4px 12px;
    font-size: 12px;
    color: var(--text-gray);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: var(--bg-section);
}

.filter-btn.active {
    background: var(--brand-blue-light);
    color: var(--brand-blue);
    font-weight: 500;
}

.rank-list {
    max-height: 200px;
    overflow-y: auto;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #F5F7FA;
}

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

.rank-item-num {
    width: 24px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
}

.rank-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-blue-light);
}

.rank-item-avatar.user-icon-fallback,
.podium-avatar.user-icon-fallback {
    color: var(--brand-blue);
    background: linear-gradient(135deg, #EEF6FF 0%, #E6F0FF 100%);
}

.rank-item-info {
    flex: 1;
}

.rank-item-name {
    font-size: 13px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rank-item-time {
    font-size: 11px;
    color: var(--text-light);
}

.rank-item-amount {
    font-family: "DIN Alternate", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--action-red);
}

.new-user-tag {
    display: inline-block;
    padding: 1px 5px;
    background: var(--action-red-light);
    color: var(--action-red);
    font-size: 9px;
    border-radius: 3px;
    font-weight: 500;
}

/* ============================================
   右侧行动面板
   ============================================ */

/* 冲刺控制台 */
.sprint-console {
    background: white;
    border-radius: 12px;
    border: 1px solid #E9EDF3;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    padding: 20px;
    margin-bottom: 16px;
}

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

.sprint-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-section);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-body);
}

.sprint-timer .icon {
    font-size: 14px;
}

.sprint-timer .time {
    font-family: "DIN Alternate", monospace;
    font-weight: 600;
    color: var(--text-dark);
}

.sprint-badge {
    padding: 4px 10px;
    background: var(--action-red-light);
    color: var(--action-red);
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.sprint-goal {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, var(--action-red-light) 0%, #FFF5F5 100%);
    border-radius: 10px;
    margin-bottom: 20px;
}

.sprint-goal-text {
    font-size: 14px;
    color: var(--text-body);
    line-height: 1.6;
}

.sprint-goal-text .amount {
    font-family: "DIN Alternate", sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--action-red);
}

.sprint-goal-text .people {
    font-weight: 600;
    color: var(--brand-blue);
}

/* 好友助力入口 */
.assist-action-panel {
    margin-bottom: 16px;
}

.btn-assist-main {
    width: 100%;
    height: 48px;
    background: var(--action-red);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-assist-main:hover:not(:disabled) {
    background: var(--action-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227, 77, 89, 0.3);
}

.btn-assist-main:disabled {
    background: #D6DCE5;
    color: var(--text-gray);
    cursor: not-allowed;
}

.assist-action-tip {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-gray);
    text-align: center;
}

/* 渠道按钮组 */
.channel-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.btn-channel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    background: var(--action-red);
    color: white;
    border: none;
    border-radius: 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-channel:hover {
    background: var(--action-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227, 77, 89, 0.3);
}

.btn-channel.secondary {
    height: 40px;
    background: white;
    color: var(--text-body);
    border: 1px solid #E9EDF3;
    font-size: 14px;
    font-weight: 500;
}

.btn-channel.secondary:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    box-shadow: none;
    transform: none;
}

.btn-channel .icon {
    font-size: 18px;
}

.sprint-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-section);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-gray);
}

.sprint-tip .icon {
    font-size: 14px;
}

.sprint-tip .highlight {
    color: var(--action-red);
    font-weight: 500;
}

/* 二维码折叠卡 */
.qrcode-collapse {
    background: white;
    border-radius: 12px;
    border: 1px solid #E9EDF3;
    overflow: hidden;
    margin-bottom: 16px;
}

.qrcode-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.qrcode-toggle:hover {
    background: var(--bg-section);
}

.qrcode-toggle-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-body);
}

.qrcode-toggle-text .icon {
    font-size: 18px;
}

.qrcode-toggle-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: transform 0.3s;
}

.qrcode-toggle.active .qrcode-toggle-arrow {
    transform: rotate(180deg);
}

.qrcode-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.qrcode-content.show {
    max-height: 320px;
}

.qrcode-inner {
    padding: 0 20px 20px;
    text-align: center;
}

.qrcode-img-wrap {
    width: 160px;
    height: 160px;
    margin: 0 auto 12px;
    padding: 8px;
    background: white;
    border: 1px solid #E9EDF3;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-size: 12px;
}

.qrcode-img-wrap img,
.qrcode-img-wrap canvas {
    width: 132px !important;
    height: 132px !important;
}

.qrcode-tip {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 16px;
}

.qrcode-btns {
    display: flex;
    gap: 10px;
}

.btn-qrcode {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    background: var(--bg-section);
    border: 1px solid #E9EDF3;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-body);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-qrcode:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

/* 信任入口卡 */
.trust-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #E9EDF3;
    padding: 16px 20px;
}

.trust-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #F5F7FA;
    cursor: pointer;
    transition: all 0.2s;
}

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

.trust-item:hover {
    color: var(--brand-blue);
}

.trust-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-body);
}

.trust-item-left .icon {
    font-size: 16px;
    color: var(--text-gray);
}

.trust-item-arrow {
    color: var(--text-light);
}

/* 取消/换服务器入口（次级） */
.secondary-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px dashed #E9EDF3;
    margin-top: 4px;
}

.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    height: 32px;
    padding: 0 14px;
    border: 1px solid rgba(227, 77, 89, 0.28);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--action-red);
    text-decoration: none;
    cursor: pointer;
    transition: all .15s ease;
}

.secondary-action.secondary-action-switch {
    border-color: rgba(30, 58, 95, 0.24);
    color: var(--brand-blue);
}

.secondary-action:hover {
    border-color: currentColor;
    background: var(--bg-hover);
}
