:root {
    --bg: #050508;
    --bg-secondary: #0a0a12;
    --surface: #111118;
    --surface-light: #1a1a25;
    --gold: #c9a84c;
    --gold-light: #e8cc6e;
    --gold-dark: #8b6914;
    --gold-ghost: rgba(201, 168, 76, 0.15);
    --text: #e8e6e1;
    --text-muted: #a8a7a5;
    --text-dim: #6b6b70;
    --accent: #c9a84c;
    --blue-accent: #4a90d9;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    --card-hover-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(201, 168, 76, 0.3);
    --glass-bg: rgba(17, 17, 24, 0.8);
    --glass-border: rgba(255, 255, 255, 0.06);
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --font-display: 'Cinzel', 'Times New Roman', serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #2a2a35 #050508;
    font-size: 16px;
    height: 100%;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #050508; }
::-webkit-scrollbar-thumb { background: #2a2a35; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a48; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(160px);
    opacity: 0.07;
    animation: orbFloat 22s ease-in-out infinite;
}

.orb-1 { width: 700px; height: 700px; background: radial-gradient(circle, #d4a85330, transparent 70%); top: -20%; left: -15%; }
.orb-2 { width: 600px; height: 600px; background: radial-gradient(circle, #4a90d925, transparent 70%); bottom: -15%; right: -10%; animation-delay: -8s; animation-duration: 20s; }
.orb-3 { width: 500px; height: 500px; background: radial-gradient(circle, #e0555520, transparent 70%); top: 55%; left: 55%; animation-delay: -15s; animation-duration: 28s; }

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(90px, -70px) scale(1.12); }
    50% { transform: translate(-50px, 60px) scale(0.88); }
    75% { transform: translate(-80px, -40px) scale(1.06); }
}

.grid-pattern {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.018;
    background-image:
        linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
    background-size: 70px 70px;
    mask-image: radial-gradient(ellipse at center, black 35%, transparent 75%);
}

.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 16px 24px;
    background: rgba(5,5,8,0.85);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 15px 50px rgba(0,0,0,0.5);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.04em;
    transition: all var(--transition-fast);
}

.nav-logo:hover { color: var(--gold-light); }

.nav-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 6px 18px rgba(201,168,76,0.35);
    transition: all var(--transition-bounce);
}

.nav-logo:hover .nav-logo-img {
    transform: scale(1.1) rotate(-4deg);
    box-shadow: 0 12px 30px rgba(201,168,76,0.55);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.nav-links a.active { color: var(--gold-light); font-weight: 600; }

.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.main-content {
    position: relative;
    z-index: 1;
    padding-top: 100px;
    padding-bottom: 60px;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
    flex: 1;
    width: 100%;
}

.page-header { margin-bottom: 40px; text-align: center; }

.page-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #d4c9a8 40%, #d4a853 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle { color: var(--text-muted); font-size: 0.95rem; letter-spacing: 0.03em; }

.search-filter-bar {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
}

.search-form { 
    display: flex; 
    gap: 16px; 
    flex-wrap: nowrap; 
    align-items: flex-end;
    max-width: 100%;
}

.search-group { 
    flex: 1 1 0%;
    min-width: 0;
}

.search-group-clear {
    flex: 0 0 auto;
    min-width: unset;
}

.search-group label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 600;
}

.search-input, .search-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    outline: none;
    height: 45px;
}

.search-input:focus, .search-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-ghost);
}

.search-input::placeholder { color: var(--text-dim); }

.search-select {
    cursor: pointer;
    appearance: none;
    -webkit-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 fill='%23a8a7a5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.search-select option { background: var(--bg-secondary); color: var(--text); }

.btn {
    padding: 0 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all var(--transition-bounce);
    border: none;
    font-family: var(--font-body);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 45px;
    line-height: 1;
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-muted);
    min-width: 100px;
}

.btn-secondary:hover {
    border-color: rgba(255,255,255,0.3);
    color: #fff;
    background: rgba(255,255,255,0.03);
}

.btn-roster {
    background: transparent;
    border: 1px solid rgba(201, 168, 76, 0.4);
    color: var(--gold-light);
    margin-top: 18px;
    padding: 0 20px;
    font-size: 0.8rem;
    height: 38px;
}

.btn-roster:hover {
    background: var(--gold-ghost);
    border-color: var(--gold);
    color: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(201, 168, 76, 0.2);
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    transition: opacity 0.2s ease;
}

.teams-grid.loading { opacity: 0.5; pointer-events: none; }

.team-card {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius);
    padding: 32px 24px 24px;
    transition: all var(--transition-smooth);
    box-shadow: var(--card-shadow);
    animation: cardReveal 0.6s cubic-bezier(0.22,0.61,0.36,1) both;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 250px;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold-dark));
    transform: scaleX(0);
    transition: transform var(--transition-smooth);
}

.team-card:hover::before { transform: scaleX(1); }

.team-card:hover {
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(201,168,76,0.35);
    transform: translateY(-4px);
    background: #14141d;
}

@keyframes cardReveal {
    from { opacity: 0; transform: translateY(40px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.team-logo-container {
    width: 120px; height: 120px;
    margin-bottom: 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(201,168,76,0.3);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);
    flex-shrink: 0;
}

.team-card:hover .team-logo-container {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(201,168,76,0.3);
    transform: scale(1.05);
}

.team-logo {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
}

.team-logo-placeholder {
    width: 60%; height: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-dim);
    opacity: 0.5;
}

.team-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.03em;
    line-height: 1.2;
    margin-bottom: 12px;
    transition: color var(--transition-fast);
}

.team-card:hover .team-name { color: var(--gold-light); }

.team-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.location-icon {
    width: 18px; height: 18px;
    color: var(--gold);
    flex-shrink: 0;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.no-results-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.5; }

.no-results h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.no-results p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 20px; }

.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid rgba(255,255,255,0.04);
    color: var(--text-dim);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
}

.footer span { color: var(--gold-light); font-weight: 700; }

/* Responsive Breakpoints */
@media (min-width: 1400px) {
    .search-form { gap: 20px; }
    .search-input, .search-select { font-size: 0.95rem; }
    .btn { font-size: 0.9rem; min-width: 120px; }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .search-form { gap: 16px; }
    .btn { min-width: 110px; }
}

@media (min-width: 1024px) and (max-width: 1199px) {
    .search-form { gap: 14px; }
    .search-filter-bar { padding: 20px; }
    .btn { min-width: 100px; font-size: 0.8rem; padding: 0 18px; }
    .search-input, .search-select { font-size: 0.85rem; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .search-form { 
        gap: 12px; 
        flex-wrap: wrap;
    }
    
    .search-group {
        flex: 1 1 calc(50% - 6px);
        min-width: 200px;
    }
    
    .search-group-clear {
        flex: 1 1 100%;
        margin-top: 4px;
    }
    
    .btn-secondary {
        width: 100%;
        min-width: unset;
    }
    
    .search-filter-bar { padding: 20px; }
    .search-input, .search-select { font-size: 0.85rem; }
    .teams-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (min-width: 600px) and (max-width: 767px) {
    .search-form { 
        gap: 12px; 
        flex-wrap: wrap;
    }
    
    .search-group {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .search-group-clear {
        flex: 1 1 100%;
        margin-top: 4px;
    }
    
    .btn-secondary {
        width: 100%;
        min-width: unset;
    }
    
    .search-filter-bar { padding: 16px; }
    .search-input, .search-select { font-size: 0.85rem; }
    .teams-grid { grid-template-columns: 1fr; }
    .main-content { padding-left: 16px; padding-right: 16px; }
    .page-title { font-size: 1.8rem; }
}

@media (min-width: 480px) and (max-width: 599px) {
    .search-form { 
        gap: 12px; 
        flex-wrap: wrap;
    }
    
    .search-group {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .search-group-clear {
        flex: 1 1 100%;
        margin-top: 4px;
    }
    
    .btn-secondary {
        width: 100%;
        min-width: unset;
        height: 44px;
    }
    
    .search-filter-bar { padding: 16px; border-radius: var(--radius); }
    .search-input, .search-select { 
        font-size: 0.85rem; 
        height: 44px;
        padding: 10px 14px;
    }
    .search-group label { font-size: 0.65rem; }
    .teams-grid { grid-template-columns: 1fr; gap: 16px; }
    .main-content { 
        padding-left: 16px; 
        padding-right: 16px; 
        padding-top: 85px; 
    }
    .page-title { font-size: 1.6rem; }
    .page-subtitle { font-size: 0.85rem; }
    .team-card { padding: 24px 16px 20px; }
}

@media (max-width: 479px) {
    .nav { padding: 12px 16px; }
    .nav-logo { font-size: 1rem; }
    .nav-logo-img { width: 32px; height: 32px; }
    
    .search-form { 
        gap: 10px; 
        flex-wrap: wrap;
    }
    
    .search-group {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .search-group-clear {
        flex: 1 1 100%;
        margin-top: 2px;
    }
    
    .btn-secondary {
        width: 100%;
        min-width: unset;
        height: 42px;
        font-size: 0.8rem;
    }
    
    .search-filter-bar { 
        padding: 14px; 
        border-radius: var(--radius); 
        margin-bottom: 20px;
    }
    .search-input, .search-select { 
        font-size: 0.8rem; 
        height: 42px;
        padding: 10px 12px;
    }
    .search-select {
        padding-right: 36px;
        background-position: right 12px center;
    }
    .search-group label { 
        font-size: 0.6rem; 
        margin-bottom: 6px;
        letter-spacing: 0.08em;
    }
    
    .teams-grid { 
        grid-template-columns: 1fr; 
        gap: 14px; 
    }
    
    .main-content { 
        padding-left: 12px; 
        padding-right: 12px; 
        padding-top: 75px;
        padding-bottom: 40px;
    }
    
    .page-header { margin-bottom: 24px; }
    .page-title { font-size: 1.4rem; }
    .page-subtitle { font-size: 0.8rem; }
    
    .team-card { 
        padding: 20px 14px 18px; 
        min-height: 220px;
    }
    .team-logo-container { 
        width: 100px; 
        height: 100px; 
        margin-bottom: 16px;
    }
    .team-name { font-size: 1.2rem; }
    .team-location { font-size: 0.8rem; }
    .btn-roster { 
        font-size: 0.75rem; 
        height: 34px; 
        padding: 0 16px; 
        margin-top: 14px;
    }
    .no-results { padding: 40px 16px; }
    .no-results-icon { font-size: 3rem; }
    .no-results h3 { font-size: 1.2rem; }
    
    .footer { padding: 20px 16px; font-size: 0.7rem; }
}