/*
    Theme Name: 竞价榜
    Theme URI: https://www.imwpweb.com.com
    Author: Sisyphus
    Author URI: https://www.imwpweb.com
    Description: 竞价排名产品展示主题
    Version: 1.1
    Requires at least: 5.0
    Tested up to: 6.4
    Requires PHP: 7.4
    Text Domain: jingjiabang
    Update URI: http://www.imwpweb.com
*/

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

:root {
    --bg: #f5f5f7; --bg-card: #ffffff; --bg-card-hover: #fafafa;
    --text: #1d1d1f; --text-secondary: #6e6e73; --text-muted: #86868b;
    --border: #d2d2d7; --accent: #0071e3; --accent-hover: #0077ed;
    --accent-green: #34c759;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08); --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

[data-theme="dark"] {
    --bg: #000000; --bg-card: #1c1c1e; --bg-card-hover: #2c2c2e;
    --text: #f5f5f7; --text-secondary: #a1a1a6; --text-muted: #6e6e73;
    --border: #38383a; --accent: #0a84ff; --accent-hover: #409cff;
    --accent-green: #30d158;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3); --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: var(--bg); color: var(--text);
    line-height: 1.47059; font-weight: 400; letter-spacing: -0.022em;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 980px; margin: 0 auto; padding: 0 22px; }

.site-header {
    background: rgba(255,255,255,0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}
[data-theme="dark"] .site-header { background: rgba(0,0,0,0.8); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.site-logo { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { color: var(--text-secondary); font-size: 12px; font-weight: 400; transition: var(--transition); }
.main-nav a:hover { color: var(--text); }

.theme-toggle {
    width: 28px; height: 28px; border-radius: 50%; border: none;
    background: transparent; cursor: pointer; display: flex;
    align-items: center; justify-content: center; transition: var(--transition); font-size: 14px;
}
.theme-toggle:hover { background: var(--bg-card); }

.hero { padding: 80px 0 60px; text-align: center; }
.hero h1 {
    font-size: 56px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.07; margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p { color: var(--text-secondary); font-size: 21px; max-width: 600px; margin: 0 auto 32px; line-height: 1.381; }

.stats-bar { display: flex; justify-content: center; gap: 32px; margin-bottom: 40px; font-size: 14px; color: var(--text-secondary); }
.stats-bar span { display: flex; align-items: center; gap: 8px; }
.stats-bar .dot { width: 8px; height: 8px; background: var(--accent-green); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 24px; border-radius: 980px; font-weight: 500;
    font-size: 17px; letter-spacing: -0.022em; transition: var(--transition);
    cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #ffffff; }
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); }

.claim-box {
    display: inline-flex; align-items: center; gap: 16px;
    background: var(--bg-card); border-radius: var(--radius-xl);
    padding: 8px 8px 8px 20px; box-shadow: var(--shadow-md);
}
.claim-label { font-size: 15px; font-weight: 500; color: var(--text-secondary); }
.claim-bid-control { display: flex; align-items: center; background: var(--bg); border-radius: 980px; padding: 4px; }
.bid-btn {
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: var(--bg-card); color: var(--text); font-size: 18px;
    cursor: pointer; transition: var(--transition); display: flex;
    align-items: center; justify-content: center;
}
.bid-btn:hover { background: var(--border); }
.bid-display { display: flex; align-items: center; gap: 2px; padding: 0 12px; font-size: 17px; font-weight: 600; min-width: 80px; justify-content: center; }
.bid-currency { color: var(--text-muted); font-size: 15px; }

.categories { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.category-tag {
    height: 32px; padding: 0 16px; display: inline-flex; align-items: center;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 980px;
    font-size: 14px; color: var(--text-secondary); cursor: pointer; transition: var(--transition);
}
.category-tag:hover, .category-tag.active { background: var(--text); color: var(--bg); border-color: var(--text); }

.leaderboard { margin-bottom: 60px; }
.leaderboard-item {
    display: flex; align-items: center; padding: 16px 20px; margin-bottom: 8px;
    background: var(--bg-card); border-radius: var(--radius-md);
    transition: var(--transition); border: 1px solid transparent;
}
.leaderboard-item:hover { background: var(--bg-card-hover); border-color: var(--border); }

.rank { width: 32px; font-size: 15px; font-weight: 600; color: var(--text-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.rank-1 { color: var(--accent); }
.rank-2 { color: var(--text-secondary); }
.rank-3 { color: var(--text-muted); }

.item-info { flex: 1; min-width: 0; margin: 0 16px; }
.item-name { font-size: 16px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.022em; line-height: 1.25; }
.item-name a { transition: var(--transition); }
.item-name a:hover { color: var(--accent); }
.item-url { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0.7; margin-top: 1px; }
.item-desc { font-size: 13px; color: var(--text-secondary); margin-top: 4px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.item-bid { text-align: right; flex-shrink: 0; }
.bid-amount { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.022em; color: var(--text); }

.rules-box {
    background: var(--bg); border-radius: var(--radius-md); padding: 16px 20px;
    margin-bottom: 24px;
}
.rules-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; letter-spacing: -0.01em; }
.rules-list { margin: 0; padding-left: 16px; font-size: 13px; color: var(--text-muted); line-height: 1.8; }

.claim-rank-btn {
    display: inline-block; margin-top: 10px; height: 28px; padding: 0 12px;
    line-height: 28px; background: var(--bg); border: 1px solid var(--border);
    border-radius: 980px; font-size: 12px; font-weight: 500; color: var(--text-secondary);
    cursor: pointer; transition: var(--transition);
}
.claim-rank-btn:hover { background: var(--accent); color: #ffffff; border-color: var(--accent); }

.empty-state { text-align: center; padding: 80px 20px; background: var(--bg-card); border-radius: var(--radius-lg); }
.empty-state h3 { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); font-size: 17px; margin-bottom: 24px; }

.site-footer { padding: 20px 0; text-align: center; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); }

.bid-form { background: var(--bg-card); border-radius: var(--radius-lg); padding: 32px; margin-bottom: 40px; box-shadow: var(--shadow-sm); }
.bid-form h2 { font-size: 24px; font-weight: 600; margin-bottom: 24px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.full { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.form-group input, .form-group textarea, .form-group select {
    height: 44px; background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 0 14px; font-size: 15px;
    color: var(--text); transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
}
.form-group textarea { height: auto; min-height: 80px; padding: 12px 14px; resize: vertical; }
.form-group .hint { font-size: 12px; color: var(--text-muted); }

.payment-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.payment-tab {
    flex: 1; height: 44px; background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer;
    transition: var(--transition); font-size: 14px; font-weight: 500;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.payment-tab:hover, .payment-tab.active { border-color: var(--accent); background: rgba(0,113,227,0.05); }
.payment-tab input[type="radio"] { display: none; }
.payment-icon { width: 20px; height: 20px; flex-shrink: 0; }

.bid-input-wrapper { position: relative; }
.bid-input-wrapper input { padding-left: 24px; width: 100%; }
.bid-input-wrapper::before {
    content: '\00A5'; position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%); color: var(--text-muted); font-size: 14px;
}

@media (max-width: 640px) {
    .hero h1 { font-size: 40px; }
    .hero p { font-size: 17px; }
    .stats-bar { flex-direction: column; gap: 8px; }
    .form-row { grid-template-columns: 1fr; }
    .leaderboard-item { flex-wrap: wrap; }
    .item-info { width: calc(100% - 48px); }
    .item-bid { width: 100%; text-align: left; margin-top: 12px; padding-left: 48px; }
    .claim-box { flex-wrap: wrap; justify-content: center; }
}
