/* Basant Leaderboard - Modern Mobile-First CSS */

/* Variables */
:root {
    --primary: #FF6B35;
    --primary-dark: #E55A2B;
    --primary-light: #FF8F66;
    --secondary: #4ECDC4;
    --secondary-dark: #3DB9B1;
    --accent: #FFE66D;
    --success: #2ECC71;
    --warning: #F1C40F;
    --danger: #E74C3C;
    --dark: #2C3E50;
    --light: #F8FAFC;
    --gray: #94A3B8;
    --gold: #FFD700;
    --silver: #C0C0C0;
    --bronze: #CD7F32;

    /* Gradients */
    --gradient-sky: linear-gradient(180deg, #87CEEB 0%, #B0E0E6 50%, #F0F8FF 100%);
    --gradient-sunset: linear-gradient(135deg, #FFB88C 0%, #DE6262 100%);
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 30px rgba(255,107,53,0.3);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-sky);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ===== ANIMATED KITES BACKGROUND ===== */
.kites-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.kite {
    position: absolute;
    width: 60px;
    height: 70px;
    animation: kiteFloat 20s ease-in-out infinite;
}

.kite svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2));
}

.kite-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.kite-2 {
    top: 25%;
    right: 15%;
    animation-delay: -5s;
    animation-duration: 22s;
    width: 50px;
    height: 58px;
}

.kite-3 {
    top: 45%;
    left: 20%;
    animation-delay: -10s;
    animation-duration: 25s;
    width: 45px;
    height: 52px;
}

.kite-4 {
    top: 60%;
    right: 25%;
    animation-delay: -15s;
    animation-duration: 20s;
    width: 55px;
    height: 64px;
}

@keyframes kiteFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(-5deg);
    }
    25% {
        transform: translate(30px, -40px) rotate(8deg);
    }
    50% {
        transform: translate(-20px, -20px) rotate(-3deg);
    }
    75% {
        transform: translate(15px, -60px) rotate(5deg);
    }
}

/* Kite strings */
.kite::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 50%;
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, rgba(139,69,19,0.6), transparent);
    transform-origin: top;
    animation: stringWave 3s ease-in-out infinite;
}

@keyframes stringWave {
    0%, 100% {
        transform: translateX(-50%) rotate(0deg);
    }
    50% {
        transform: translateX(-50%) rotate(5deg);
    }
}

/* ===== CONTAINER ===== */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 16px;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .container {
        padding: 24px 20px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 900px;
    }
}

/* ===== NAVIGATION ===== */
.navbar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(255,107,53,0.1);
    margin: 0;
}

.nav-brand a {
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 4px;
}

.brand-kite {
    display: inline-block;
    width: 18px;
    height: 24px;
    animation: kiteWobble 2s ease-in-out infinite;
    transform-origin: bottom center;
}

.brand-kite svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.15));
}

@keyframes kiteWobble {
    0%, 100% {
        transform: rotate(-8deg) translateY(0);
    }
    25% {
        transform: rotate(5deg) translateY(-2px);
    }
    50% {
        transform: rotate(-5deg) translateY(-1px);
    }
    75% {
        transform: rotate(8deg) translateY(-2px);
    }
}

.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-links a {
    color: var(--dark);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
    white-space: nowrap;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition-normal);
}

.nav-links a:hover::after {
    width: 60%;
}

.nav-links a.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-links a.active::after {
    width: 80%;
    background: var(--gradient-primary);
}

.nav-links a:hover {
    background: rgba(255,107,53,0.1);
    color: var(--primary);
}

.btn-login {
    background: var(--gradient-primary) !important;
    color: white !important;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-full) !important;
}

.btn-login::after {
    display: none !important;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-logout {
    color: var(--gray) !important;
    font-size: 0.7rem !important;
}

.btn-logout::after {
    display: none !important;
}

.btn-logout:hover {
    color: var(--danger) !important;
    background: rgba(231,76,60,0.1) !important;
}

/* Tablet and up */
@media (min-width: 480px) {
    .navbar {
        padding: 12px 20px;
    }
    
    .nav-brand a {
        font-size: 1.6rem;
        gap: 6px;
    }
    
    .brand-kite {
        width: 22px;
        height: 28px;
    }
    
    .nav-links {
        gap: 8px;
    }
    
    .nav-links a {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
    
    .btn-logout {
        font-size: 0.85rem !important;
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #27AE60 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #E6B800 100%);
    color: var(--dark);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #C0392B 100%);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-large {
    padding: 18px 48px;
    font-size: 1.15rem;
    border-radius: var(--radius-lg);
}

.btn-action {
    width: 100%;
    padding: 20px;
    font-size: 1.3rem;
    margin: 12px 0;
    border-radius: var(--radius-lg);
}

.btn-kite {
    background: linear-gradient(135deg, var(--primary) 0%, #FF4500 100%);
    color: white;
    font-size: 1.5rem;
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.btn-kite:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

.btn-kite.clicked {
    transform: scale(0.95);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== HOME PAGE ===== */
.home-hero {
    text-align: center;
    padding: 60px 20px;
    position: relative;
}

.home-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.home-hero .subtitle {
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.home-hero .btn {
    margin: 8px;
}

@media (min-width: 768px) {
    .home-hero h1 {
        font-size: 3.5rem;
    }

    .home-hero .subtitle {
        font-size: 1.25rem;
    }
}

.home-stats {
    text-align: center;
    padding: 30px 0;
}

.home-stats h2 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 24px;
}

/* ===== CARDS ===== */
.card {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.5);
    transition: var(--transition-normal);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Stats Card */
.stats-card {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.5);
}

.stats-card h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark);
    font-size: 1.3rem;
    font-weight: 700;
}

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

@media (min-width: 400px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-item {
    text-align: center;
    padding: 16px 8px;
    background: linear-gradient(145deg, #fff 0%, #f8fafc 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition-normal);
}

.stat-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== DASHBOARD ===== */
.dashboard {
    padding-bottom: 40px;
}

.dashboard h1 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.8rem;
    color: var(--dark);
}

.action-buttons {
    margin: 24px 0;
}

/* ===== PAICHA SECTION ===== */
.paicha-section {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.5);
}

.paicha-section h3 {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.paicha-timer {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--secondary);
    margin: 24px 0;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    letter-spacing: 2px;
}

.paicha-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-paicha-start {
    background: linear-gradient(135deg, var(--success) 0%, #27AE60 100%);
    color: white;
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-paicha-stop {
    background: linear-gradient(135deg, var(--danger) 0%, #C0392B 100%);
    color: white;
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-content h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

#manual-duration-input {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#manual-duration-input input {
    width: 100px;
    padding: 12px;
    margin: 8px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

#manual-duration-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.15);
}

/* ===== STOCK SECTION ===== */
.stock-section {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.5);
}

.stock-section h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark);
    font-size: 1.2rem;
}

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

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

.stock-item label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 8px;
    font-weight: 500;
}

.stock-item input {
    width: 100%;
    max-width: 100px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.stock-item input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.15);
}

.stock-total {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

/* ===== LEADERBOARD PAGE ===== */
.leaderboard-page {
    padding-bottom: 40px;
}

.leaderboard-page h1 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.8rem;
    color: var(--dark);
}

.area-filter {
    text-align: center;
    margin-bottom: 24px;
}

.area-filter select {
    padding: 12px 24px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-full);
    background: white;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-fast);
    min-width: 200px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2394A3B8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    color: var(--dark);
}

.area-filter select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.15);
}

.area-filter label {
    color: var(--gray);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* Tab Navigation */
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: rgba(255,255,255,0.8);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-normal);
    color: var(--gray);
}

.tab-btn:hover {
    background: white;
    color: var(--primary);
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* ===== TOP 3 CARDS ===== */
.top-3-section {
    margin-bottom: 28px;
}

.top-3-cards {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    padding: 20px 0;
}

.top-card {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    padding: 20px 16px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    width: 100px;
    transition: var(--transition-normal);
    border: 1px solid rgba(255,255,255,0.5);
}

.top-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.top-card.first {
    transform: scale(1.1);
    padding: 24px 20px;
    z-index: 1;
}

.top-card.first:hover {
    transform: scale(1.1) translateY(-6px);
}

.top-card .medal {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-weight: 800;
    font-size: 1.2rem;
    color: white;
    box-shadow: var(--shadow-sm);
}

.top-card.gold .medal {
    background: linear-gradient(135deg, var(--gold) 0%, #FFC107 100%);
}

.top-card.silver .medal {
    background: linear-gradient(135deg, var(--silver) 0%, #A0A0A0 100%);
}

.top-card.bronze .medal {
    background: linear-gradient(135deg, var(--bronze) 0%, #8B4513 100%);
}

.top-card .name {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-card .score {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 600;
}

@media (min-width: 480px) {
    .top-card {
        width: 120px;
        padding: 24px 20px;
    }

    .top-card.first {
        padding: 28px 24px;
    }
}

/* ===== LEADERBOARD TABLE ===== */
.leaderboard-table {
    width: 100%;
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.5);
    table-layout: fixed;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 10px 6px;
    text-align: center;
    font-size: 0.8rem;
}

.leaderboard-table th {
    background: var(--gradient-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Column widths for mobile */
.leaderboard-table th:first-child,
.leaderboard-table td:first-child {
    width: 44px;
    min-width: 44px;
}

.leaderboard-table th:nth-child(2),
.leaderboard-table td:nth-child(2) {
    text-align: left;
    width: 35%;
    min-width: 90px;
}

/* Numeric columns - smaller fixed width */
.leaderboard-table th:nth-child(n+3),
.leaderboard-table td:nth-child(n+3) {
    width: auto;
    min-width: 50px;
}

/* Sortable headers */
.leaderboard-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.leaderboard-table th.sortable:hover {
    background: var(--primary-dark);
}

.leaderboard-table th.sortable .sort-icon {
    font-size: 0.55rem;
    margin-left: 2px;
    opacity: 0.6;
    display: inline-flex;
    flex-direction: column;
    line-height: 0.5;
    vertical-align: middle;
}

.leaderboard-table th.sortable:hover .sort-icon {
    opacity: 0.9;
}

.leaderboard-table th.sortable.active .sort-icon {
    opacity: 1;
}

@media (min-width: 480px) {
    .leaderboard-table {
        border-radius: var(--radius-lg);
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 14px 12px;
        font-size: 0.9rem;
    }
    
    .leaderboard-table th {
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }
    
    .leaderboard-table th:first-child,
    .leaderboard-table td:first-child {
        width: 50px;
        min-width: 50px;
    }
    
    .leaderboard-table th:nth-child(2),
    .leaderboard-table td:nth-child(2) {
        width: 30%;
        min-width: 120px;
    }
    
    .leaderboard-table th.sortable .sort-icon {
        font-size: 0.65rem;
        margin-left: 4px;
    }
}

.leaderboard-table tbody tr {
    transition: var(--transition-fast);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.leaderboard-table tbody tr:hover {
    background: rgba(255,107,53,0.05);
}

.leaderboard-table tr.rank-1 {
    background: linear-gradient(90deg, rgba(255,215,0,0.15) 0%, rgba(255,215,0,0.05) 100%);
}

.leaderboard-table tr.rank-2 {
    background: linear-gradient(90deg, rgba(192,192,192,0.15) 0%, rgba(192,192,192,0.05) 100%);
}

.leaderboard-table tr.rank-3 {
    background: linear-gradient(90deg, rgba(205,127,50,0.15) 0%, rgba(205,127,50,0.05) 100%);
}

.leaderboard-table td:first-child {
    font-weight: 700;
    color: var(--primary);
}

/* ===== LEADERBOARD TABLE AVATARS ===== */
.table-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.table-avatar-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.name-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: left;
    min-width: 0;
}

.name-cell span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

@media (min-width: 480px) {
    .table-avatar {
        width: 28px;
        height: 28px;
    }
    
    .table-avatar-placeholder {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .name-cell {
        gap: 8px;
    }
}

/* ===== TOP 3 CARD AVATARS ===== */
.top-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 6px;
    border: 2px solid rgba(255,255,255,0.5);
}

.top-card-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.top-card.first .top-card-avatar,
.top-card.first .top-card-avatar-placeholder {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
}

.refresh-indicator {
    text-align: center;
    margin-top: 24px;
    color: var(--gray);
    font-size: 0.85rem;
}

/* ===== TOAST NOTIFICATIONS ===== */
#toast-container {
    position: fixed;
    top: 80px;
    right: 16px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--success);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    opacity: 0;
    transform: translateX(100%);
    transition: all var(--transition-normal);
    font-weight: 500;
    box-shadow: var(--shadow-md);
    max-width: 300px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.error {
    background: var(--danger);
}

.toast.warning {
    background: var(--warning);
    color: var(--dark);
}

/* ===== PERFORMERS LIST ===== */
.top-performers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.performer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255,255,255,0.5);
    transition: var(--transition-normal);
}

.performer:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.performer.gold {
    border-left: 4px solid var(--gold);
}

.performer.silver {
    border-left: 4px solid var(--silver);
}

.performer.bronze {
    border-left: 4px solid var(--bronze);
}

/* ===== BANNER ===== */
.banner {
    text-align: center;
    padding: 8px;
    background: rgba(255,255,255,0.5);
    min-height: 50px;
}

.banner img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--gray);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-links .divider {
    margin: 0 12px;
    color: var(--gray);
}

/* ===== MESSAGES ===== */
.messages {
    padding: 12px 16px;
}

.message {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    font-weight: 500;
}

.message.success {
    background: linear-gradient(135deg, #D4EDDA 0%, #C3E6CB 100%);
    color: #155724;
    border: 1px solid #B8DFC8;
}

.message.error {
    background: linear-gradient(135deg, #F8D7DA 0%, #F5C6CB 100%);
    color: #721C24;
    border: 1px solid #F5C6CB;
}

/* ===== LOADING STATES ===== */
.loading {
    text-align: center;
    padding: 32px;
    color: var(--gray);
}

.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.stat-value .spinner {
    width: 28px;
    height: 28px;
}

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

.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

/* ===== RANK DISPLAY ===== */
.rank-display .stat-value {
    color: var(--gold);
    font-size: 2rem;
    -webkit-text-fill-color: initial;
}

.rank-display .stat-label {
    color: var(--primary-dark);
    font-weight: 700;
}

/* ===== FORM INPUTS ===== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: var(--transition-fast);
    background: white;
    color: var(--dark);
    line-height: 1.5;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
textarea::placeholder {
    color: var(--gray);
    opacity: 0.7;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.15);
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2394A3B8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

select option {
    padding: 12px;
    font-size: 1rem;
    color: var(--dark);
}

label,
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

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

.form-help {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 6px;
}

/* ===== PROFILE PAGE ===== */
.profile-card {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.5);
    text-align: center;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: white;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
}

.profile-area {
    color: var(--gray);
    font-size: 0.95rem;
}

/* ===== TEAM PAGES ===== */
.team-card {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.5);
}

.team-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.team-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    font-weight: 700;
}

.team-info h2 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 4px;
}

.team-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

.member-list {
    list-style: none;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #e2e8f0;
}

.member-item:last-child {
    border-bottom: none;
}

.member-name {
    font-weight: 600;
    color: var(--dark);
}

.member-role {
    font-size: 0.85rem;
    color: var(--gray);
    padding: 4px 12px;
    background: #f1f5f9;
    border-radius: var(--radius-full);
}

.member-role.leader {
    background: rgba(255,107,53,0.1);
    color: var(--primary);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-warning {
    background: rgba(241,196,15,0.2);
    color: #B7950B;
}

.badge-success {
    background: rgba(46,204,113,0.2);
    color: #1E8449;
}

.badge-danger {
    background: rgba(231,76,60,0.2);
    color: #C0392B;
}

/* ===== INVITE SECTION ===== */
.invite-section {
    background: linear-gradient(135deg, rgba(255,107,53,0.1) 0%, rgba(255,107,53,0.05) 100%);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}

.invite-code {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    background: white;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin: 12px 0;
    letter-spacing: 2px;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 360px) {
    .container {
        padding: 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

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

    .btn-action {
        font-size: 1.1rem;
        padding: 16px;
    }

    .paicha-timer {
        font-size: 2.5rem;
    }

    .home-hero h1 {
        font-size: 2rem;
    }

    .nav-links a {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 32px 24px;
    }

    .card, .stats-card, .paicha-section, .stock-section {
        padding: 32px;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 16px;
    }
    
    /* Wider rank column for desktop */
    .leaderboard-table th:first-child,
    .leaderboard-table td:first-child {
        width: 60px;
        min-width: 60px;
    }
}

@media (min-width: 1024px) {
    .kite-1 { left: 15%; }
    .kite-2 { right: 20%; }
    .kite-3 { left: 25%; }
    .kite-4 { right: 30%; }

    .kite {
        width: 80px;
        height: 93px;
    }

    .kite-2 {
        width: 65px;
        height: 76px;
    }

    .kite-3 {
        width: 55px;
        height: 64px;
    }

    .kite-4 {
        width: 70px;
        height: 82px;
    }
}

/* ===== AUTH PAGES (Login/Signup) ===== */
.auth-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.auth-card {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.5);
}

.auth-card .auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .auth-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.auth-card .auth-header p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Auth Rules Notice */
.auth-rules-notice {
    background: #FFF9E6;
    border: 1px solid #FFE082;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: #856404;
    text-align: center;
}

.auth-rules-notice a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-rules-notice a:hover {
    text-decoration: underline;
}

.auth-card .auth-brand {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 4px;
}

.auth-card form {
    margin-bottom: 20px;
}

.auth-card form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.auth-card form input[type="text"],
.auth-card form input[type="email"],
.auth-card form input[type="password"] {
    margin-bottom: 16px;
}

.auth-card .btn-auth-submit {
    width: 100%;
    padding: 16px;
    font-size: 1.05rem;
    margin-top: 8px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--gray);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    color: var(--dark);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-google:hover {
    border-color: var(--primary);
    background: rgba(255,107,53,0.03);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--gray);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-card .errorlist,
.auth-card ul.errorlist {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.auth-card .errorlist li {
    background: linear-gradient(135deg, #F8D7DA 0%, #F5C6CB 100%);
    color: #721C24;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 0.85rem;
    border: 1px solid #F5C6CB;
}

/* ===== IMPROVED HOME/LANDING PAGE ===== */
.landing-hero {
    text-align: center;
    padding: 48px 20px 32px;
    position: relative;
}

.landing-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.landing-hero .subtitle {
    color: var(--dark);
    font-size: 1.15rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.landing-hero .tagline {
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.landing-hero .btn {
    margin: 8px;
}

.landing-illustration {
    margin: 24px auto;
    max-width: 360px;
    padding: 0 20px;
}

.landing-illustration svg {
    width: 100%;
    height: auto;
}

.landing-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 0;
    margin-bottom: 24px;
}

@media (min-width: 480px) {
    .landing-features {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255,255,255,0.5);
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
}

.feature-icon.icon-orange {
    background: linear-gradient(135deg, rgba(255,107,53,0.15) 0%, rgba(255,107,53,0.05) 100%);
}

.feature-icon.icon-teal {
    background: linear-gradient(135deg, rgba(78,205,196,0.15) 0%, rgba(78,205,196,0.05) 100%);
}

.feature-icon.icon-gold {
    background: linear-gradient(135deg, rgba(255,230,109,0.25) 0%, rgba(255,230,109,0.1) 100%);
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.5;
}

@media (min-width: 768px) {
    .landing-hero h1 {
        font-size: 3.8rem;
    }

    .landing-hero .subtitle {
        font-size: 1.3rem;
    }
}

/* ===== LEADERBOARD SUB-TABS ===== */
.leaderboard-subtabs {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
}

/* Compact Header Controls */
.leaderboard-header {
    text-align: center;
    margin-bottom: 20px;
}

.leaderboard-header h1 {
    font-size: 1.6rem;
    margin-bottom: 16px;
}

.header-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.area-filter-compact select {
    padding: 10px 16px;
    font-size: 0.9rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-full);
    background: white;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-fast);
    min-width: 180px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2394A3B8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    color: var(--dark);
}

.area-filter-compact select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.15);
}

.leaderboard-tabs-compact {
    display: flex;
    gap: 6px;
}

.leaderboard-tabs-compact .tab-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

@media (min-width: 480px) {
    .header-controls {
        flex-direction: row;
        justify-content: center;
        gap: 16px;
    }
}

.subtab-btn {
    padding: 8px 18px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition-normal);
    color: var(--gray);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.subtab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.subtab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== DARK MODE SUPPORT (Future) ===== */
@media (prefers-color-scheme: dark) {
    /* Can be expanded for dark mode support */
}

/* ===== PRINT STYLES ===== */
@media print {
    .kites-container,
    .navbar,
    .footer,
    .btn {
        display: none;
    }

    body {
        background: white;
    }

    .card, .stats-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ===== SEARCH BOX STYLES ===== */
.search-container {
    margin: 12px 0;
}

.search-wrapper {
    position: relative;
}

.search-wrapper::before {
    content: '🔍';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 1;
}

.search-box {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 2px solid rgba(255, 107, 53, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.95);
    transition: var(--transition-normal);
    outline: none;
}

.search-box:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.search-box::placeholder {
    color: var(--gray);
    font-size: 0.8rem;
}

/* ===== TOGGLE SWITCH STYLES ===== */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition-normal);
    border-radius: var(--radius-full);
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition-normal);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--gradient-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* ===== TEAM LINK STYLES ===== */
.team-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.team-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== NO RESULTS STYLES ===== */
.no-results-cell {
    text-align: center;
    padding: 25px 15px !important;
    color: var(--gray);
    font-style: italic;
}

/* ===== PUBLIC TEAM PAGE STYLES ===== */
.public-team-header {
    text-align: center;
    padding: 15px 0;
}

.public-team-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    margin-bottom: 12px;
}

.public-team-image-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
}

.public-team-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.public-team-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.public-stat-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.public-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

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

.public-members-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.public-member-card {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}

.public-member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.public-member-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.public-member-info {
    flex: 1;
}

.public-member-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.public-member-role {
    font-size: 0.75rem;
    color: var(--gray);
}

.public-member-role.captain {
    color: var(--primary);
}

.public-member-stats {
    text-align: right;
    font-size: 0.8rem;
    color: var(--gray);
}

.public-member-stats strong {
    color: var(--primary);
}

.public-page-unavailable {
    text-align: center;
    padding: 50px 20px;
}

.public-page-unavailable .emoji {
    font-size: 3rem;
    margin-bottom: 15px;
}
