/* ========================================
   CSS Variables & Reset
======================================== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --accent: #f59e0b;
    --background: #0f172a;
    --background-light: #1e293b;
    --surface: #334155;
    --surface-light: #475569;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #64748b;
    --border: #334155;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-2: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    --gradient-sold: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s ease;
    --header-bg: rgba(15, 23, 42, 0.9);
    --card-bg: var(--background-light);
}

/* Light Theme */
[data-theme="light"] {
    --background: #f1f5f9;
    --background-light: #ffffff;
    --surface: #e2e8f0;
    --surface-light: #cbd5e1;
    --text: #0f172a;
    --text-muted: #475569;
    --text-dark: #64748b;
    --border: #cbd5e1;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --header-bg: rgba(241, 245, 249, 0.95);
    --card-bg: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Top Contact Bar
======================================== */
.top-bar {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    padding: 8px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition);
}

.contact-item:hover {
    color: white;
}

.contact-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.top-bar-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* ========================================
   Header
======================================== */
.header {
    position: fixed;
    top: 36px;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.logo-text .year {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
    border-radius: 2px;
}

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

.nav-link:hover::after {
    width: 50%;
}

.nav-link.active {
    color: var(--text);
    background: rgba(99, 102, 241, 0.1);
}

.nav-link.active::after {
    width: 50%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* Mobile menu button animation when active */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Hero Section
======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 108px; /* 36px top-bar + 72px header */
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 80% at 50% -20%, rgba(99, 102, 241, 0.3), transparent),
        radial-gradient(ellipse 60% 60% at 80% 50%, rgba(139, 92, 246, 0.15), transparent),
        radial-gradient(ellipse 50% 50% at 20% 80%, rgba(16, 185, 129, 0.1), transparent);
}

.hero-content {
    position: relative;
    max-width: 700px;
    padding: 60px 0;
}

.hero-badge {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.2); }
    50% { box-shadow: 0 0 30px rgba(99, 102, 241, 0.4); }
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    margin-bottom: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.stat-item {
    padding: 16px 24px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* ========================================
   Buttons
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-light);
    border-color: var(--primary);
}

.btn-success {
    background: var(--gradient-sold);
    color: white;
    font-size: 1.25rem;
    padding: 16px 48px;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

.btn-danger {
    background: var(--danger);
    color: white;
    padding: 16px 32px;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-icon {
    font-size: 1.2em;
}

/* ========================================
   Auction Section
======================================== */
.auction-section {
    padding: 100px 0;
    background: var(--background-light);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-top: 16px;
}

.auction-controls {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 40px;
}

/* Auction Arena */
.auction-arena {
    margin-bottom: 60px;
}

.current-player-card {
    background: var(--surface);
    border: 2px solid var(--primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 0 60px rgba(99, 102, 241, 0.3);
    animation: card-glow 3s ease-in-out infinite;
    position: relative;
}

.current-player-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-xl);
    background: linear-gradient(45deg, var(--primary), var(--primary-light), #a855f7, var(--primary));
    background-size: 300% 300%;
    z-index: -1;
    animation: gradient-rotate 4s linear infinite;
}

@keyframes card-glow {
    0%, 100% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 60px rgba(99, 102, 241, 0.5); }
}

@keyframes gradient-rotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.player-spotlight {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 40px;
    background: linear-gradient(135deg, var(--surface) 0%, var(--background-light) 100%);
}

.player-avatar {
    width: 160px;
    height: 200px;
    border-radius: var(--radius-lg);
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    color: white;
    border: 4px solid var(--primary-light);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    overflow: hidden;
    flex-shrink: 0;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--background);
}

.player-details h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.player-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.meta-item {
    padding: 6px 14px;
    background: var(--background);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.player-skills {
    display: flex;
    gap: 24px;
}

.skill {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skill-label {
    font-size: 0.75rem;
    color: var(--text-dark);
    text-transform: uppercase;
}

.skill-value {
    font-weight: 600;
    color: var(--primary-light);
}

/* Bidding Section */
.bidding-section {
    padding: 32px 40px;
    background: var(--background);
}

.price-display {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 32px;
}

.base-price, .current-bid {
    text-align: center;
}

.price-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.price-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
}

.price-value.highlight {
    font-size: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: price-pulse 1.5s ease-in-out infinite;
}

@keyframes price-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.bid-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.bid-btn {
    padding: 12px 24px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.bid-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bid-btn span {
    position: relative;
    z-index: 1;
}

.bid-btn:hover {
    border-color: var(--primary);
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.bid-btn:hover::before {
    opacity: 1;
}

.bid-btn:active {
    transform: scale(1.02);
}

.team-select-section {
    text-align: center;
    margin-bottom: 24px;
}

.team-select-section label {
    display: block;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.team-select {
    padding: 12px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 1rem;
    min-width: 250px;
    cursor: pointer;
}

.team-select:focus {
    outline: none;
    border-color: var(--primary);
}

.auction-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Auction Players Grid */
.auction-players {
    margin-top: 40px;
}

.auction-players h3 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.players-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.player-mini-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.player-mini-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.player-mini-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
}

.player-mini-card:hover::before {
    left: 100%;
}

.player-mini-card.sold {
    opacity: 0.5;
    pointer-events: none;
    border-color: var(--success);
}

.player-mini-card.sold::after {
    content: 'SOLD';
    display: block;
    margin-top: 8px;
    padding: 4px 8px;
    background: var(--success);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.player-mini-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.2);
}

.mini-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 12px;
    overflow: hidden;
}

.mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.mini-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mini-price {
    margin-top: 8px;
    font-weight: 700;
    color: var(--secondary);
}

/* ========================================
   Players Section
======================================== */
.players-section {
    padding: 100px 0;
}

.filters-wrapper {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    padding: 24px;
    background: var(--background-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-input::placeholder {
    color: var(--text-dark);
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--text);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Players Grid */
.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.player-card {
    background: var(--background-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.player-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.player-card:hover::before {
    transform: scaleX(1);
}

.player-card.sold {
    border-color: var(--success);
}

.player-card-header {
    position: relative;
    padding: 24px;
    background: linear-gradient(135deg, var(--surface) 0%, var(--background-light) 100%);
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    border: 3px solid var(--primary);
    overflow: hidden;
}

.player-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-info {
    flex: 1;
}

.player-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.player-flat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.player-role-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    background: var(--primary);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.player-role-badge.batsman {
    background: #3b82f6;
}

.player-role-badge.bowler {
    background: #ef4444;
}

.player-role-badge.all-rounder {
    background: #10b981;
}

.player-role-badge.wicketkeeper {
    background: #f59e0b;
}

.player-card-body {
    padding: 20px 24px;
}

.player-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.player-stat {
    text-align: center;
    padding: 12px;
    background: var(--surface);
    border-radius: var(--radius-sm);
}

.player-stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.player-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.player-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.price-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
}

.sold-badge {
    background: var(--success);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-align: center;
    margin-top: 12px;
}

.sold-to {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
}

/* ========================================
   Teams Section
======================================== */
.teams-section {
    padding: 100px 0;
    background: var(--background-light);
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.team-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.team-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.team-card:hover::after {
    opacity: 1;
}

.team-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.team-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
}

.team-logo.has-logo {
    border: 2px solid var(--border);
}

.team-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-name {
    font-size: 1.25rem;
    font-weight: 700;
}

.team-budget {
    text-align: right;
}

.budget-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.budget-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
}

.team-players {
    padding: 16px 24px;
    background: var(--background);
}

.team-players-title {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.player-count {
    background: var(--surface);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
}

.team-player-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--surface);
    border-radius: var(--radius-sm);
}

.team-player-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.team-player-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.team-player-flat {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.team-player-role {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--background);
    color: var(--text-muted);
}

.captain-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    background: var(--accent);
    border-radius: 4px;
    color: white;
    margin-left: 8px;
}

.empty-slot {
    padding: 10px 14px;
    background: var(--background);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    color: var(--text-dark);
    font-size: 0.875rem;
}

/* ========================================
   Footer
======================================== */
.footer {
    padding: 50px 0 40px;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, var(--background) 0%, rgba(99, 102, 241, 0.02) 100%);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--gradient-1);
    border-radius: 3px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-text {
    color: var(--text-muted);
}

.footer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Export Dropdown */
.export-dropdown {
    position: relative;
}

.export-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
}

.export-toggle svg {
    flex-shrink: 0;
}

.export-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: var(--background-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
    overflow: hidden;
}

.export-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.export-menu button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text);
    text-align: left;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.export-menu button:hover {
    background: var(--primary);
    color: white;
}

.export-menu button:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

/* ========================================
   Modal
======================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--background-light);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.modal-close svg {
    width: 20px;
    height: 20px;
    color: var(--text);
}

.modal-close:hover {
    background: var(--danger);
}

.modal-body {
    padding: 32px;
}

/* Player Modal Specific Styles */
.modal-player {
    max-width: 800px;
}

.player-modal-body {
    padding: 0;
}

.player-modal-layout {
    display: flex;
    min-height: 400px;
}

.player-modal-info {
    flex: 1;
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.player-modal-header {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.player-modal-role {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.player-modal-role.batsman { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: white; }
.player-modal-role.bowler { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.player-modal-role.allrounder { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.player-modal-role.wicketkeeper { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }

.player-modal-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.player-modal-status.available { background: var(--surface); color: var(--text-muted); }
.player-modal-status.sold { background: var(--success); color: white; }
.player-modal-status.unsold { background: var(--danger); color: white; }

.player-modal-name {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.player-modal-flat {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
}

.player-modal-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.player-modal-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    padding: 14px 18px;
    border-radius: var(--radius-md);
}

.player-modal-stat .stat-icon {
    font-size: 1.5rem;
}

.player-modal-stat .stat-details {
    display: flex;
    flex-direction: column;
}

.player-modal-stat .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-modal-stat .stat-value {
    font-weight: 600;
    font-size: 0.95rem;
}

.player-modal-price-section {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.player-modal-price-section .price-item {
    flex: 1;
    background: var(--surface);
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
}

.player-modal-price-section .price-item.sold {
    background: linear-gradient(135deg, var(--success), #16a34a);
}

.player-modal-price-section .price-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.player-modal-price-section .price-item.sold .price-label {
    color: rgba(255,255,255,0.8);
}

.player-modal-price-section .price-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.player-modal-price-section .price-item.sold .price-amount {
    color: white;
}

.player-modal-team {
    margin-top: auto;
}

.player-modal-team .team-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.player-modal-team .team-info-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 2px solid;
}

.player-modal-team .team-short {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
}

.player-modal-team .team-name {
    font-weight: 600;
    font-size: 1rem;
}

.player-modal-photo {
    width: 320px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    overflow: hidden;
}

.player-modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--background);
}

.player-modal-photo .photo-placeholder {
    font-size: 5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
}

/* ========================================
   Sold Overlay Animation
======================================== */
.sold-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
}

.sold-overlay.active {
    display: flex;
    animation: overlay-fade-in 0.3s ease;
}

@keyframes overlay-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sold-content {
    text-align: center;
    animation: soldAnimation 0.5s ease;
}

@keyframes soldAnimation {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.sold-content .sold-badge {
    font-size: 4rem;
    font-weight: 900;
    background: var(--gradient-sold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    animation: pulse 1s infinite;
}

.sold-player {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.sold-team {
    font-size: 1.5rem;
    color: var(--primary-light);
    margin-bottom: 8px;
}

.sold-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* ========================================
   Responsive - Mobile First Approach
======================================== */

/* Container adjustments for mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    /* Top Bar Mobile */
    .top-bar {
        padding: 6px 0;
    }

    .top-bar-content {
        flex-direction: column;
        gap: 4px;
    }

    .contact-info {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .contact-item {
        font-size: 0.7rem;
    }

    .contact-item span {
        display: none;
    }

    .contact-item svg {
        width: 18px;
        height: 18px;
    }

    .top-bar-text {
        display: none;
    }

    /* Header Mobile */
    .header {
        top: 32px;
    }

    .header-content {
        height: 60px;
    }

    .logo {
        font-size: 1.25rem;
        gap: 8px;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    .nav {
        display: none;
        position: fixed;
        top: 92px; /* 32px top-bar + 60px header */
        left: 0;
        right: 0;
        background: var(--background);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border);
        z-index: 999;
    }

    .nav.active {
        display: flex;
    }

    .nav-link {
        padding: 12px 16px;
        text-align: center;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .header-actions {
        margin-right: 8px;
        margin-left: 0;
    }

    .header-actions .btn {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    /* Hero Mobile */
    .hero {
        min-height: auto;
        padding-top: 110px; /* 32px top-bar + 60px header + padding */
        padding-bottom: 40px;
    }

    .hero-content {
        padding: 30px 0;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
        margin-bottom: 16px;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 16px;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    .hero-stats {
        gap: 16px;
        margin-bottom: 24px;
        justify-content: space-between;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    /* Section padding */
    .auction-section,
    .players-section,
    .teams-section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 32px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* Auction Controls */
    .auction-controls {
        flex-direction: column;
        gap: 12px;
        padding: 0 16px;
    }

    .auction-controls .btn {
        width: 100%;
    }

    /* Auction Arena */
    .current-player-card {
        border-radius: var(--radius-lg);
        margin: 0 8px;
    }

    .player-spotlight {
        flex-direction: column;
        text-align: center;
        padding: 24px 16px;
        gap: 16px;
    }

    .player-avatar {
        width: 120px;
        height: 150px;
        font-size: 2rem;
    }

    .player-details h2 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .player-meta {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .meta-item {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    .player-skills {
        justify-content: center;
        gap: 16px;
    }

    .skill-label {
        font-size: 0.65rem;
    }

    .skill-value {
        font-size: 0.85rem;
    }

    /* Bidding Section Mobile */
    .bidding-section {
        padding: 20px 16px;
    }

    .price-display {
        flex-direction: row;
        gap: 20px;
        margin-bottom: 20px;
    }

    .price-value {
        font-size: 1.5rem;
    }

    .price-value.highlight {
        font-size: 2rem;
    }

    .bid-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin-bottom: 16px;
    }

    .bid-btn {
        padding: 10px 16px;
        font-size: 0.875rem;
        flex: 1;
        min-width: 80px;
    }

    .custom-bid-section {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 16px;
    }

    .custom-bid-input {
        width: 100%;
    }

    .team-select-section {
        margin-bottom: 16px;
    }

    .team-select {
        width: 100%;
        min-width: auto;
        padding: 10px 16px;
    }

    .auction-actions {
        flex-direction: row;
        gap: 12px;
    }

    .auction-actions .btn {
        flex: 1;
        padding: 14px 16px;
        font-size: 1rem;
    }

    /* Teams Quick View */
    .teams-quick-view {
        margin: 24px 8px;
        padding: 16px;
    }

    .teams-quick-view h3 {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }

    .teams-budget-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .team-budget-card {
        padding: 10px 12px;
    }

    .team-budget-logo {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .team-budget-name {
        font-size: 0.85rem;
    }

    .team-budget-slots {
        font-size: 0.7rem;
    }

    /* Auction Players Grid */
    .auction-players {
        margin-top: 24px;
        padding: 0 8px;
    }

    .auction-players h3 {
        font-size: 1.25rem;
        margin-bottom: 16px;
    }

    .players-mini-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .player-mini-card {
        padding: 12px 8px;
    }

    .mini-avatar {
        width: 50px;
        height: 50px;
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .mini-name {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mini-role {
        font-size: 0.65rem;
    }

    .mini-price {
        font-size: 0.85rem;
        margin-top: 6px;
    }

    /* Filters */
    .filters-wrapper {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 16px;
    }

    .search-box {
        min-width: auto;
    }

    .search-input {
        padding: 10px 16px 10px 44px;
    }

    .filter-buttons {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 6px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        padding: 8px 12px;
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Players Grid */
    .players-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .player-card-header {
        padding: 16px;
        gap: 12px;
    }

    .player-image {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
    }

    .player-name {
        font-size: 1rem;
    }

    .player-role-badge {
        padding: 4px 8px;
        font-size: 0.65rem;
        top: 12px;
        right: 12px;
    }

    .player-card-body {
        padding: 16px;
    }

    .player-stats-row {
        gap: 12px;
        margin-bottom: 16px;
    }

    .player-stat {
        padding: 10px 8px;
    }

    .player-stat-value {
        font-size: 0.8rem;
    }

    .player-stat-label {
        font-size: 0.6rem;
    }

    /* Teams Grid */
    .teams-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .team-header {
        padding: 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .team-logo {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .team-name {
        font-size: 1.1rem;
    }

    .team-edit-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    .budget-value {
        font-size: 1.1rem;
    }

    .team-players {
        padding: 12px 16px;
    }

    .team-player-item {
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .team-player-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }

    .team-player-name {
        font-size: 0.85rem;
    }

    .team-player-role {
        font-size: 0.65rem;
        padding: 3px 6px;
    }

    .captain-badge {
        font-size: 0.6rem;
        padding: 1px 4px;
        margin-left: 4px;
    }

    /* Footer */
    .footer {
        padding: 24px 0;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .footer-brand {
        font-size: 1.1rem;
    }

    .footer-text {
        font-size: 0.875rem;
    }

    .footer-credit {
        font-size: 0.75rem;
    }

    #adminResetBtn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }

    /* Modals */
    .modal-content {
        margin: 10px;
        max-height: 95vh;
        border-radius: var(--radius-lg);
    }

    .modal-body {
        padding: 20px;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
    }

    /* Player Modal Mobile */
    .player-modal-layout {
        flex-direction: column-reverse;
        min-height: auto;
    }

    .player-modal-photo {
        width: 100%;
        height: 200px;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .player-modal-photo .photo-placeholder {
        font-size: 3rem;
    }

    .player-modal-info {
        padding: 20px;
    }

    .player-modal-name {
        font-size: 1.5rem;
    }

    .player-modal-stats {
        gap: 8px;
    }

    .player-modal-stat {
        padding: 10px 14px;
    }

    .player-modal-stat .stat-icon {
        font-size: 1.25rem;
    }

    .player-modal-price-section {
        gap: 10px;
    }

    .player-modal-price-section .price-item {
        padding: 12px;
    }

    .player-modal-price-section .price-amount {
        font-size: 1.25rem;
    }

    /* Team Edit Modal */
    .team-edit-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .team-edit-logo {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .team-edit-info h3 {
        font-size: 1.25rem;
    }

    .team-edit-player-item {
        padding: 10px 12px;
    }

    .team-edit-player-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
    }

    .team-edit-player-name {
        font-size: 0.9rem;
    }

    .remove-player-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    .add-player-select {
        font-size: 0.9rem;
        padding: 10px 12px;
    }

    /* Sold Overlay */
    .sold-content .sold-badge {
        font-size: 2.5rem;
        margin-bottom: 16px;
    }

    .sold-player {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }

    .sold-team {
        font-size: 1.25rem;
    }

    .sold-price {
        font-size: 2rem;
    }

    /* Random Overlay */
    .random-spinner {
        font-size: 4rem;
    }

    .random-text {
        font-size: 1.25rem;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .container {
        padding: 0 12px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .stat-item {
        text-align: center;
    }

    .players-mini-grid {
        grid-template-columns: 1fr;
    }

    .bid-controls {
        flex-direction: column;
    }

    .bid-btn {
        width: 100%;
    }

    .auction-actions {
        flex-direction: column;
    }

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

/* Landscape mode on phones */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
    }

    .hero-content {
        padding: 20px 0;
    }

    .player-spotlight {
        flex-direction: row;
        text-align: left;
    }

    .player-avatar {
        width: 100px;
        height: 130px;
    }
}

/* ========================================
   Scrollbar
======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ========================================
   Additional Buttons
======================================== */
.btn-accent {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* ========================================
   Teams Quick View (in Auction Section)
======================================== */
.teams-quick-view {
    margin: 40px 0;
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.teams-quick-view h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.teams-budget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.team-budget-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--background);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.team-budget-card:hover {
    border-color: var(--primary);
}

.team-budget-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-budget-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
}

.team-budget-logo.has-logo {
    border: 2px solid var(--border);
}

.team-budget-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-budget-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.team-budget-slots {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.team-budget-amount {
    text-align: right;
}

.team-budget-value {
    font-weight: 700;
    color: var(--secondary);
}

.team-budget-value.low {
    color: var(--danger);
}

.available-count {
    color: var(--primary-light);
    font-weight: 600;
}

/* ========================================
   Admin Modal
======================================== */
.modal-small {
    max-width: 400px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.admin-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 1rem;
}

.admin-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ========================================
   Random Overlay Animation
======================================== */
.random-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
}

.random-overlay.active {
    display: flex;
}

.random-content {
    text-align: center;
}

.random-spinner {
    font-size: 6rem;
    animation: spin 0.5s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.random-text {
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* ========================================
   Team Edit Modal
======================================== */
.team-edit-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.team-edit-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
}

.team-edit-logo.has-logo {
    border: 2px solid var(--border);
}

.team-edit-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-edit-info h3 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.team-edit-budget {
    color: var(--secondary);
    font-weight: 600;
}

.team-edit-players {
    margin-top: 20px;
}

.team-edit-players h4 {
    margin-bottom: 12px;
    color: var(--text-muted);
}

.team-edit-player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--surface);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.team-edit-player-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-edit-player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
}

.team-edit-player-details {
    display: flex;
    flex-direction: column;
}

.team-edit-player-name {
    font-weight: 600;
}

.team-edit-player-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.remove-player-btn {
    padding: 6px 12px;
    background: var(--danger);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.remove-player-btn:hover {
    background: #dc2626;
}

.remove-player-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.add-player-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.add-player-section h4 {
    margin-bottom: 12px;
    color: var(--text-muted);
}

.add-player-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 12px;
}

.add-player-price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.add-player-price label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.add-player-price input {
    flex: 1;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 1rem;
}

.btn-add-player {
    width: 100%;
    padding: 12px;
    background: var(--gradient-sold);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-player:hover {
    transform: translateY(-2px);
}

.btn-add-player:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Team Card Edit Button */
.team-edit-btn {
    padding: 6px 12px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-left: auto;
}

.team-edit-btn:hover {
    background: var(--primary-dark);
}

/* ========================================
   Header Actions & Admin Login
======================================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    margin-right: 16px;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.25rem;
}

.theme-toggle:hover {
    background: var(--surface-light);
    transform: scale(1.05);
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
}

/* Admin Mode Indicator */
body.admin-mode .header-actions .btn-secondary {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* ========================================
   Custom Bid Section
======================================== */
.custom-bid-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.custom-bid-input {
    width: 150px;
    padding: 12px 16px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 1rem;
    text-align: center;
}

.custom-bid-input:focus {
    outline: none;
    border-color: var(--primary);
}

.custom-bid-btn {
    background: var(--primary);
    border-color: var(--primary);
}

.reset-btn {
    background: var(--warning);
    border-color: var(--warning);
    color: white;
}

.reset-btn:hover {
    background: #d97706;
    border-color: #d97706;
}

/* ========================================
   Add Player Form Styles
======================================== */
.modal-medium {
    max-width: 500px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-input {
    padding: 12px 16px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Mobile styles for form */
@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Footer Credit
======================================== */
.footer-center {
    text-align: center;
}

.footer-credit {
    font-size: 0.875rem;
    color: var(--primary-light);
    margin-top: 4px;
}

/* ========================================
   Admin Mode Styles
======================================== */
body:not(.admin-mode) .bid-controls,
body:not(.admin-mode) .custom-bid-section,
body:not(.admin-mode) .auction-actions,
body:not(.admin-mode) .team-select-section {
    opacity: 0.6;
    pointer-events: none;
}

body:not(.admin-mode) .bid-controls::after {
    content: 'Admin mode required';
    display: block;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 8px;
}

/* ========================================
   Touch-friendly Improvements
======================================== */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets for touch devices */
    .btn {
        min-height: 44px;
    }

    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .filter-btn {
        min-height: 40px;
    }

    .bid-btn {
        min-height: 44px;
    }

    .player-mini-card {
        min-height: 120px;
    }

    /* Remove hover effects on touch devices */
    .btn:hover,
    .player-card:hover,
    .player-mini-card:hover,
    .team-budget-card:hover {
        transform: none;
    }

    /* Add active states instead */
    .btn:active {
        transform: scale(0.98);
    }

    .player-card:active,
    .player-mini-card:active {
        transform: scale(0.98);
        border-color: var(--primary);
    }
}

/* Prevent text selection on buttons for touch */
.btn,
.bid-btn,
.filter-btn {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Better scrolling on iOS */
.players-mini-grid,
.teams-budget-grid,
.filter-buttons {
    -webkit-overflow-scrolling: touch;
}

/* Prevent zoom on input focus on iOS */
@media (max-width: 768px) {
    input[type="text"],
    input[type="number"],
    input[type="password"],
    select {
        font-size: 16px !important;
    }
}

/* ========================================
   Responsive Header Actions
======================================== */
@media (max-width: 768px) {
    .header-actions {
        margin-right: 8px;
    }

    .header-actions .btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .custom-bid-section {
        flex-direction: column;
    }

    .custom-bid-input {
        width: 100%;
    }
}
