/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-body: #0a0f1d;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-bg: #1e293b;
    --border-color: #334155;
    --header-bg: #000000;
    --accent: #f59e0b; /* NFL Gold */
    --success: #10b981;
    --error: #ef4444;
    --header-height: 70px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    background: var(--bg-body); 
    color: var(--text-main); 
    font-family: 'Inter', system-ui, sans-serif; 
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

main { 
    flex: 1; 
    width: 100%;
}

/* =========================================
   2. GLOBAL LAYOUT (Header/Footer)
   ========================================= */
.site-header {
    background: var(--header-bg);
    min-height: var(--header-height);
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    font-style: italic;
    font-size: 1.2rem;
    text-transform: uppercase;
}
.logo span { color: var(--text-muted); }

.nav-auth { display: flex; gap: 1.5rem; align-items: center; }

.login-link, .portal-card-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: color 0.2s;
}

.site-footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* =========================================
   3. COMPONENTS (Cards, Buttons, Inputs)
   ========================================= */
.nfl-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.nfl-card.highlight { border: 2px solid var(--accent); }

.nfl-card-header {
    background: var(--header-bg);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 50px;
    font-weight: 700;
    font-size: 0.9rem;
}

.nfl-card-body { padding: 1.5rem; }

.nfl-input, .filter-input, .filter-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    outline: none;
    width: 100%;
}

.nfl-btn, .register-btn {
    background: var(--accent);
    color: #000;
    border: none;
    font-weight: 900;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    display: inline-block;
    text-align: center;
    transition: transform 0.1s ease;
}
.nfl-btn:hover, .register-btn:hover { transform: translateY(-1px); }

/* 1. Make the container horizontal */
.market-filters {
    display: flex;
    flex-direction: row; 
    flex-wrap: wrap;     
    gap: 1rem;           
    margin-bottom: 1.5rem;
    align-items: flex-end; 
}

/* 2. Prevent stretching and set reasonable sizes */
.market-filters .filter-group {
    flex: 0 1 auto;    
    width: auto;
}

/* 3. Override the width: 100% from your Section 3 */
.market-filters .filter-input {
    width: 260px;      
}

.market-filters .filter-select {
    width: 160px;       
}

.filter-input, 
.filter-select {
    background-color: #000000;    /* Solid black background */
    color: var(--text-main);      /* Uses your #f8fafc white text */
    border: 1px solid var(--border-color);
}

/* This ensures the 'All Positions' / 'All Teams' text isn't white-on-white */
.filter-select option {
    background-color: var(--card-bg);
    color: var(--text-main);
}

/* This makes the "Search name..." text readable */
.filter-input::placeholder {
    color: var(--text-muted);
}

/* =========================================
   4. TABLES (The NFL Matrix)
   ========================================= */
.nfl-table { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 0.9rem;
}

.nfl-table th { 
    background: rgba(0,0,0,0.3); 
    color: var(--text-muted); 
    font-size: 0.65rem; 
    text-transform: uppercase; 
    padding: 1rem; 
    text-align: left; 
    border-bottom: 2px solid var(--border-color);
    letter-spacing: 0.5px;
}

.nfl-table td { 
    padding: 1rem; 
    border-bottom: 1px solid var(--border-color); 
    vertical-align: middle;
}

th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--accent); }
th.sortable.asc::after { content: " ↑"; color: var(--success); }
th.sortable.desc::after { content: " ↓"; color: var(--error); }

.leaderboard-row-me td { background: rgba(245, 158, 11, 0.08); }
.leaderboard-row-me td:first-child { border-left: 4px solid var(--accent); }

/* =========================================
   5. BADGES & STATUS
   ========================================= */
.badge-pos {
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    display: inline-block;
    color: #fff;
}
.badge-qb { background: #3b82f6; }
.badge-rb { background: #8b5cf6; }
.badge-wr { background: #ec4899; }
.badge-te { background: #06b6d4; }
.badge-pk { background: var(--success); }
.badge-def { background: var(--accent); color: #000; }

.status-indicator { display: inline-flex; align-items: center; gap: 8px; font-size: 0.7rem; font-weight: 900; }
.dot { height: 8px; width: 8px; border-radius: 50%; background: currentColor; }
.success { color: var(--success); }

/* =========================================
   6. PORTAL LAYOUT
   ========================================= */
.landing-wrapper {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem); 
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 1rem;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.text-accent { color: var(--accent); }

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 900px;
}

.portal-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 2rem;
}

/* =========================================
   7. AUTHENTICATION & FORMS
   ========================================= */
.setup-card { max-width: 500px; width: 100%; margin: 0 auto; }
.input-label { display: block; margin-bottom: 0.5rem; font-size: 0.75rem; font-weight: 900; text-transform: uppercase; color: var(--text-muted); }
.input-full { width: 100%; display: block; }
.btn-full { width: 100%; display: block; }
.auth-intro { text-align: center; margin-bottom: 2rem; }
.auth-footer { text-align: center; margin-top: 2rem; border-top: 1px solid var(--border-color); padding-top: 1.5rem; }
.error-text { color: var(--error); font-size: 0.75rem; margin-top: 0.5rem; font-weight: 700; }
.flex-group-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.accent-link { font-size: 0.7rem; color: var(--accent) !important; text-transform: uppercase; font-weight: 900; }
.btn-outline { background: transparent !important; border: 1px solid var(--accent) !important; color: var(--accent) !important; }

/* =========================================
   8. UTILITIES & RESPONSIVENESS
   ========================================= */
.page-container { 
    max-width: 900px; 
    width: 100%; /* Change from 900px to 100% */
    margin: 0 auto; 
    padding: 2rem 1rem; /* Added 1rem side padding for mobile */
}
.v-stack { display: flex; flex-direction: column; gap: 1.5rem; } /* Adjusted gap for forms */
.text-right { text-align: right; }
.text-center { text-align: left; }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    width: 100%;
}

.market-scroll-area { height: 600px; overflow-y: auto; }

@media (max-width: 992px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .header-container { padding: 1rem; }
}

.playoff-hidden { display: none !important; }

/* =========================================
   9. INTERACTIVE ELEMENTS (Proxy System)
   ========================================= */

/* 1. The Roster Button (Active State) */
.select-slot-trigger.is-active {
    background-color: var(--success);
    color: #fff;
    border-color: var(--success);   
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); /* Glow effect */
    transition: all 0.2s ease;
}

/* 2. The Market Row (Selectable State) */
/* Applied to TR elements with data-action="select-player" */
tr[data-action="select-player"] {
    cursor: pointer;
    transition: background-color 0.1s ease-in-out;
}

tr[data-action="select-player"]:hover {
    background-color: rgba(245, 158, 11, 0.1); /* Subtle Gold Tint on Hover */
}

tr[data-action="select-player"]:active {
    background-color: rgba(245, 158, 11, 0.2);
    transform: scale(0.998); /* Micro-interaction press */
}

/* =========================================
   ROSTER ROW INTERACTION (NEW)
   ========================================= */

/* Alternating striping for roster rows */
.player-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Hover state for empty, clickable roster rows */
.clickable-roster-row:hover {
    background-color: rgba(245, 158, 11, 0.08); /* Same gold tint as market hover */
    cursor: pointer;
}

/* Active/selected roster slot highlight */
.roster-row-active {
    background-color: rgba(16, 185, 129, 0.15); /* success green tint */
    box-shadow: inset 0 0 0 2px var(--success);
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

/* Smooth transitions for all roster rows */
.player-row {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    
}

/* =========================================
   10. GREAT MINDS MODULE & EXTENSIONS
   ========================================= */

/* 1. The Psychedelic Text Effect */
.gm-psychedelic-text {
    /* Creates a gradient moving from Pink -> Blue -> Cyan */
    background: linear-gradient(90deg, #ff00cc, #3333ff, #00ccff);
    background-size: 200% auto;
    
    /* Clips the background to the text shape */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    /* Optional: Animate the gradient for a "living" mind effect */
    animation: gm-shine 3s linear infinite;
}

@keyframes gm-shine {
    to { background-position: 200% center; }
}

/* 2. Missing Card Typography (Used in both Playoff & GM HTML) */
/* These were in your HTML but not defined in the CSS provided */

.card-title {
    display: block;
    font-size: 1.25rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.uid-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* 3. Header Container Spacing */
.landing-header {
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   11. GREAT MINDS - SPECIFIC ELEMENTS
   ========================================= */

/* The Large Code Input */
.gm-code-input {
    font-size: 2rem;
    text-align: center;
    letter-spacing: 0.5rem;
    text-transform: uppercase;
    font-weight: 900;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-color);
}

.gm-code-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

/* Ensure the wrapper centers the card */
.setup-wrapper {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.player-identity {
    text-align: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    border-bottom: 2px solid var(--accent);
}
.player-identity h3 {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--accent);
    margin: 0;
}