/* SpelExperter - Sports Betting Predictions */

:root {
    --primary: #00d4aa;
    --primary-dark: #00b894;
    --secondary: #6c5ce7;
    --accent: #fdcb6e;
    --danger: #d63031;
    --warning: #e17055;
    --bg-dark: #0a0e17;
    --bg-card: #141d2b;
    --bg-card-alt: #1a2332;
    --bg-hover: #1e2a3a;
    --text: #e8eaed;
    --text-muted: #8b95a5;
    --border: #2a3441;
    --success: #00b894;
    --gold: #f1c40f;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.nav {
    display: flex;
    gap: 5px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--primary);
}

/* Main */
.main {
    padding: 30px 0;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero p {
    color: var(--text-muted);
    font-size: 18px;
}

/* Filters */
.filters-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.filters-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.filter-group input {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    color: var(--text);
    font-size: 14px;
    width: 140px;
}

.filter-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Checkbox filters */
.checkbox-group {
    flex-direction: row !important;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    padding: 8px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s;
}

.checkbox-label:hover {
    border-color: var(--primary);
}

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

.checkbox-label input[type="checkbox"]:checked + span {
    color: var(--primary);
}

/* Advantage badges */
.advantage-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.advantage-badge.injury {
    background: rgba(0, 212, 170, 0.15);
    color: var(--primary);
}

.advantage-badge.h2h {
    background: rgba(253, 203, 110, 0.15);
    color: var(--accent);
}

.advantage-badge.none {
    background: var(--bg-dark);
    color: var(--text-muted);
}

/* Injury display */
.injury-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.injury-count {
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.injury-count.low {
    background: rgba(0, 184, 148, 0.2);
    color: var(--success);
}

.injury-count.medium {
    background: rgba(253, 203, 110, 0.2);
    color: var(--accent);
}

.injury-count.high {
    background: rgba(214, 48, 49, 0.2);
    color: var(--danger);
}

/* H2H display */
.h2h-display {
    display: flex;
    gap: 3px;
}

.h2h-result {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
}

.h2h-result.W { background: var(--success); color: white; }
.h2h-result.L { background: var(--danger); color: white; }
.h2h-result.D { background: var(--text-muted); color: white; }

/* Stats Summary */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-card.highlight {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 14px;
}

.stat-card.highlight .stat-label {
    color: rgba(255,255,255,0.8);
}

/* Predictions Table */
.predictions-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.predictions-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

.table-wrapper {
    overflow-x: auto;
}

.predictions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.predictions-table th {
    text-align: left;
    padding: 12px 15px;
    background: var(--bg-dark);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

.predictions-table th.sortable {
    cursor: pointer;
}

.predictions-table th.sortable:hover {
    color: var(--primary);
}

.predictions-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

.predictions-table tr:hover {
    background: var(--bg-hover);
}

.predictions-table .loading {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

/* Match info */
.match-teams {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.team-home {
    font-weight: 600;
}

.team-away {
    color: var(--text-muted);
}

.team-vs {
    color: var(--text-muted);
    font-size: 11px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.badge-primary {
    background: rgba(59, 130, 246, 0.2);
    color: var(--secondary);
}

/* Win probability bar */
.prob-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prob-value {
    font-weight: 700;
    min-width: 45px;
}

.prob-visual {
    flex: 1;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    overflow: hidden;
    min-width: 60px;
}

.prob-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s;
}

.prob-fill.high {
    background: var(--success);
}

.prob-fill.medium {
    background: var(--warning);
}

.prob-fill.low {
    background: var(--danger);
}

/* Odds display */
.odds {
    font-weight: 600;
    color: var(--primary);
}

.odds.good {
    color: var(--success);
}

.odds.ok {
    color: var(--warning);
}

/* Confidence indicator */
.confidence {
    display: flex;
    gap: 3px;
}

.confidence-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
}

.confidence-dot.active {
    background: var(--primary);
}

.confidence-dot.active.high {
    background: var(--success);
}

/* Team Stats Section */
.team-stats-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
}

.team-stats-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

.team-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.team-stat-card {
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-name {
    font-weight: 600;
}

.team-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
}

.team-stat {
    text-align: center;
}

.team-stat-value {
    font-weight: 700;
    color: var(--primary);
}

.team-stat-label {
    color: var(--text-muted);
    font-size: 11px;
}

/* Live Ticker */
.live-ticker {
    background: linear-gradient(90deg, var(--bg-card) 0%, var(--bg-card-alt) 50%, var(--bg-card) 100%);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    overflow: hidden;
}

.ticker-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ticker-label {
    background: var(--danger);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    animation: pulse 2s infinite;
}

.ticker-label::before {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(214, 48, 49, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(214, 48, 49, 0); }
}

.ticker-content {
    flex: 1;
    overflow: hidden;
}

.ticker-track {
    display: flex;
    gap: 50px;
    animation: scroll 30s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    font-size: 13px;
}

.ticker-teams {
    font-weight: 600;
}

.ticker-score {
    background: var(--primary);
    color: var(--bg-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.ticker-time {
    color: var(--text-muted);
    font-size: 11px;
}

.ticker-live {
    color: var(--danger);
    font-weight: 600;
}

/* News Section */
.news-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.news-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.news-card {
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 15px;
    border-left: 3px solid var(--primary);
    transition: transform 0.2s, border-color 0.2s;
}

.news-card:hover {
    transform: translateX(5px);
    border-color: var(--accent);
}

.news-card h3 {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-muted);
}

.news-source {
    color: var(--primary);
    font-weight: 600;
}

/* Animated Background */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,212,170,0.03) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Stats Cards Animation */
.stat-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Table Row Animation */
.predictions-table tbody tr {
    transition: all 0.2s;
}

.predictions-table tbody tr:hover {
    background: var(--bg-hover);
    transform: scale(1.01);
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

.footer p {
    color: var(--text-muted);
    font-size: 14px;
}

.footer .disclaimer {
    font-size: 12px;
    margin-top: 10px;
    color: var(--warning);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .filters {
        flex-direction: column;
    }

    .filter-group input {
        width: 100%;
    }

    .predictions-table {
        font-size: 12px;
    }

    .predictions-table th,
    .predictions-table td {
        padding: 10px 8px;
    }
}
