/* --- VARIABLES & DESIGN SYSTEM --- */
:root {
    --bg-primary: #0a0b10;
    --bg-secondary: #131520;
    --bg-card: rgba(26, 29, 46, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* tartan red, electric cyan, success green, gold */
    --color-accent: #ff4757;      /* Tartan Red */
    --color-primary: #00d2d3;     /* Electric Cyan */
    --color-success: #1dd1a1;     /* Athletic Green */
    --color-warning: #ff9f43;     /* Energy Orange */
    --color-gold: #f1c40f;        /* Medal Gold */
    --color-silver: #bdc3c7;      /* Medal Silver */
    --color-bronze: #cd7f32;      /* Medal Bronze */
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.3), 
                      0 1px 3px rgba(255, 255, 255, 0.05) inset;
}

/* --- GENERAL RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Ambient background glow */
.glass-bg {
    position: absolute;
    top: -10%;
    left: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 210, 211, 0.06) 0%, rgba(255, 71, 87, 0.03) 70%, transparent 100%);
    z-index: -1;
    filter: blur(80px);
    pointer-events: none;
}

.app-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- AUTH VIEW STYLING --- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(0,0,0,0.25);
    padding: 0.3rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.auth-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-smooth);
}

.auth-tab-btn.active {
    color: #fff;
    background: rgba(255,255,255,0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.auth-footer {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-footer code {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    color: var(--color-primary);
}

.input-tip {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- MAIN APP VIEW STYLING --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-premium);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(0, 210, 211, 0.3));
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

/* --- NAVIGATION --- */
.app-nav {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    background: var(--bg-secondary);
    padding: 0.4rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.nav-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.nav-btn svg {
    width: 18px;
    height: 18px;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.nav-btn.active {
    color: #fff;
    background: var(--color-accent);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

/* --- TABS TRANSITION --- */
.app-tab-content {
    display: none;
    opacity: 0;
}

.app-tab-content.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.4s ease-out;
}

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

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-secondary);
}

/* --- CARD SYSTEM --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
}

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

.card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* BADGES */
.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-accent {
    background: rgba(255, 71, 87, 0.15);
    color: var(--color-accent);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.badge-secondary {
    background: rgba(0, 210, 211, 0.15);
    color: var(--color-primary);
    border: 1px solid rgba(0, 210, 211, 0.3);
}

.badge-success {
    background: rgba(29, 209, 161, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(29, 209, 161, 0.3);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent), #e84118);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--color-primary), #0abde3);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 210, 211, 0.25);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 211, 0.4);
}

.btn-danger {
    background: rgba(235, 94, 85, 0.15);
    color: #eb5e55;
    border: 1px solid rgba(235, 94, 85, 0.3);
}

.btn-danger:hover {
    background: #eb5e55;
    color: #fff;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: var(--border-radius-sm);
}

/* FORMS */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"], input[type="password"], select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

input[type="text"]:focus, input[type="password"]:focus, select:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.08);
}

/* CHECKBOX & RADIO GRIDS */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    user-select: none;
}

.checkbox-label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--color-accent);
    width: 16px;
    height: 16px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.radio-label:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.radio-label input[type="radio"] {
    accent-color: var(--color-primary);
    width: 18px;
    height: 18px;
}

/* --- ATHLETES GRID (SPORTS CARD DESIGN) --- */
.athletes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.athlete-card {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, rgba(20, 22, 37, 0.9) 0%, rgba(10, 11, 19, 0.9) 100%);
    overflow: hidden;
    padding: 1.5rem;
    box-shadow: var(--shadow-premium);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Special styling for REAL athlete avatar */
.athlete-card.real-athlete-card {
    border-color: rgba(241, 196, 15, 0.35);
    box-shadow: 0 10px 25px rgba(241, 196, 15, 0.08);
}

.athlete-card.real-athlete-card::before {
    background: linear-gradient(90deg, var(--color-gold), var(--color-warning));
}

.athlete-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 210, 211, 0.4);
    box-shadow: 0 15px 35px rgba(0, 210, 211, 0.15);
}

.athlete-card.real-athlete-card:hover {
    border-color: var(--color-gold);
    box-shadow: 0 15px 35px rgba(241, 196, 15, 0.15);
}

.athlete-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.card-header-athlete {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.athlete-info h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.athlete-info span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.athlete-level {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
}

/* XP & Energy Bars */
.athlete-bar-group {
    margin-bottom: 1rem;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.bar-fill.xp {
    background: var(--color-primary);
}

.bar-fill.energy {
    background: var(--color-success);
}

/* Stats list */
.athlete-stats-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.15);
    padding: 0.6rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

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

.stat-box .stat-box-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: 700;
}

.stat-box .stat-box-val {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    margin-top: 0.1rem;
}

.stat-box.highlight .stat-box-val {
    color: var(--color-warning);
    text-shadow: 0 0 8px rgba(255, 159, 67, 0.4);
}

/* Streak Indicator */
.streak-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(255, 159, 67, 0.08);
    border: 1px solid rgba(255, 159, 67, 0.2);
    padding: 0.3rem 0.6rem;
    border-radius: var(--border-radius-sm);
    justify-content: center;
}

.streak-indicator svg {
    color: var(--color-warning);
    width: 14px;
    height: 14px;
}

/* --- LEAGUE LAYOUT --- */
.league-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 868px) {
    .league-layout {
        grid-template-columns: 1fr;
    }
}

/* --- REPLAY VIEW STYLING --- */
.competition-simulation {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.sim-header h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
}

.sim-body {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 900px) {
    .sim-body {
        grid-template-columns: 1fr;
    }
}

.sim-visual-container {
    padding: 1.5rem;
    background: #0f101a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 350px;
    position: relative;
    border-right: 1px solid var(--border-color);
}

/* Tartan track lane animation */
.tartan-track {
    background: #c0392b; /* Tartan clay */
    border-radius: 8px;
    padding: 10px 0;
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.5);
    border: 4px solid #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.track-lane {
    height: 40px;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.6);
    position: relative;
    display: flex;
    align-items: center;
}

.track-lane:last-child {
    border-bottom: none;
}

.track-lane-number {
    position: absolute;
    left: 10px;
    font-weight: 800;
    color: rgba(255,255,255,0.4);
    font-size: 1.1rem;
    z-index: 1;
}

.runner-avatar {
    width: 28px;
    height: 28px;
    background: var(--color-primary);
    border: 2px solid #fff;
    border-radius: 50%;
    position: absolute;
    left: 40px;
    transform: translateX(0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.7rem;
    color: #000;
    box-shadow: 0 0 10px rgba(0,210,211,0.5);
}

.runner-avatar.leader {
    border-color: var(--color-gold);
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.8);
}

.runner-name-tag {
    position: absolute;
    left: 35px;
    bottom: -1px;
    font-size: 0.55rem;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 1px 4px;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 2;
    pointer-events: none;
}

.finish-line {
    position: absolute;
    right: 50px;
    top: 0;
    bottom: 0;
    width: 6px;
    background: repeating-linear-gradient(
        45deg,
        #fff,
        #fff 6px,
        #000 6px,
        #000 12px
    );
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

/* Field graphic visualizers */
.field-sector {
    background: #27ae60; /* grass field */
    border-radius: 8px;
    height: 250px;
    border: 4px solid #fff;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.3);
}

.sand-pit {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: #e4c495; /* sand */
    border-right: 3px solid #fff;
}

.measuring-line {
    position: absolute;
    top: 0;
    bottom: 0;
    border-left: 2px dashed rgba(255,255,255,0.4);
    display: flex;
    align-items: flex-end;
    padding-bottom: 5px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.8);
    font-weight: 700;
}

.attempt-marker {
    width: 14px;
    height: 14px;
    background: var(--color-accent);
    border: 2px solid #fff;
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(255,71,87,0.8);
    animation: markerPulse 1.5s infinite;
}

@keyframes markerPulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.active-athlete-panel {
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
}

/* COMMENTARY */
.sim-commentary-panel {
    padding: 1.5rem;
    background: #11131f;
    display: flex;
    flex-direction: column;
    height: 350px;
}

.sim-commentary-panel h4 {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.commentary-feed {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-right: 0.5rem;
    font-family: monospace;
    font-size: 0.9rem;
}

.commentary-feed p {
    line-height: 1.4;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.comment-system { color: #8a8ea8; font-style: italic; }
.comment-start { color: #f1c40f; font-weight: bold; }
.comment-action { color: #e74c3c; }
.comment-mid { color: #3498db; }
.comment-finish { color: #2ecc71; font-weight: bold; }

.sim-results-panel {
    padding: 1.5rem;
    background: var(--bg-secondary);
}

/* --- ADMIN LAYOUT --- */
.admin-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
}

@media (max-width: 868px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
}

/* --- TABLES --- */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
}

th {
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

tr {
    border-bottom: 1px solid var(--border-color);
}

tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

/* --- UTILITIES --- */
.hidden {
    display: none !important;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- OFFICIAL FEDERATION RESULTS SHEET (RFEA STYLE) --- */
.rfea-sheet {
    background-color: #ffffff;
    color: #000000 !important;
    font-family: Arial, sans-serif;
    padding: 2rem;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 3px solid #222;
    margin-bottom: 2rem;
}

.rfea-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.rfea-header h1 {
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    color: #000 !important;
}

.rfea-header h2 {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0.25rem 0;
    color: #444 !important;
}

.rfea-subheader-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    color: #222 !important;
}

.rfea-subheader-box .event-title {
    font-size: 1rem;
    font-weight: 800;
    text-align: center;
    color: #000 !important;
}

.rfea-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.rfea-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: #000000 !important;
}

.rfea-table th {
    background-color: #ffffff;
    border-top: 1px solid #000;
    border-bottom: 2px solid #000;
    color: #000000 !important;
    font-weight: 700;
    text-transform: none;
    font-size: 0.8rem;
    padding: 0.5rem 0.25rem;
    text-align: left;
}

.rfea-table td {
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    color: #000000 !important;
}

.rfea-table tr:hover {
    background-color: #f1f2f6 !important;
}

.rfea-table .ath-bold {
    font-weight: 700;
    font-size: 0.9rem;
    color: #000 !important;
    text-transform: uppercase;
}

.rfea-table .club-subtitle {
    display: block;
    font-size: 0.72rem;
    color: #555 !important;
    font-weight: 400;
    text-transform: capitalize;
}

.rfea-table .lic-subtitle {
    display: block;
    font-size: 0.72rem;
    color: #666 !important;
    font-weight: 400;
}

.rfea-table .mark-bold {
    font-weight: 800;
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
    color: #000 !important;
}

.rfea-table .pts-bold {
    font-weight: 700;
    color: #d9534f !important;
}

/* --- TRANSFER MARKET TABLE STYLES --- */
.market-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    color: #ffffff !important;
}

.market-table th {
    background-color: var(--color-background-card);
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary) !important;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.75rem 0.5rem;
    text-align: left;
}

.market-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: #ffffff !important;
}

.market-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Force dark background for dropdown option elements */
select option {
    background-color: #1e272e !important;
    color: #ffffff !important;
}
