:root {
    --bg-color: #0f1419;
    --bg-gradient: linear-gradient(135deg, #0f1419 0%, #1a1d21 100%);
    --card-bg: #24292e;
    --card-hover-bg: #2d333b;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-tertiary: #8b92a0;
    --accent: #5dade2;
    --accent-secondary: #5dade2;
    --green: #2ecc71;
    --red: #e74c3c;
    --gold: #5dade2;
    --modal-bg: rgba(15, 20, 25, 0.95);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, var(--bg-color) 0%, #1a1d21 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.container {
    width: 95%;
    max-width: 1000px;
    margin: 0 auto;
}

.main-header {
    background: linear-gradient(135deg, var(--card-bg) 0%, #2d333b 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 2px solid #3f4448;
    transition: all 0.3s ease;
}

.main-header::before {
    display: none;
}

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.logo-section {
    flex: 1;
    min-width: 300px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 15px;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(93, 173, 226, 0.2);
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.header-info {
    text-align: right;
}

.last-updated {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin: 0;
    padding: 8px 16px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}


/* Filters Section */
.filters-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    background: rgba(22, 33, 62, 0.5);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--accent);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(127, 90, 240, 0.2) 100%);
    border-color: var(--accent);
    color: var(--accent);
}

.stats-summary {
    display: flex;
    gap: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-value.positive {
    color: var(--green);
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
    animation: fadeInUp 0.5s ease-out;
}

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

.game-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(29, 45, 77, 0.7) 100%);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0, 212, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 550px;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--card-hover-bg) 0%, rgba(35, 55, 95, 0.7) 100%);
}

.game-card:hover::before {
    opacity: 1;
}

.teams {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

.teams span {
    text-align: center;
    padding: 8px 10px;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
    max-width: 100%;
}

.teams span:first-child,
.teams span:last-child {
    width: 100%;
    padding: 10px 10px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    min-height: 44px;
}

.vs {
    color: var(--text-tertiary);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 400;
}

.badge-warning {
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 214, 10, 0.2) 0%, rgba(255, 100, 10, 0.2) 100%);
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.odds-section {
    background: rgba(0, 212, 255, 0.08);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 212, 255, 0.1);
    flex-shrink: 0;
}

.team-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 4px 0;
    font-weight: 500;
}

.team-row:last-child {
    margin-bottom: 0;
}

.pred-section {
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    padding-top: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Injury Report Pending Warning */
.report-pending-warning {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    background: rgba(255, 193, 7, 0.08);
    border-left: 3px solid var(--gold);
    border-radius: 4px;
    text-align: left;
    margin-bottom: 12px;
}

.warning-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.08);
    }
}

.warning-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
}

.warning-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
}

.warning-text strong {
    color: var(--gold);
    font-weight: 700;
}

.warning-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.prob-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.prob-bar {
    height: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    display: flex;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.prob-fill-home {
    background: linear-gradient(90deg, var(--accent) 0%, #7f5af0 100%);
    height: 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 0 8px rgba(0, 212, 255, 0.4);
}

.prob-fill-away {
    background: linear-gradient(90deg, var(--red) 0%, #ff0080 100%);
    height: 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 0 8px rgba(255, 0, 110, 0.4);
}

.ev-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.ev-positive {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 200, 100, 0.1) 100%);
    color: var(--green);
    border: 1px solid rgba(0, 255, 136, 0.4);
}

.ev-negative {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.2) 0%, rgba(200, 0, 80, 0.1) 100%);
    color: var(--red);
    border: 1px solid rgba(255, 0, 110, 0.4);
}

/* Recommendation Section */
.rec-container {
    margin-top: 16px;
    padding: 14px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    flex-shrink: 0;
}

.rec-active {
    background: linear-gradient(135deg, rgba(255, 214, 10, 0.15) 0%, rgba(255, 100, 10, 0.1) 100%);
    border-color: var(--gold);
}

.rec-none {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.rec-action {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rec-active .rec-action {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 214, 10, 0.3);
}

.rec-none .rec-action {
    color: var(--text-tertiary);
}

.rec-stake {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Analysis Toggle */
.analysis-toggle-container {
    text-align: center;
    margin-top: auto;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    padding-top: 12px;
    flex-shrink: 0;
}

.analysis-toggle-btn {
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 6px;
    letter-spacing: 0.5px;
    transition: color 0.3s, transform 0.3s;
}

.analysis-toggle-btn:hover {
    color: var(--accent);
    transform: scale(1.05);
}

.analysis-toggle-btn .toggle-icon {
    transition: transform 0.3s;
}

.analysis-toggle-btn.open .toggle-icon {
    transform: rotate(180deg);
}

.analysis-section {
    display: none;
    background: linear-gradient(135deg, rgba(127, 90, 240, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
    padding: 16px;
    border-radius: 10px;
    margin-top: 12px;
    font-size: 0.85rem;
    border: 1px solid rgba(127, 90, 240, 0.2);
    animation: slideDown 0.3s ease-out;
}

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
    font-size: 1.1rem;
}

/* Sensitivity Visualizer */
.sensitivity-box {
    margin-bottom: 15px;
    text-align: center;
}

.sensitivity-title {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 8px;
    display: block;
}

.sensitivity-bar-container {
    position: relative;
    height: 12px;
    background: #333;
    border-radius: 6px;
    margin: 10px 0;
}

.sensitivity-range {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(255, 193, 7, 0.3); /* Gold tint */
    border-radius: 6px;
}

.sensitivity-marker {
    position: absolute;
    top: -4px;
    width: 4px;
    height: 20px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 0 5px rgba(255,255,255,0.8);
    transition: left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 2;
}

.sensitivity-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #888;
}

/* Interactive Toggles */
.interactive-toggles {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.toggle-row:last-child {
    border-bottom: none;
}

.player-label {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Switch Component */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #555;
  transition: .4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(20px);
}


/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 15, 30, 0.9);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(29, 45, 77, 0.7) 100%);
    margin: 4% auto;
    padding: 32px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    width: 90%;
    max-width: 1000px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    color: var(--text-tertiary);
    float: right;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
    transition: color 0.2s, transform 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--accent);
    transform: scale(1.2) rotate(90deg);
}

#modal-title {
    margin: 0 0 24px 0;
    border-bottom: 2px solid rgba(0, 212, 255, 0.2);
    padding-bottom: 16px;
    font-size: 1.8rem;
    font-weight: 700;
}

/* Modal Warning */
.modal-warning {
    background: linear-gradient(135deg, rgba(255, 214, 10, 0.15) 0%, rgba(255, 100, 10, 0.1) 100%);
    border-left: 4px solid var(--gold);
    padding: 16px;
    margin-bottom: 20px;
    color: var(--gold);
    font-size: 0.95rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 214, 10, 0.3);
}

.modal-warning strong {
    font-size: 1.1rem;
    display: block;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.modal-grid-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 10px;
    flex: 1;
}

@media (max-width: 768px) {
    .modal-grid-cols {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.col-header {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.2);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.injury-section {
    margin-bottom: 24px;
}

.injury-section h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    border-left: 4px solid var(--gold);
    padding-left: 12px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.injury-section.out h3 {
    color: var(--red);
    border-color: var(--red);
}

.injury-section.uncertain h3 {
    color: var(--gold);
    border-color: var(--gold);
}

.injury-section.probable h3 {
    color: var(--green);
    border-color: var(--green);
}

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

.player-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    gap: 12px;
}

.player-list li:last-child {
    border-bottom: none;
}

.player-status-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.reason-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 2px;
}

.reason-text-small {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-left: 8px;
    font-style: italic;
}

/* Toggle Scenarios Button */
.view-toggle-container {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    text-align: center;
}

.view-btn {
    background: linear-gradient(135deg, var(--accent) 0%, #7f5af0 100%);
    color: var(--bg-color);
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

/* Scenario Section */
.scenario-wrapper {
    margin-top: 20px;
}

.scenario-section h3 {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 16px;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.scenario-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.scenario-table th,
.scenario-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.scenario-table th {
    background: rgba(0, 212, 255, 0.08);
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.scenario-table tr:last-child td {
    border-bottom: none;
}

.scenario-table tr:hover {
    background-color: rgba(0, 212, 255, 0.05);
}

.scenario-name {
    color: var(--text-primary);
    font-weight: 600;
}

.hidden {
    display: none !important;
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .game-card {
        padding: 16px;
        min-height: auto;
    }

    .teams {
        margin-bottom: 16px;
    }

    .teams span:first-child,
    .teams span:last-child {
        padding: 8px 8px;
        font-size: 0.9rem;
        min-height: 40px;
    }

    .logo {
        font-size: 1.5rem;
    }
}

/* Navigation Links */
.nav-container {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    justify-content: flex-end;
    width: 100%;
}

.nav-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.05);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    color: var(--bg-color);
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 173, 226, 0.3);
}
