/**
 * Roster Page Styles
 */

:root {
    --hub-accent: #cf0000;
    --hub-accent-rgb: 207, 0, 0;
}

/* --- Page Background (Matches Leaderboard) ---
.roster-page-container {
    position: relative;
    padding: 5rem 0;
    background-color: #050505;
    background-image: radial-gradient(circle at 50% 0%, #1a1a1a 0%, #050505 60%);
    min-height: 100vh;
}

/* --- Hub Switcher Tabs --- */
.hub-switch-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 0.5rem;
    width: fit-content;
    margin: 0 auto 4rem auto;
    backdrop-filter: blur(10px);
}

.hub-tab {
    padding: 0.75rem 2.5rem;
    border-radius: 40px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.hub-tab svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.hub-tab.active-rap {
    background-color: #cf0000;
    color: #fff;
    box-shadow: 0 0 20px rgba(207,0,0,0.4);
}

.hub-tab.active-beats {
    background-color: #3b82f6;
    color: #fff;
    box-shadow: 0 0 20px rgba(59,130,246,0.4);
}

.hub-tab:hover:not(.active-rap):not(.active-beats) {
    color: #fff;
}

/* --- Header --- */
.roster-header {
    text-align: center;
    margin-bottom: 3rem;
}

.roster-header h1 {
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 0.5rem;
}

.roster-header p {
    font-size: 1.2rem;
    color: #aaa;
    font-weight: 500;
}

.header-icon {
    color: var(--hub-accent);
    filter: drop-shadow(0 0 15px var(--hub-accent));
}

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    padding: 0;
    border: none;
    align-items: center;
}

.form-control-select, .form-control-search {
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 0.85rem 1.5rem;
    border-radius: 50px;
    min-width: 220px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s ease;
    font-size: 1rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Force dark background for select dropdown options */
.form-control-select {
    background-color: #1a1a1a;
    color: #fff;
}

.form-control-select option {
    background-color: #1a1a1a;
    color: #fff;
}

.form-control-search {
    width: 300px;
}

.form-control-select:hover, .form-control-search:focus {
    background-color: rgba(255,255,255,0.1);
    border-color: var(--hub-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--hub-accent-rgb), 0.2);
}

.btn-search {
    background: var(--hub-accent);
    color: #fff;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--hub-accent-rgb), 0.4);
}

/* --- Roster Grid --- */
.roster-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.roster-empty {
    color: #aaa;
    text-align: center;
    grid-column: 1 / -1;
}

/* --- Premium Card Styles --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.roster-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;

    /* Animation */
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Stagger delays */
.roster-card:nth-child(1) { animation-delay: 0.05s; }
.roster-card:nth-child(2) { animation-delay: 0.1s; }
.roster-card:nth-child(3) { animation-delay: 0.15s; }
.roster-card:nth-child(n+4) { animation-delay: 0.2s; }

/* Hover Effect - Hub Specific */
.roster-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.06);
}

/* Override the red gradient from style.css */
.roster-card.hub-rap::before {
    background: radial-gradient(circle at top left, rgba(207, 0, 0, 0.2), transparent 40%);
}

.roster-card.hub-beats::before {
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.2), transparent 40%);
}

/* Rap Hub (Red) Hover */
.roster-card.hub-rap:hover {
    border-color: rgba(207, 0, 0, 0.3);
    box-shadow: 0 10px 30px rgba(207, 0, 0, 0.15);
}

.roster-card.hub-rap:hover .roster-avatar {
    border-color: #cf0000;
}

/* Beats Hub (Blue) Hover */
.roster-card.hub-beats:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

.roster-card.hub-beats:hover .roster-avatar {
    border-color: #3b82f6;
}

/* Current User Highlight */
.roster-card.current-user {
    border-color: var(--hub-accent);
    background: rgba(var(--hub-accent-rgb), 0.05);
    box-shadow: 0 0 20px rgba(var(--hub-accent-rgb), 0.15);
}

.roster-item {
    cursor: pointer;
}

/* Avatar */
.roster-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #222;
    background-size: cover;
    background-position: center;
    border: 3px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* Text Info */
.roster-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.roster-rank-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    background: rgba(255,255,255,0.1);
    color: #aaa;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rank-gold {
    color: #ffd700 !important;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.rank-silver {
    color: #c0c0c0 !important;
    background: rgba(192, 192, 192, 0.15);
    border: 1px solid rgba(192, 192, 192, 0.3);
}

.rank-bronze {
    color: #cd7f32 !important;
    background: rgba(205, 127, 50, 0.15);
    border: 1px solid rgba(205, 127, 50, 0.3);
}

/* Stats Row */
.roster-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.r-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.r-stat-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.r-stat-lbl {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #666;
    margin-top: 2px;
    font-weight: 600;
}

.val-win {
    color: #4caf50;
}

.val-pts {
    color: var(--hub-accent);
}

/* --- Pagination Styles --- */
.pagination-wrapper {
    margin-top: 3rem;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem 1rem;
}

.pagination-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination-link:hover:not(.disabled) {
    background: var(--hub-accent);
    border-color: var(--hub-accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--hub-accent-rgb), 0.3);
}

.pagination-link.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0 0.5rem;
}

.pagination-number {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.pagination-number:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.pagination-number.active {
    background: var(--hub-accent);
    border-color: var(--hub-accent);
    box-shadow: 0 0 15px rgba(var(--hub-accent-rgb), 0.3);
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: #666;
    font-weight: 600;
}

.pagination-info {
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .roster-header h1 {
        font-size: 2.5rem;
    }

    .filter-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .form-control-search, .form-control-select {
        width: 100%;
    }

    .btn-search {
        width: 100%;
    }

    .hub-switch-tabs {
        width: 100%;
        gap: 0.5rem;
    }

    .hub-tab {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.75rem;
    }

    .pagination-link {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .pagination-number {
        min-width: 36px;
        height: 36px;
        padding: 0.6rem;
        font-size: 0.85rem;
    }
}
