/* 拍卖行主题样式 */
:root {
    --primary-gold: #d4af37;
    --dark-gold: #b8941f;
    --light-gold: #f4d03f;
    --royal-purple: #4a148c;
    --deep-purple: #311b92;
    --cream: #faf8f3;
    --dark-bg: #1a1a2e;
    --card-bg: #16213e;
    --text-light: #f5f5f5;
    --text-muted: #9e9e9e;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ff9800;
}

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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--royal-purple) 100%);
    min-height: 100vh;
    color: var(--text-light);
}

.auction-house { max-width: 1400px; margin: 0 auto; padding: 20px; }

/* ===== 头部 ===== */
.auction-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 30px;
    background: linear-gradient(90deg, var(--card-bg) 0%, var(--deep-purple) 100%);
    border-radius: 15px; border: 2px solid var(--primary-gold);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.2);
    margin-bottom: 30px;
}
.logo { display: flex; align-items: center; gap: 15px; }
.logo .gavel { font-size: 2.5rem; animation: gavel-swing 2s ease-in-out infinite; }
@keyframes gavel-swing { 0%,100%{transform:rotate(-10deg)} 50%{transform:rotate(10deg)} }
.logo h1 {
    font-size: 2rem;
    background: linear-gradient(90deg, var(--primary-gold), var(--light-gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.user-info { display: flex; align-items: center; gap: 20px; }
.user-profile { display: flex; align-items: center; gap: 12px; }
.user-avatar {
    width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary-gold), var(--dark-gold));
    border-radius: 50%; font-size: 1.5rem;
}
.user-details { display: flex; flex-direction: column; }
.user-name { font-weight: bold; color: var(--text-light); }
.user-username { font-size: 0.8rem; color: var(--text-muted); }
.points-display {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(90deg, var(--primary-gold), var(--dark-gold));
    border-radius: 25px; font-weight: bold;
}
.points-icon { font-size: 1.2rem; }
.points-value { font-size: 1.3rem; color: var(--dark-bg); }
.logout-btn {
    padding: 8px 20px; background: transparent; border: 2px solid var(--danger);
    color: var(--danger); border-radius: 8px; cursor: pointer; font-size: 0.9rem;
    transition: all 0.3s;
}
.logout-btn:hover { background: var(--danger); color: white; }

/* ===== 主布局 ===== */
.auction-main {
    display: grid; grid-template-columns: 1fr 380px; gap: 25px;
}

/* ===== 左侧：拍卖列表 ===== */
.auction-list-panel {
    background: var(--card-bg); border-radius: 15px; padding: 25px;
    border: 1px solid rgba(212,175,55,0.3);
}
.completed-section {
    margin-top: 20px;
    max-height: 800px;
    overflow-y: auto;
}
.completed-section::-webkit-scrollbar { width: 4px; }
.completed-section::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.3); border-radius: 2px; }
.section-title {
    display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
}
.section-title h2 { color: var(--primary-gold); font-size: 1.4rem; }
.live-indicator {
    width: 12px; height: 12px; background: #ff4444; border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.2)} }
.active-count {
    margin-left: auto; padding: 4px 12px; border-radius: 12px; font-size: 0.85rem;
    background: rgba(212,175,55,0.2); color: var(--primary-gold);
}

.auctions-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px;
}

/* 拍卖卡片 */
.auction-card {
    background: rgba(0,0,0,0.2); border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 18px; cursor: pointer;
    transition: all 0.3s ease;
}
.auction-card:hover { border-color: var(--primary-gold); transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
.auction-card.selected { border-color: var(--primary-gold); background: rgba(212,175,55,0.08); }

.card-top { display: flex; gap: 14px; margin-bottom: 12px; }
.card-emoji { font-size: 2.8rem; }
.card-info { flex: 1; }
.card-info h4 { font-size: 1.05rem; color: var(--light-gold); margin-bottom: 4px; }
.card-info .card-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

.card-meta { display: flex; gap: 8px; margin-bottom: 12px; }
.item-category { padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; background: rgba(74,20,140,0.5); color: #ce93d8; }
.item-rarity { padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; background: rgba(212,175,55,0.2); color: var(--primary-gold); }

.card-bid { display: flex; justify-content: space-between; align-items: flex-end; }
.card-price { font-size: 1.4rem; font-weight: bold; color: var(--primary-gold); }
.card-price small { font-size: 0.75rem; color: var(--text-muted); font-weight: normal; }
.card-bidder { font-size: 0.85rem; color: var(--text-muted); text-align: right; }
.card-bidder strong { color: var(--light-gold); }

.card-countdown {
    margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.85rem; color: var(--warning); text-align: center;
    font-family: 'Courier New', monospace;
}

.empty-hint { text-align: center; color: var(--text-muted); padding: 40px 0; font-size: 0.95rem; }

/* ===== 右侧面板 ===== */
.right-panel { display: flex; flex-direction: column; gap: 20px; }

/* 出价详情面板 */
.bid-detail-panel {
    background: var(--card-bg); border-radius: 15px;
    border: 1px solid rgba(212,175,55,0.3); overflow: hidden;
}
.detail-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px; background: rgba(212,175,55,0.1);
    border-bottom: 1px solid rgba(212,175,55,0.2);
}
.detail-header h3 { color: var(--light-gold); font-size: 1.1rem; }
.close-detail-btn {
    background: none; border: none; color: var(--text-muted); font-size: 1.5rem;
    cursor: pointer; line-height: 1;
}
.close-detail-btn:hover { color: white; }
.detail-body { padding: 20px; }

.detail-item-info { display: flex; gap: 15px; margin-bottom: 15px; }
.detail-emoji { font-size: 3rem; }
.detail-desc { color: var(--text-muted); font-size: 0.9rem; flex: 1; line-height: 1.5; }
.detail-meta { display: flex; gap: 8px; margin-top: 8px; }

.countdown-area {
    text-align: center; padding: 12px;
    background: linear-gradient(90deg, rgba(244,208,63,0.1), rgba(212,175,55,0.2));
    border-radius: 8px; margin-bottom: 15px; border: 1px solid rgba(212,175,55,0.3);
}
.countdown-label { display: block; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 4px; }
.countdown-timer { font-size: 1.8rem; font-weight: bold; color: var(--primary-gold); font-family: 'Courier New', monospace; letter-spacing: 2px; }

.detail-bid-info { margin-bottom: 15px; }
.current-bid { text-align: center; margin-bottom: 8px; }
.bid-label { display: block; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 4px; }
.bid-price { font-size: 2.2rem; font-weight: bold; color: var(--primary-gold); text-shadow: 0 0 15px rgba(212,175,55,0.4); }
.bid-currency { font-size: 1rem; color: var(--text-muted); margin-left: 4px; }
.highest-bidder { text-align: center; color: var(--text-muted); font-size: 0.9rem; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
#detailHighestBidder { color: var(--light-gold); font-weight: bold; }

.detail-bid-actions { margin-bottom: 15px; }
.quick-bids { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; }
.quick-bid-btn {
    padding: 10px 20px; border: 2px solid var(--primary-gold); background: transparent;
    color: var(--primary-gold); border-radius: 8px; font-size: 0.95rem; font-weight: bold;
    cursor: pointer; transition: all 0.3s;
}
.quick-bid-btn:hover { background: var(--primary-gold); color: var(--dark-bg); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(212,175,55,0.4); }
.custom-bid { display: flex; gap: 10px; justify-content: center; }
.custom-bid input {
    width: 130px; padding: 10px 12px; border: 2px solid rgba(212,175,55,0.3);
    background: rgba(0,0,0,0.3); color: var(--text-light); border-radius: 8px;
    font-size: 1rem; text-align: center;
}
.custom-bid input:focus { outline: none; border-color: var(--primary-gold); }
.bid-button {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 28px;
    background: linear-gradient(90deg, var(--primary-gold), var(--dark-gold));
    border: none; border-radius: 8px; color: var(--dark-bg);
    font-size: 1rem; font-weight: bold; cursor: pointer; transition: all 0.3s;
}
.bid-button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(212,175,55,0.5); }
.gavel-icon { font-size: 1.1rem; }

.detail-bid-history { background: rgba(0,0,0,0.15); border-radius: 8px; padding: 12px; }
.detail-bid-history h4 { color: var(--primary-gold); margin-bottom: 10px; font-size: 0.95rem; }
.detail-bid-history ul { list-style: none; max-height: 180px; overflow-y: auto; }
.detail-bid-history li {
    display: flex; justify-content: space-between; padding: 8px 12px;
    margin-bottom: 6px; background: rgba(255,255,255,0.04); border-radius: 6px;
    border-left: 3px solid var(--primary-gold); font-size: 0.85rem;
}
.bidder-name { color: var(--text-light); }
.bid-amount { color: var(--light-gold); font-weight: bold; }
.bid-time { color: var(--text-muted); font-size: 0.75rem; }

/* 即将拍卖 & 排行 */
.upcoming-section, .leaderboard-section {
    background: var(--card-bg); border-radius: 15px; padding: 18px;
    border: 1px solid rgba(212,175,55,0.3);
}
.upcoming-section h3, .leaderboard-section h3 { color: var(--primary-gold); margin-bottom: 12px; font-size: 1.1rem; }
.upcoming-list { display: flex; flex-direction: column; gap: 8px; }
.upcoming-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; background: rgba(0,0,0,0.2); border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06); transition: all 0.3s;
}
.upcoming-item .item-icon { font-size: 1.8rem; }
.upcoming-item .item-info { flex: 1; }
.upcoming-item h4 { color: var(--text-light); font-size: 0.9rem; margin-bottom: 3px; }
.upcoming-item .start-price { color: var(--text-muted); font-size: 0.8rem; }

.leaderboard { display: flex; flex-direction: column; gap: 6px; }
.leaderboard-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: rgba(0,0,0,0.2); border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}
.leaderboard-item.current-user { border-color: var(--primary-gold); background: rgba(212,175,55,0.1); }
.leaderboard-item.my-rank {
    border-color: var(--primary-gold);
    background: linear-gradient(90deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
    box-shadow: 0 0 10px rgba(212,175,55,0.2);
}
.leaderboard-item .rank {
    width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
    background: var(--primary-gold); color: var(--dark-bg); border-radius: 50%;
    font-weight: bold; font-size: 0.8rem; flex-shrink: 0;
}
.leaderboard-item .user-name { color: var(--text-light); font-weight: 500; flex: 1; }
.leaderboard-item .user-points { color: var(--light-gold); font-weight: bold; }

/* 排行榜分隔线（用于分隔前12名和当前用户） */
.leaderboard-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-gold), transparent);
    margin: 8px 0;
    opacity: 0.5;
}

/* ===== 一口价按钮 ===== */
.buyout-area { margin-bottom: 15px; }
.buyout-btn {
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 20px;
    background: linear-gradient(90deg, #ff6b35, #f7931e);
    border: none; border-radius: 10px;
    color: white; font-size: 1rem; font-weight: bold;
    cursor: pointer; transition: all 0.3s;
}
.buyout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    background: linear-gradient(90deg, #ff7e4a, #ffa733);
}
.buyout-icon { font-size: 1.2rem; }
.buyout-price { font-size: 1.2rem; font-weight: bold; }
.buyout-unit { font-size: 0.85rem; opacity: 0.9; }

/* 版本标签 */
.version-tag {
    padding: 2px 8px;
    background: rgba(212,175,55,0.2);
    color: var(--primary-gold);
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 10px;
}

/* ===== 登录页面 ===== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-container {
    width: 100%; max-width: 420px; background: var(--card-bg); border-radius: 20px;
    padding: 40px; border: 2px solid var(--primary-gold);
    box-shadow: 0 20px 60px rgba(212,175,55,0.3);
}
.login-header { text-align: center; margin-bottom: 30px; }
.login-header .gavel { font-size: 4rem; display: block; margin-bottom: 15px; animation: gavel-swing 2s ease-in-out infinite; }
.login-header h1 {
    font-size: 2rem;
    background: linear-gradient(90deg, var(--primary-gold), var(--light-gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 5px;
}
.login-header p { color: var(--text-muted); font-size: 0.9rem; }
.login-tabs {
    display: flex; gap: 10px; margin-bottom: 25px;
    background: rgba(0,0,0,0.2); border-radius: 10px; padding: 5px;
}
.tab-btn {
    flex: 1; padding: 12px; border: none; background: transparent;
    color: var(--text-muted); font-size: 1rem; cursor: pointer; border-radius: 8px; transition: all 0.3s;
}
.tab-btn.active { background: var(--primary-gold); color: var(--dark-bg); font-weight: bold; }
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.auth-form.hidden { display: none; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { color: var(--text-light); font-size: 0.9rem; font-weight: 500; }
.form-group input {
    padding: 14px 16px; border: 2px solid rgba(212,175,55,0.3);
    background: rgba(0,0,0,0.3); color: var(--text-light); border-radius: 10px;
    font-size: 1rem; transition: all 0.3s;
}
.form-group input:focus { outline: none; border-color: var(--primary-gold); box-shadow: 0 0 0 3px rgba(212,175,55,0.1); }
.form-group input::placeholder { color: var(--text-muted); }
.auth-btn {
    padding: 14px; background: linear-gradient(90deg, var(--primary-gold), var(--dark-gold));
    border: none; border-radius: 10px; color: var(--dark-bg);
    font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: all 0.3s; margin-top: 10px;
}
.auth-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(212,175,55,0.4); }
.test-accounts { text-align: center; color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }

/* ===== 通知 ===== */
.notification {
    position: fixed; top: 20px; right: 20px; padding: 15px 25px; border-radius: 10px;
    color: white; font-weight: 500; transform: translateX(400px); transition: transform 0.3s; z-index: 1000;
}
.notification.show { transform: translateX(0); }
.notification.success { background: var(--success); }
.notification.error { background: var(--danger); }
.notification.info { background: var(--warning); }

/* ===== 修改昵称 ===== */
.change-name-btn {
    background: none; border: none; font-size: 1rem; cursor: pointer;
    padding: 4px 8px; border-radius: 6px; transition: background 0.2s;
}
.change-name-btn:hover { background: rgba(255,255,255,0.1); }

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 2000;
    display: flex; align-items: center; justify-content: center;
}
.modal-overlay.hidden { display: none; }
.modal-box {
    background: var(--card-bg); border-radius: 14px; padding: 30px;
    width: 90%; max-width: 380px; border: 1px solid rgba(212,175,55,0.3);
    text-align: center;
}
.modal-box h3 { color: var(--light-gold); margin-bottom: 20px; font-size: 1.2rem; }
.modal-box input {
    width: 100%; padding: 12px 14px; border: 2px solid rgba(212,175,55,0.3);
    background: rgba(0,0,0,0.3); color: var(--text-light); border-radius: 8px;
    font-size: 1rem; text-align: center; margin-bottom: 20px;
}
.modal-box input:focus { outline: none; border-color: var(--primary-gold); }
.modal-btns { display: flex; gap: 12px; justify-content: center; }
.modal-btn {
    padding: 10px 28px; border: none; border-radius: 8px; font-size: 0.95rem;
    cursor: pointer; font-weight: bold; transition: all 0.2s;
}
.modal-btn.cancel { background: rgba(255,255,255,0.1); color: var(--text-light); }
.modal-btn.cancel:hover { background: rgba(255,255,255,0.2); }
.modal-btn.confirm { background: var(--primary-gold); color: var(--dark-bg); }
.modal-btn.confirm:hover { background: var(--dark-gold); }

.hidden { display: none !important; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .auction-main { grid-template-columns: 1fr; }
    .auction-header { flex-direction: column; gap: 15px; }
    .user-info { flex-wrap: wrap; justify-content: center; }
    /* 移动端：正在拍卖 → 出价面板 → 已结束 → 排行榜 */
    .auction-list-panel { order: -1; }
    .right-panel { order: 0; }
    .completed-section { order: 1; }
    .leaderboard-section { order: 2; }
}
@media (max-width: 600px) {
    .auctions-grid { grid-template-columns: 1fr; }
    .quick-bids { flex-wrap: wrap; }
    .custom-bid { flex-direction: column; align-items: center; }
    .bid-price { font-size: 1.8rem; }
    .user-profile { display: none; }
}
/* 页脚 */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.page-wrapper .main-content {
    flex: 1;
}
.site-footer {
    text-align: center;
    padding: 15px 20px;
    color: #a0aec0;
    font-size: 0.8rem;
    border-top: 1px solid rgba(212,175,55,0.1);
    background: var(--dark-bg);
    flex-shrink: 0;
}
