/* Mobile-First Styling */
body { background-color: #f0f2f5; }

/* Sticky Header for Tabs */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background-color: #fff;
}

/* Scrollable Tabs (Hide Scrollbar) */
.nav-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 10px;
    padding-left: 10px;
    padding-right: 10px;
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
}

.nav-pills::-webkit-scrollbar { display: none; } /* Hide scrollbar Chrome/Safari */

.nav-link {
    border-radius: 20px;
    margin-right: 8px;
    color: #666;
    background-color: #f8f9fa;
    border: 1px solid #eee;
    font-size: 0.85rem;
    font-weight: 600;
}

.nav-link.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

/* Player Card Styling */
.player-card {
    background: white;
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

.rank-badge {
    min-width: 35px;
    height: 35px;
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.team-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: 8px;
    flex-shrink: 0;
}


.player-info {
    flex-grow: 1;
    line-height: 1.2;
    overflow: hidden;
}

.player-name {
    font-weight: 700;
    font-size: 1rem;
    color: #212529;
    display: block;
}

.school-name {
    font-size: 0.8rem;
    color: #6c757d;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0d6efd;
    text-align: right;
    min-width: 50px;
}

.stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #adb5bd;
    display: block;
    text-align: right;
}

/* Graduating Class Badge (Small - for leaderboards) */
.grad-badge-sm {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 700;
    border: 1px solid;
    margin-left: 2px;
    vertical-align: middle;
}
.grad-red { background-color: #FFEBEE; color: #D32F2F; border-color: #F44336; }
.grad-gold { background-color: #FFF8E1; color: #F57F17; border-color: #FFC107; }
.grad-blue { background-color: #E3F2FD; color: #1976D2; border-color: #2196F3; }
.grad-silver { background-color: #FAFAFA; color: #616161; border-color: #9E9E9E; }

/* Class Year Filter Dropdown */
.class-filter-select {
    appearance: none;
    -webkit-appearance: none;
    border-radius: 20px;
    border: 1px solid #eee;
    background-color: #f8f9fa;
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 24px 4px 10px;
    cursor: pointer;
    margin-bottom: 10px;
    margin-right: 4px;
    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 fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    flex-shrink: 0;
}

.class-filter-select:focus {
    outline: none;
    border-color: #0d6efd;
}

.class-filter-select.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
    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 fill='white' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* Desktop: constrain content width */
@media (min-width: 768px) {
    .container-fluid {
        max-width: 768px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-bg {
        max-width: 768px;
        margin-left: auto;
        margin-right: auto;
    }

    .sticky-header {
        max-width: 768px;
        margin-left: auto;
        margin-right: auto;
    }
}
