/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { font-family: 'Inter', -apple-system, sans-serif; background: #000; color: #fff; }
.hidden { display: none !important; }

/* ===== LANDING PAGE ===== */
.landing {
    height: 100vh;
    width: 100vw;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* hero background removed — robert cutout floats instead */

.landing-content {
    text-align: center;
    z-index: 1;
    animation: fadeUp 1.2s ease-out;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== ROBERT CHAOS ===== */
.robert-chaos {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.robert {
    position: absolute;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0.12;
    filter: grayscale(100%);
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

.r1  { width: 120px; height: 120px; top: 5%;  left: 3%;  animation: bob1 6s infinite alternate; transform: rotate(-15deg); }
.r2  { width: 80px;  height: 80px;  top: 15%; right: 8%; animation: bob2 8s infinite alternate; transform: rotate(20deg); opacity: 0.08; }
.r3  { width: 200px; height: 200px; bottom: 10%; left: 5%; animation: bob3 7s infinite alternate; transform: rotate(10deg); opacity: 0.06; }
.r4  { width: 60px;  height: 60px;  top: 40%; left: 15%; animation: bob4 5s infinite alternate; transform: rotate(-30deg); opacity: 0.15; }
.r5  { width: 150px; height: 150px; top: 8%;  right: 25%; animation: bob1 9s infinite alternate; transform: rotate(5deg); opacity: 0.07; }
.r6  { width: 90px;  height: 90px;  bottom: 20%; right: 10%; animation: bob2 6s infinite alternate; transform: rotate(-25deg); opacity: 0.1; }
.r7  { width: 70px;  height: 70px;  bottom: 5%; left: 35%; animation: bob3 5.5s infinite alternate; transform: rotate(35deg); opacity: 0.13; }
.r8  { width: 110px; height: 110px; top: 60%; right: 3%; animation: bob4 7.5s infinite alternate; transform: rotate(-10deg); opacity: 0.09; }
.r9  { width: 50px;  height: 50px;  top: 3%;  left: 45%; animation: bob1 4s infinite alternate; transform: rotate(45deg); opacity: 0.14; }
.r10 { width: 160px; height: 160px; bottom: 15%; right: 30%; animation: bob2 10s infinite alternate; transform: rotate(-5deg); opacity: 0.05; }
.r11 { width: 85px;  height: 85px;  top: 70%; left: 8%;  animation: bob3 6.5s infinite alternate; transform: rotate(15deg); opacity: 0.11; }
.r12 { width: 40px;  height: 40px;  top: 25%; left: 30%; animation: bob4 4.5s infinite alternate; transform: rotate(-40deg); opacity: 0.16; }

@keyframes bob1 {
    from { transform: translateY(0) rotate(-15deg); }
    to { transform: translateY(-20px) rotate(-10deg); }
}
@keyframes bob2 {
    from { transform: translateY(0) rotate(20deg); }
    to { transform: translateY(15px) rotate(25deg); }
}
@keyframes bob3 {
    from { transform: translateY(0) rotate(10deg) scale(1); }
    to { transform: translateY(-25px) rotate(15deg) scale(1.05); }
}
@keyframes bob4 {
    from { transform: translateY(0) rotate(-30deg); }
    to { transform: translateY(10px) rotate(-25deg); }
}

/* ===== ROBERT BODY CUTOUTS ===== */
.robert-body {
    position: absolute;
    object-fit: contain;
    opacity: 0.25;
    filter: grayscale(20%);
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

.rb1 { height: 400px; bottom: -5%; right: 3%;  animation: drift1 8s infinite alternate; transform: rotate(5deg); opacity: 0.35; }
.rb2 { height: 300px; top: 5%;    left: 1%;   animation: drift2 10s infinite alternate; transform: rotate(-8deg) scaleX(-1); opacity: 0.25; }
.rb3 { height: 220px; bottom: 10%; left: 18%;  animation: drift3 7s infinite alternate; transform: rotate(12deg); opacity: 0.3; }
.rb4 { height: 350px; top: 2%;    right: 12%;  animation: drift1 9s infinite alternate; transform: rotate(-3deg) scaleX(-1); opacity: 0.2; }
.rb5  { height: 250px; bottom: -2%; right: 32%; animation: drift2 6s infinite alternate; transform: rotate(7deg); opacity: 0.28; }
.rb6  { height: 280px; top: 15%;   left: 25%;  animation: drift3 8.5s infinite alternate; transform: rotate(-6deg); opacity: 0.22; }
.rb7  { height: 180px; top: 50%;   right: 40%; animation: drift1 7s infinite alternate; transform: rotate(10deg) scaleX(-1); opacity: 0.3; }
.rb8  { height: 320px; bottom: 5%; left: 40%;  animation: drift2 9s infinite alternate; transform: rotate(-4deg) scaleX(-1); opacity: 0.18; }
.rb9  { height: 150px; top: 0%;    left: 50%;  animation: drift3 5s infinite alternate; transform: rotate(15deg); opacity: 0.32; }
.rb10 { height: 260px; top: 35%;   left: 60%;  animation: drift1 11s infinite alternate; transform: rotate(-10deg) scaleX(-1); opacity: 0.24; }

@keyframes drift1 {
    from { transform: translateY(0) translateX(0) rotate(5deg); }
    to { transform: translateY(-15px) translateX(10px) rotate(8deg); }
}
@keyframes drift2 {
    from { transform: translateY(0) translateX(0) rotate(-8deg) scaleX(-1); }
    to { transform: translateY(20px) translateX(-10px) rotate(-5deg) scaleX(-1); }
}
@keyframes drift3 {
    from { transform: translateY(0) rotate(12deg); }
    to { transform: translateY(-20px) rotate(15deg); }
}

/* THE — the main event */
.the-container {
    margin-bottom: 8px;
}

.the {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(12rem, 28vw, 22rem);
    letter-spacing: 0.08em;
    line-height: 0.85;
    color: #fff;
    display: block;
    text-shadow:
        0 0 60px rgba(255, 255, 255, 0.15),
        0 0 120px rgba(255, 255, 255, 0.05);
    animation: theGlow 4s ease-in-out infinite alternate;
}

@keyframes theGlow {
    from { text-shadow: 0 0 60px rgba(255, 255, 255, 0.1), 0 0 120px rgba(255, 255, 255, 0.03); }
    to { text-shadow: 0 0 80px rgba(255, 255, 255, 0.2), 0 0 160px rgba(255, 255, 255, 0.06); }
}

.title-lower {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 48px;
}

.ballet {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: 0.35em;
    color: #c8102e;
    line-height: 1.1;
}

.ranger {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: 0.35em;
    color: #666;
    line-height: 1.1;
}

/* Login form */
.login-form {
    display: flex;
    gap: 0;
    justify-content: center;
    margin-bottom: 16px;
}

.login-form input {
    background: transparent;
    border: 2px solid #333;
    border-right: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 14px 20px;
    width: 260px;
    outline: none;
    letter-spacing: 0.15em;
    transition: border-color 0.3s;
}

.login-form input:focus {
    border-color: #c8102e;
}

.login-form input::placeholder {
    color: #444;
}

#enter-btn {
    background: #c8102e;
    border: 2px solid #c8102e;
    color: #fff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    padding: 14px 32px;
    cursor: pointer;
    transition: all 0.2s;
}

#enter-btn:hover {
    background: #e8132f;
    border-color: #e8132f;
}

#login-error {
    color: #c8102e;
    font-size: 0.85rem;
    margin-top: 8px;
    min-height: 1.2em;
}

.tagline {
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    color: #444;
    margin-top: 32px;
}

/* ===== DASHBOARD ===== */
.dashboard {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    overflow: hidden;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #1a1a1a;
    flex-shrink: 0;
}

.dash-header h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.12em;
    font-weight: normal;
    color: #666;
}

.dash-header .accent {
    color: #c8102e;
}

.logout-btn {
    background: none;
    border: 1px solid #333;
    color: #666;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    border-color: #c8102e;
    color: #c8102e;
}

/* Stats row */
.stats-row {
    display: flex;
    gap: 16px;
    padding: 16px 24px;
    flex-shrink: 0;
}

.stat-card {
    flex: 1;
    background: #111;
    border: 1px solid #1a1a1a;
    padding: 16px 20px;
    text-align: center;
}

.stat-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: #555;
}

/* Tab bar */
.tab-bar {
    display: flex;
    gap: 0;
    padding: 0 24px;
    border-bottom: 1px solid #1a1a1a;
    flex-shrink: 0;
}

.tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #555;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover {
    color: #aaa;
}

.tab.active {
    color: #fff;
    border-bottom-color: #c8102e;
}

/* Content area */
.content-area {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Filter sidebar */
.filters {
    width: 240px;
    flex-shrink: 0;
    padding: 20px;
    border-right: 1px solid #1a1a1a;
    overflow-y: auto;
    background: #0d0d0d;
}

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

.filter-label {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: #555;
    margin-bottom: 6px;
    display: block;
}

.filter-select,
.filter-input {
    width: 100%;
    background: #111;
    border: 1px solid #222;
    color: #ccc;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    padding: 8px 10px;
    outline: none;
    transition: border-color 0.2s;
}

.filter-select:focus,
.filter-input:focus {
    border-color: #c8102e;
}

.filter-select option {
    background: #111;
}

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

.filter-row .filter-input {
    width: 50%;
}

.filter-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.filter-check input[type="checkbox"] {
    accent-color: #c8102e;
}

.filter-check span {
    font-size: 0.8rem;
    color: #ccc;
}

.filter-btn {
    width: 100%;
    background: #c8102e;
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 10px;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}

.filter-btn:hover {
    background: #e8132f;
}

.filter-reset {
    width: 100%;
    background: none;
    border: 1px solid #222;
    color: #555;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    padding: 8px;
    cursor: pointer;
    margin-top: 6px;
    transition: all 0.2s;
}

.filter-reset:hover {
    border-color: #555;
    color: #999;
}

/* Table area */
.table-area {
    flex: 1;
    overflow: auto;
    padding: 0;
}

.loading {
    padding: 40px;
    text-align: center;
    color: #444;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

th {
    background: #111;
    color: #888;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #222;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    transition: color 0.2s;
}

th:hover {
    color: #fff;
}

th.sorted-asc::after {
    content: " \25B2";
    font-size: 0.55rem;
    color: #c8102e;
}

th.sorted-desc::after {
    content: " \25BC";
    font-size: 0.55rem;
    color: #c8102e;
}

td {
    padding: 8px 12px;
    border-bottom: 1px solid #141414;
    color: #ccc;
    white-space: nowrap;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
}

tr:hover td {
    background: #141414;
}

/* Tier badges */
.tier-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 2px;
}

.tier-elite { background: #2a1f00; color: #ffd700; }
.tier-major { background: #1a1a24; color: #a0a0c0; }
.tier-regional { background: #0a1a2a; color: #5588bb; }
.tier-emerging { background: #1a1a1a; color: #666; }

/* Money highlight */
.money { color: #4ade80; }
.money-high { color: #f87171; }

/* Scholarship badge */
.badge-yes { color: #4ade80; font-weight: 600; }
.badge-no { color: #444; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #333; }

/* Filter toggle button — hidden on desktop */
.filter-toggle {
    display: none;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    html, body { overflow: auto; }

    /* Landing — login form stacks */
    .login-form {
        flex-direction: column;
        align-items: center;
    }
    .login-form input {
        width: 80vw;
        max-width: 300px;
        border-right: 2px solid #333;
    }
    .login-form input:focus {
        border-color: #c8102e;
    }
    #enter-btn {
        width: 80vw;
        max-width: 300px;
    }
    .title-lower { margin-bottom: 32px; }
    .tagline {
        font-size: 0.6rem;
        letter-spacing: 0.25em;
        padding: 0 20px;
    }

    /* Dashboard — allow scroll */
    .dashboard {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    /* Stats — 2x2 grid */
    .stats-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 12px 16px;
    }
    .stat-card { padding: 12px 10px; }
    .stat-num { font-size: 1.6rem; }
    .stat-label { font-size: 0.6rem; }

    /* Tab bar — compact */
    .tab-bar { padding: 0 12px; }
    .tab {
        font-size: 0.7rem;
        padding: 10px 12px;
    }

    /* Content area — stacks vertically */
    .content-area {
        flex-direction: column;
        overflow: auto;
    }

    /* Filter toggle — visible on mobile */
    .filter-toggle {
        display: block;
        width: 100%;
        background: #111;
        border: none;
        border-bottom: 1px solid #1a1a1a;
        color: #888;
        font-family: 'Inter', sans-serif;
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.15em;
        padding: 10px;
        cursor: pointer;
        flex-shrink: 0;
    }
    .filter-toggle.active {
        color: #c8102e;
    }

    /* Filters — hidden by default, shown when toggled */
    .filters {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        padding: 0 16px;
        border-right: none;
        border-bottom: none;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }
    .filters.filters-open {
        max-height: 500px;
        padding: 16px;
        border-bottom: 1px solid #1a1a1a;
        overflow-y: auto;
    }

    /* Table — horizontal scroll */
    .table-area {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table { min-width: 600px; }
    td { font-size: 0.75rem; padding: 6px 8px; }
    th { font-size: 0.6rem; padding: 8px; }

    /* Header */
    .dash-header { padding: 12px 16px; }
    .dash-header h1 { font-size: 1.1rem; }
}
