/* ============================================
   PARLAY BUDDY START PAGE - Light Modern Theme
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* ============================================
   CSS VARIABLES - Matching home.css
   ============================================ */
:root {
    /* Colors - Light Theme */
    --color-bg: #f8fafc;
    --color-bg-alt: #ffffff;
    --color-bg-dark: #0f172a;
    
    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;
    --color-text-light: #ffffff;
    
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-light: #818cf8;
    
    --color-accent: #8b5cf6;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    
    --color-border: #e2e8f0;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* Typography - NO root font-size override to not break header */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    
    --transition: 0.2s ease;
}

/* ============================================
   BASE STYLES
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--color-primary);
}

a:hover {
    color: var(--color-accent);
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */
.container-outside {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

.container-inside {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ============================================
   QUICK STEPS / HINTS BOX
   ============================================ */
.white-box-3 {
    background: var(--color-bg-alt);
    padding: var(--space-xl);
    margin-top: 90px;
    margin-bottom: var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.quick-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.quick-steps .step {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    transition: all var(--transition);
}

.quick-steps .step:hover {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.05);
}

.quick-steps .step span {
    font-weight: 600;
    color: var(--color-primary);
    margin-right: var(--space-sm);
}

/* ============================================
   TOGGLE HELP SECTION
   ============================================ */
.togglebuttonheader {
    text-align: center;
    margin-top: var(--space-xl);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-weight: 500;
}

#togglebuttoncontainergame {
    display: block;
    margin: var(--space-sm) auto 0;
    padding: var(--space-sm) var(--space-lg);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

#togglebuttoncontainergame:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.container-game {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    background: var(--color-bg-alt);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    transition: top 0.3s ease;
    z-index: 10;
}

.container-game.active {
    top: 0;
}

.help-panel {
    font-size: var(--font-size-sm);
    line-height: 1.7;
}

.help-section + .help-section {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.help-section h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.help-section p,
.help-section ul {
    color: var(--color-text-secondary);
}

.help-section ul {
    padding-left: var(--space-lg);
    list-style: disc;
}

.help-section li {
    margin-bottom: var(--space-xs);
}

.hide-button {
    text-align: center;
    margin-top: var(--space-md);
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 500;
    font-size: var(--font-size-sm);
}

.hide-button:hover {
    color: var(--color-accent);
}

/* ============================================
   MATCHUPS SELECTION CONTAINER
   ============================================ */
.group-selections-container-layout {
    margin-bottom: var(--space-xl);
}

.group-selections-container {
    background: var(--color-bg-alt);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: all 0.3s ease;
}

.group-selections-container.collapsed {
    max-height: 60px;
}

.center-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md);
    cursor: pointer;
    background: var(--gradient-hero);
}

.Title-Section {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: white;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.circle-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--color-primary);
    font-size: var(--font-size-xs);
    font-weight: 700;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: var(--radius-full);
    margin-left: var(--space-sm);
    vertical-align: middle;
}

.click-hint {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--space-xs);
}

.white-box-2 {
    padding: var(--space-md);
}

/* ============================================
   SELECTIONS TABLE
   ============================================ */
#Selections {
    width: 100%;
}

.table3 {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.table3 tr {
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition);
}

.table3 tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.table3 td {
    padding: var(--space-md);
    color: var(--color-text);
}

.delete-button {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.delete-button:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   ACTION BUTTONS
   ============================================ */
.center-container-2 {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    padding: var(--space-lg);
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.btn-5 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-5:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.clear {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.clear:hover {
    border-color: var(--color-danger);
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.05);
}

/* ============================================
   LEAGUE TABS / GAMES CONTAINER
   ============================================ */
.games-container-all {
    background: var(--color-bg-alt);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.container-headers {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.default-class-h3 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    margin: 0;
}

.default-class-h3:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.clicked-class-h3 {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.clicked-class-h3:hover {
    color: white;
}

/* Slider bar under tabs */
.slidemenu {
    width: 100%;
    margin: 0 auto var(--space-md);
    overflow: hidden;
}

.slider {
    width: 100%;
    height: 3px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    position: relative;
}

.slider .bar {
    position: absolute;
    width: 10%;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: transform 0.3s ease;
}

.slide-toggle {
    display: none;
}

/* League buttons label */
.container-layout-buttons {
    text-align: center;
    margin-bottom: var(--space-md);
}

.league-btns {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
}

/* ============================================
   GAMES PANEL
   ============================================ */
.main-content {
    margin-top: var(--space-md);
}

.first-panel-container {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.first-panel-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.game-info-container {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.date-time-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.game-info-date,
.game-info-time {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
}

.teams-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.teams-container-team {
    font-weight: 600;
    color: var(--color-text);
}

.game-info-layout-2 {
    display: flex;
    gap: var(--space-md);
    margin-left: auto;
}

.list-elements {
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    transition: all var(--transition);
    cursor: pointer;
}

.list-elements:hover {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.05);
}

.list-elements ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.list-elements li {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--color-text);
    text-align: center;
}

.list-elements-select {
    position: absolute;
    inset: 0;
    background: var(--color-success);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: 600;
    cursor: pointer;
}

.list-elements:hover .list-elements-select {
    display: flex;
}

.list-elements-select.visible {
    display: flex;
}

.first-panel {
    padding: var(--space-md);
    max-height: 500px;
    overflow-y: auto;
}

/* Game rows - alternating colors only, no hover */
.first-panel .game-info-container {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
}

/* Alternating row colors */
.first-panel .game-info-container:nth-child(odd) {
    background: var(--color-bg-alt);
}

.first-panel .game-info-container:nth-child(even) {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

/* If games are wrapped in divs, target those instead */
.first-panel > div {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    border: 1px solid transparent;
}

.first-panel > div:nth-child(odd) {
    background: #f8fafc;
}

.first-panel > div:nth-child(even) {
    background: #ffffff;
    border-color: var(--color-border);
}

/* ============================================
   WELCOME SECTION (if still used)
   ============================================ */
.welcome-content-container {
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
}

.welcome-title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.welcome-title-slogan {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--color-bg-alt);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.modal-content h2 {
    font-size: var(--font-size-lg);
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .container-inside {
        width: 95%;
        padding: 0 var(--space-sm);
    }
    
    .white-box-3 {
        padding: var(--space-md);
        margin-top: 100px; /* More space to clear header */
    }
    
    /* ==========================================
       MOBILE FAB + DRAWER FOR MATCHUPS
       ========================================== */
    
    /* Container positions the FAB */
    .group-selections-container-layout {
        position: fixed;
        bottom: var(--space-lg);
        right: var(--space-lg);
        z-index: 1000;
        margin: 0;
        width: auto;
    }
    
    /* FAB default state - small pill button */
    .group-selections-container {
        border-radius: var(--radius-full);
        box-shadow: var(--shadow-xl);
        overflow: hidden;
        width: auto;
        max-width: 160px;
        background: var(--gradient-hero);
    }
    
    /* FAB Header - the clickable pill */
    .group-selections-container .center-container {
        padding: var(--space-sm) var(--space-lg);
        cursor: pointer;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: var(--space-sm);
        justify-content: center;
        background: transparent;
    }
    
    .group-selections-container .Title-Section {
        font-size: var(--font-size-sm);
        white-space: nowrap;
    }
    
    .group-selections-container .click-hint {
        display: none;
    }
    
    .group-selections-container .circle-number {
        min-width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }
    
    /* HIDE content in FAB mode (default) */
    .group-selections-container .white-box-2 {
        display: none !important;
    }
    
    .group-selections-container .center-container-2 {
        display: none !important;
    }
    
    /* ==========================================
       EXPANDED STATE (Full Drawer)
       ========================================== */
    .group-selections-container.expanded {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        top: auto;
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        display: flex;
        flex-direction: column;
        background: var(--color-bg-alt);
        overflow: hidden;
    }
    
    /* Expanded header */
    .group-selections-container.expanded .center-container {
        border-radius: 0;
        padding: var(--space-md) var(--space-lg);
        justify-content: space-between;
        width: 100%;
        flex-shrink: 0;
        background: var(--gradient-hero);
    }
    
    .group-selections-container.expanded .Title-Section {
        font-size: var(--font-size-base);
    }
    
    /* Close X button */
    .group-selections-container.expanded .center-container::after {
        content: '✕';
        font-size: var(--font-size-lg);
        color: white;
        opacity: 0.9;
        cursor: pointer;
        padding: var(--space-xs);
    }
    
    /* SHOW content when expanded */
    .group-selections-container.expanded .white-box-2 {
        display: block !important;
        flex: 1;
        overflow-y: auto;
        padding: var(--space-md);
        background: var(--color-bg-alt);
        min-height: 100px;
        max-height: calc(85vh - 160px);
    }
    
    .group-selections-container.expanded .center-container-2 {
        display: flex !important;
        flex-direction: row;
        gap: var(--space-md);
        padding: var(--space-md) var(--space-lg);
        background: var(--color-bg-alt);
        border-top: 1px solid var(--color-border);
        flex-shrink: 0;
    }
    
    .group-selections-container.expanded .btn-5 {
        flex: 1;
        padding: var(--space-md);
        font-size: var(--font-size-sm);
    }
    
    .group-selections-container.expanded .clear {
        flex: 1;
        padding: var(--space-md);
        font-size: var(--font-size-sm);
        background: var(--color-bg);
    }
    
    /* Table styling in drawer */
    .group-selections-container.expanded .table3 {
        width: 100%;
    }
    
    .group-selections-container.expanded .table3 tr {
        display: flex;
        flex-direction: column;
        padding: var(--space-sm);
        border-bottom: 1px solid var(--color-border);
        margin-bottom: var(--space-sm);
        background: var(--color-bg);
        border-radius: var(--radius-md);
    }
    
    .group-selections-container.expanded .table3 td {
        padding: var(--space-xs) 0;
        border: none;
    }
    
    /* Overlay behind drawer */
    .group-selections-container-layout.has-overlay::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
    
    /* ==========================================
       REST OF MOBILE STYLES
       ========================================== */
    
    /* League tabs */
    .container-headers {
        gap: var(--space-xs);
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .default-class-h3 {
        font-size: var(--font-size-xs);
        padding: var(--space-xs) var(--space-sm);
    }
    
    /* Games container */
    .games-container-all {
        padding: var(--space-md);
        border-radius: var(--radius-lg);
        margin-bottom: 100px; /* Space for FAB */
    }
    
    /* Game info layout */
    .game-info-container {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
    
    .game-info-layout-2 {
        margin-left: 0;
        margin-top: var(--space-sm);
        width: 100%;
        justify-content: flex-start;
    }
    
    .first-panel {
        max-height: none;
        padding: var(--space-sm);
    }
    
    .first-panel > div {
        padding: var(--space-sm);
    }
    
    /* Quick steps */
    .quick-steps .step {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 480px) {
    .white-box-3 {
        padding: var(--space-sm);
        margin-top: 90px; /* Keep space for header */
    }
    
    .games-container-all {
        padding: var(--space-sm);
        margin-bottom: 100px;
    }
    
    .first-panel {
        padding: var(--space-xs);
    }
    
    .default-class-h3 {
        font-size: 0.65rem;
        padding: 4px 8px;
    }
    
    /* FAB adjustments for small screens */
    .group-selections-container-layout {
        bottom: var(--space-md);
        right: var(--space-md);
    }
    
    .group-selections-container .center-container {
        padding: var(--space-sm) var(--space-md);
    }
    
    .group-selections-container .Title-Section {
        font-size: var(--font-size-xs);
    }
    
    .group-selections-container .circle-number {
        min-width: 20px;
        height: 20px;
        font-size: 0.6rem;
    }
    
    /* Expanded drawer on small screens */
    .group-selections-container.expanded {
        max-height: 90vh;
    }
    
    .group-selections-container.expanded .white-box-2 {
        max-height: calc(90vh - 140px);
    }
    
    .group-selections-container.expanded .center-container-2 {
        flex-direction: column;
        gap: var(--space-sm);
        padding: var(--space-sm) var(--space-md);
    }
    
    /* List elements (H2H, Spread, Points) - bigger on mobile */
    .list-elements {
        padding: var(--space-sm) var(--space-md);
        min-width: 70px;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .list-elements li {
        font-size: var(--font-size-sm);
        font-weight: 500;
    }
    
    .list-elements-select {
        font-size: var(--font-size-sm);
        font-weight: 600;
    }
}

/* ============================================
   DROPDOWN MENUS (from input_teams.css)
   ============================================ */
.dropdown-container {
    position: relative;
}

.select {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    cursor: pointer;
    color: var(--color-text);
    transition: all var(--transition);
    border-radius: var(--radius-md);
}

.select:hover {
    background: var(--color-primary);
    color: white;
}

.menu {
    list-style: none;
    padding: var(--space-sm);
    background: var(--color-bg-alt);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 100%;
    opacity: 0;
    display: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    z-index: 100;
}

.menu.menu-open {
    display: block;
    opacity: 1;
}

.menu li {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.menu li:hover {
    background: var(--color-primary);
    color: white;
}

/* ============================================
   FORM INPUTS
   ============================================ */
select,
input[type="date"],
input[type="time"],
input[type="text"] {
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-alt);
    color: var(--color-text);
    transition: all var(--transition);
}

select:focus,
input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

select:hover {
    border-color: var(--color-primary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    margin-top: auto;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}