:root {
    --bg-page: #080c16;
    --bg-page-secondary: #0d1322;
    --bg-card: rgba(15, 22, 38, 0.75);
    --bg-card-solid: #0f172a;
    --bg-card-hover: rgba(24, 34, 58, 0.9);
    --bg-card-border: rgba(255, 255, 255, 0.08);
    --bg-card-border-hover: rgba(99, 102, 241, 0.4);
    --bg-input: #0a0f1d;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-indigo: #6366f1;
    --accent-purple: #8b5cf6;
    --accent-blue: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --accent-gradient-hover: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    --accent-gradient-orange: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    --accent-gradient-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gold: #f59e0b;
    --gold-glow: rgba(245, 158, 11, 0.25);
    --silver: #94a3b8;
    --bronze: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #38bdf8;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    background-color: var(--bg-page);
    background-image: 
        radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(245, 158, 11, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: #7dd3fc;
}

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

.brand-text {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 60%, #818cf8 100%);
    -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.55rem;
    border-radius: 9999px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    margin-left: 0.5rem;
}

/* Buttons */
.btn-primary-bidup {
    background: var(--accent-gradient);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 1.3rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-primary-bidup:hover {
    background: var(--accent-gradient-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.btn-secondary-bidup {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--bg-card-border);
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 1.2rem;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn-secondary-bidup:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-bidup-action {
    background: var(--accent-gradient-orange);
    color: #0f172a !important;
    border: none;
    font-weight: 700;
    border-radius: 8px;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.btn-bidup-action:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5);
    color: #0f172a !important;
}

/* Cards */
.card-bidup {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--bg-card-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card-bidup:hover {
    border-color: var(--bg-card-border-hover);
    box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.5), 0 0 15px -3px rgba(99, 102, 241, 0.15);
}

/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--bg-card-border);
    border-radius: 14px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* 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);
    backdrop-filter: blur(14px);
    border-radius: 18px;
    padding: 1.85rem 1.25rem;
    text-align: center;
    position: relative;
    border: 1px solid var(--bg-card-border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.podium-card.rank-1 {
    border-color: #f59e0b;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.12) 0%, rgba(15, 23, 42, 0.95) 100%);
    transform: scale(1.04);
    z-index: 2;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(245, 158, 11, 0.25);
}

.podium-card.rank-2 {
    border-color: rgba(148, 163, 184, 0.6);
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.08) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.podium-card.rank-3 {
    border-color: rgba(217, 119, 6, 0.6);
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.08) 0%, rgba(15, 23, 42, 0.95) 100%);
}

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

.rank-1 .podium-rank-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: #0f172a;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.rank-2 .podium-rank-badge {
    background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
    color: #0f172a;
}

.rank-3 .podium-rank-badge {
    background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
    color: #ffffff;
}

.podium-avatar {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    margin-bottom: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

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

.leaderboard-table th {
    background: rgba(10, 15, 28, 0.75);
    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: 0.95rem 1.25rem;
}

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

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

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

.bid-badge {
    font-weight: 700;
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    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: 10px;
    padding: 0.7rem 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control-bidup:focus, .form-select-bidup:focus {
    background-color: var(--bg-input);
    border-color: var(--accent-indigo);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

/* Footer */
.footer-bidup {
    background: #050811;
    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;
    transition: color 0.15s ease;
}

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

/* Badges */
.badge-gold {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-silver {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-bronze {
    background: rgba(217, 119, 6, 0.15);
    color: #fb923c;
    border: 1px solid rgba(217, 119, 6, 0.3);
}

.badge-success-subtle {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-indigo-subtle {
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
}
