/**
 * 点券活动中心 - 拍卖页面样式
 */

/* ========== 页面头部 ========== */
.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2em;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
}

/* ========== 拍卖分区 ========== */
.auction-section {
    margin-bottom: 40px;
}

.section-box {
    border: 1px solid rgba(255, 200, 0, 0.25);
    border-radius: 16px;
    overflow: hidden;
}

.past-section .section-box {
    border-color: rgba(255, 255, 255, 0.12);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(15, 15, 28, 0.8);
    border-bottom: 1px solid rgba(255, 200, 0, 0.15);
}

.section-header h2 {
    font-size: 1.25em;
    color: #ffc800;
    margin: 0;
    text-shadow: 0 2px 8px rgba(255, 200, 0, 0.3);
}

.section-count {
    background: rgba(255, 200, 0, 0.2);
    color: #ffc800;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
}

/* 往期区域样式 */
.past-section .section-header {
    background: rgba(15, 15, 28, 0.8);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.past-section .section-header h2 {
    color: #aaa;
    text-shadow: none;
}

/* ========== 往期拍卖卡片 ========== */
.past-card {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #2a2a4c;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    padding-bottom: 16px;
    opacity: 0.85;
}

.past-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.05);
    opacity: 1;
}

.past-card .card-header {
    display: block;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
}

.past-card .auction-result {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 8px 0 4px;
}

.past-card .result-tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
}

.past-card .result-tag.won {
    background: rgba(0, 230, 118, 0.2);
    color: #00e676;
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.past-card .result-tag.sold {
    background: rgba(255, 200, 0, 0.15);
    color: #ffc800;
    border: 1px solid rgba(255, 200, 0, 0.25);
}

.past-card .result-tag.unsold {
    background: rgba(255, 255, 255, 0.05);
    color: #888;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.past-card .card-title {
    display: block;
    text-align: center;
    color: #aaa;
}

.past-card .final-price {
    text-align: center;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin: 0 16px 12px;
}

.past-card .final-price .label {
    font-size: 0.8em;
    color: #777;
}

.past-card .final-price .value {
    font-size: 1.2em;
    font-weight: bold;
    color: #ffc800;
}

.past-card .final-price .winner {
    font-size: 0.85em;
    color: #00e676;
    margin-top: 4px;
}

.past-card .btn-detail {
    display: block;
    width: calc(100% - 32px);
    margin: 0 auto;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #aaa;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s;
}

.past-card .btn-detail:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .past-card .auction-result {
        flex-wrap: wrap;
    }
}

/* ========== 拍卖网格 ========== */
.auction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 24px;
    background: rgba(15, 15, 28, 0.8);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

/* ========== 拍卖卡片 ========== */
.auction-card {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #3a3a5c;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    padding-bottom: 16px;
}

.auction-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 200, 0, 0.15);
    border-color: #ffc800;
}

.auction-card .card-header {
    display: block;
    text-align: center;
    font-size: 0.85em;
    color: #aaa;
    padding: 10px 0 4px;
    letter-spacing: 1px;
}

.card-countdown {
    text-align: center;
    margin-bottom: 12px;
}

.card-countdown .time-unit {
    background: rgba(0, 217, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 2px;
    color: #00d9ff;
    font-weight: bold;
}

.auction-card .card-title {
    display: block;
    text-align: center;
    font-size: 1.4em;
    font-weight: bold;
    color: #ffc800;
    margin: 8px 12px 14px;
    text-shadow: 0 2px 8px rgba(255, 200, 0, 0.3);
}

.card-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 200, 0, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

.card-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 16px;
    margin-bottom: 14px;
}

.info-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item.highlight-blue { border-color: rgba(0, 217, 255, 0.25); }
.info-item.highlight-gold { border-color: rgba(255, 200, 0, 0.35); background: rgba(255, 200, 0, 0.06); }
.info-item.highlight-green { border-color: rgba(0, 230, 118, 0.3); }

.info-label {
    font-size: 0.78em;
    color: #999;
}

.info-value {
    font-size: 1.15em;
    font-weight: bold;
    color: #fff;
}

.info-value.blue { color: #00d9ff; }
.info-value.gold { color: #ffc800; }
.info-value.green { color: #00e676; }

.card-bid-bar {
    margin: 0 16px 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
    font-size: 0.95em;
    color: #ccc;
    letter-spacing: 0.5px;
}

.btn-bid {
    display: block;
    width: calc(100% - 32px);
    margin: 0 auto;
    padding: 13px 20px;
    background: linear-gradient(135deg, #ffc800, #ffaa00);
    border: none;
    border-radius: 10px;
    color: #1a1a2e;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 2px;
}

.btn-bid:hover {
    background: linear-gradient(135deg, #ffd640, #ffbb33);
    box-shadow: 0 4px 20px rgba(255, 200, 0, 0.4);
}

.auction-card.upcoming {
    opacity: 0.92;
    border-color: rgba(240, 173, 78, 0.35);
}

.btn-bid-muted {
    background: linear-gradient(135deg, #5a5a6e, #4a4a5c) !important;
    color: #e8e8f0 !important;
    box-shadow: none !important;
}

.auction-bid-status {
    text-align: center;
    padding: 12px 16px;
    color: #f0ad4e;
}

/* ========== 拍卖详情模态框 ========== */
.auction-detail-modal {
    max-width: 700px;
}

.auction-detail {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .auction-detail {
        grid-template-columns: 1fr;
    }
}

.detail-image {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.detail-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

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

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.info-row.highlight {
    background: linear-gradient(90deg, rgba(255, 200, 0, 0.1), rgba(255, 170, 0, 0.1));
    border: 1px solid rgba(255, 200, 0, 0.3);
}

.info-row .label {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.info-row .value {
    font-weight: bold;
    color: var(--text);
}

.info-row.highlight .value {
    color: #ffc800;
    font-size: 1.2em;
}

.countdown .time-unit {
    background: rgba(0, 217, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 2px;
    color: var(--primary);
}

/* ========== 出价区域 ========== */
.bid-section {
    margin-bottom: 24px;
}

.bid-section h4 {
    margin-bottom: 16px;
    color: var(--text);
}

.bid-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bid-input {
    position: relative;
}

.bid-hint {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ========== 出价记录 ========== */
.bid-history h4 {
    margin-bottom: 16px;
}

.history-list {
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.history-item.top {
    background: linear-gradient(90deg, rgba(255, 200, 0, 0.15), rgba(255, 170, 0, 0.1));
    border: 1px solid rgba(255, 200, 0, 0.3);
}

.history-bidder {
    color: var(--text);
}

.history-item.top .history-bidder {
    color: #ffc800;
}

.history-price {
    font-weight: bold;
    color: var(--primary);
}

.history-time {
    font-size: 0.85em;
    color: var(--text-secondary);
}

/* ========== 手机端优化 ========== */
.auction-page .page-container {
    max-width: 100%;
    padding: 0 12px 24px;
}

.auction-page .page-header h1 {
    background: linear-gradient(90deg, #ffc800, #ff9f43);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auction-modal-sheet {
    border-color: rgba(255, 200, 0, 0.25);
}

.auction-hero {
    text-align: center;
    padding: 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(255, 200, 0, 0.12), rgba(255, 150, 0, 0.05));
    border: 1px solid rgba(255, 200, 0, 0.25);
    border-radius: 14px;
}

.auction-hero-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.auction-hero-label {
    font-size: 13px;
    color: #aaa;
    width: 100%;
    margin-bottom: 4px;
}

.auction-hero-value {
    font-size: 2rem;
    font-weight: 800;
    color: #ffc800;
    line-height: 1.1;
}

.auction-hero-unit {
    font-size: 14px;
    color: #888;
}

.auction-hero-countdown {
    margin-top: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #00d9ff;
    font-variant-numeric: tabular-nums;
}

.auction-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.auction-stat {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auction-stat.full {
    grid-column: 1 / -1;
}

.auction-stat.muted .auction-stat-value {
    font-size: 13px;
    color: #888;
}

.auction-stat-label {
    font-size: 11px;
    color: #888;
}

.auction-stat-value {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    word-break: break-all;
}

.auction-stat-value.gold { color: #ffc800; }
.auction-stat-value.green { color: #00e676; }

.block-title {
    font-size: 14px;
    margin: 0 0 10px;
    color: #ccc;
}

.bid-history-block .history-list {
    max-height: 180px;
}

.auction-modal-foot .auction-bid-btn {
    background: linear-gradient(135deg, #ffc800, #ff9500);
    color: #1a1a2e;
}

.auction-modal-foot .act-chip.active {
    background: rgba(255, 200, 0, 0.2);
    border-color: #ffc800;
    color: #ffc800;
}

.empty-tip {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 13px;
}

body.auction-modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

@media (max-width: 768px) {
    .auction-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 14px;
    }

    .auction-card {
        padding-bottom: 12px;
    }

    .auction-card .card-title {
        font-size: 1.15rem;
        margin: 6px 12px 10px;
    }

    .card-image {
        width: 96px;
        height: 96px;
    }

    .card-info-grid {
        gap: 8px;
        padding: 0 12px;
    }

    .info-item {
        padding: 8px 10px;
    }

    .info-value {
        font-size: 1rem;
    }

    .btn-bid {
        min-height: 48px;
        font-size: 1rem;
        width: calc(100% - 24px);
    }

    .past-card .btn-detail {
        min-height: 44px;
    }

    .history-item {
        flex-wrap: wrap;
        gap: 6px;
    }

    .history-item .history-bidder {
        flex: 1 1 100%;
    }

    .history-item .history-time {
        flex: 1 1 auto;
    }
}

.auction-items-block {
    margin: 12px 0 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
}

.detail-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.detail-item-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
}

@media (max-width: 380px) {
    .auction-hero-value {
        font-size: 1.65rem;
    }

    .act-btn-row .act-btn-primary {
        flex: 0 0 42%;
    }
}
