:root {
    --bg-page: #090d16;
    --bg-card: #111827;
    --bg-card-hover: #1a2234;
    --bg-card-border: #1f293d;
    --bg-input: #0b1120;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-purple: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --accent-gradient-orange: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gold: #f59e0b;
    --silver: #94a3b8;
    --bronze: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

[data-bs-theme="light"] {
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-card-border: #e2e8f0;
    --bg-input: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: #60a5fa;
}

/* Navbar */
.navbar-bidup {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--bg-card-border);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand-text {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    margin-left: 0.5rem;
}

/* Buttons */
.btn-primary-bidup {
    background: var(--accent-gradient);
    color: #ffffff;
    border: none;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.6rem 1.4rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary-bidup:hover {
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.btn-secondary-bidup {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--bg-card-border);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.6rem 1.4rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-secondary-bidup:hover {
    background: var(--bg-card-hover);
    border-color: #3b82f6;
    color: var(--text-primary);
}

.btn-bidup-action {
    background: var(--accent-gradient-orange);
    color: #ffffff;
    border: none;
    font-weight: 700;
    border-radius: 6px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    transition: transform 0.15s ease;
}

.btn-bidup-action:hover {
    color: #ffffff;
    transform: scale(1.03);
}

/* Cards */
.card-bidup {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card-bidup:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Hero Section */
.hero-gradient {
    position: relative;
    padding: 5rem 0 3.5rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
}

/* Podiums (Top 3) */
.podium-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: flex-end;
    margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
    .podium-container {
        grid-template-columns: 1fr;
    }
}

.podium-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.75rem 1.25rem;
    text-align: center;
    position: relative;
    border: 1px solid var(--bg-card-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.podium-card.rank-1 {
    border-color: #f59e0b;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, var(--bg-card) 100%);
    transform: scale(1.04);
    z-index: 2;
}

.podium-card.rank-2 {
    border-color: #94a3b8;
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.08) 0%, var(--bg-card) 100%);
}

.podium-card.rank-3 {
    border-color: #d97706;
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.08) 0%, var(--bg-card) 100%);
}

.podium-rank-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.rank-1 .podium-rank-badge {
    background: #f59e0b;
    color: #0f172a;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.rank-2 .podium-rank-badge {
    background: #94a3b8;
    color: #0f172a;
}

.rank-3 .podium-rank-badge {
    background: #d97706;
    color: #ffffff;
}

.podium-avatar {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 0.75rem;
    border: 2px solid var(--bg-card-border);
}

/* Leaderboard Table & Mobile Cards */
.leaderboard-table-container {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 12px;
    overflow: hidden;
}

.leaderboard-table {
    width: 100%;
    margin-bottom: 0;
    color: var(--text-primary);
}

.leaderboard-table th {
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid var(--bg-card-border);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 1rem 1.25rem;
}

.leaderboard-table td {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--bg-card-border);
    vertical-align: middle;
}

.leaderboard-table tr:hover td {
    background: var(--bg-card-hover);
}

.rank-num {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-muted);
    width: 40px;
}

.rank-1-cell .rank-num { color: #f59e0b; }
.rank-2-cell .rank-num { color: #94a3b8; }
.rank-3-cell .rank-num { color: #d97706; }

.listing-logo-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    background: #1e293b;
    border: 1px solid var(--bg-card-border);
}

.bid-badge {
    font-weight: 700;
    color: var(--success);
    background: rgba(16, 185, 129, 0.12);
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* Form Controls */
.form-control-bidup, .form-select-bidup {
    background-color: var(--bg-input);
    border: 1px solid var(--bg-card-border);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
}

.form-control-bidup:focus, .form-select-bidup:focus {
    background-color: var(--bg-input);
    border-color: var(--accent-blue);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Footer */
.footer-bidup {
    background: #060910;
    border-top: 1px solid var(--bg-card-border);
    padding: 4rem 0 2rem 0;
    margin-top: auto;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-link:hover {
    color: var(--text-primary);
}

/* Badge Preview */
.badge-preview-box {
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.85rem;
    color: #38bdf8;
    overflow-x: auto;
}
