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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    margin-bottom: 30px;
}

header h1 {
    font-size: 28px;
    color: #667eea;
    margin-bottom: 15px;
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: #666;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

nav a:hover {
    background: #f0f0f0;
    color: #667eea;
}

nav a.active {
    background: #667eea;
    color: white;
}

/* Filter Bar */
.filter-bar {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: #555;
    white-space: nowrap;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    min-width: 150px;
}

.filter-group input {
    min-width: 200px;
}

.btn {
    padding: 8px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Stats Bar */
.stats-bar {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-bar strong {
    color: #667eea;
    font-size: 18px;
}

/* Matches Grid */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.match-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    cursor: pointer;
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.match-stage {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.match-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
}

.badge-finished {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-live {
    background: #ffebee;
    color: #c62828;
    animation: pulse 2s infinite;
}

.badge-upcoming {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-predict {
    background: #f3e5f5;
    color: #6a1b9a;
}

.badge-no-predict {
    background: #fafafa;
    color: #999;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
}

.team {
    flex: 1;
    text-align: center;
}

.team-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.team-score {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
}

.match-vs {
    font-size: 18px;
    font-weight: 500;
    color: #999;
    padding: 0 15px;
}

.match-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.match-time, .match-venue {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.match-time::before {
    content: "⏰ ";
}

.match-venue::before {
    content: "📍 ";
}

.match-bets {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.match-bets h4 {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
}

.bet-group {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}

.bet-label {
    font-weight: 600;
    min-width: 60px;
    color: #667eea;
}

.bet-label.home { color: #1e88e5; }
.bet-label.draw { color: #43a047; }
.bet-label.away { color: #e53935; }

.bet-llms {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.llm-tag {
    display: inline-block;
    padding: 3px 8px;
    background: #667eea;
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* Predictions Table */
.predictions-table {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.predictions-table table {
    width: 100%;
    border-collapse: collapse;
}

.predictions-table th,
.predictions-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.predictions-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    position: sticky;
    top: 0;
}

.predictions-table tr:hover {
    background: #f8f9fa;
}

.predictions-table td:first-child {
    font-weight: 600;
    color: #667eea;
}

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

.accuracy-bar-bg {
    flex: 1;
    height: 24px;
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
}

.accuracy-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

/* Match Detail */
.match-detail {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.match-detail h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.match-detail h3 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #555;
    font-size: 18px;
}

.detail-section {
    margin-bottom: 25px;
}

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

.detail-item {
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.detail-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    transition: all 0.3s;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Loading */
.loading-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .matches-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

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

    nav {
        flex-direction: column;
        gap: 10px;
    }
}

/* Data Source Footer */
.data-source {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    color: #666;
    font-size: 14px;
}

.data-source p {
    margin: 0;
}

.data-source a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.data-source a:hover {
    color: #5568d3;
    text-decoration: underline;
}
