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

:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(22, 28, 45, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #10b981; /* Emerald/Football pitch green */
    --primary-glow: rgba(16, 185, 129, 0.4);
    --accent: #f59e0b; /* Golden Trophy color */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --danger: #ef4444;
    --success: #10b981;
    --font: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(245, 158, 11, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(11, 15, 25, 1) 0px, rgba(17, 24, 39, 1) 100%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Header & Navigation */
header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 1.25rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo span {
    font-size: 1.8rem;
}

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

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.nav-link.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Main Container */
main {
    flex-grow: 1;
    max-width: 1200px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Glassmorphic Box */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

h1 {
    font-size: 2.25rem;
    background: linear-gradient(to right, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--card-border);
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #059669);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #d97706);
    color: #0b0f19;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* Leaderboard & Tables */
.table-responsive {
    overflow-x: auto;
    margin-top: 1.5rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--card-border);
}

td {
    padding: 1.25rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    transition: var(--transition);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

td:first-child {
    border-left: 1px solid var(--card-border);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

td:last-child {
    border-right: 1px solid var(--card-border);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-accent {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Prediction Grid / Match Cards */
.matches-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.match-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto 1.5fr;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.match-card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.match-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.match-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.match-group {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.team {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.team.local {
    justify-content: flex-end;
}

.team-flag {
    font-size: 1.75rem;
}

.vs-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-muted);
}

/* Prediction Options (L, E, V buttons) */
.prediction-options {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.predict-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 55px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
}

.predict-btn .option-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.predict-btn .option-val {
    font-size: 1.1rem;
    font-weight: 800;
}

.predict-btn:hover {
    border-color: var(--primary);
    color: var(--text-main);
    background: rgba(16, 185, 129, 0.1);
}

/* Input radio hack for custom predict buttons */
.prediction-radio {
    display: none;
}

.prediction-radio:checked + .predict-btn {
    background: linear-gradient(135deg, var(--primary), #059669);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.prediction-radio:disabled + .predict-btn {
    opacity: 0.6;
    cursor: not-allowed;
}

.prediction-radio:disabled:checked + .predict-btn {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: none;
}

/* Result indicator */
.result-badge {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

.result-correct {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.result-incorrect {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-info {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--card-border);
    background: rgba(15, 23, 42, 0.6);
}

/* Grid helper */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stats-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
}

.stats-val {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .match-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .team.local {
        justify-content: center;
    }
    
    .team {
        justify-content: center;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
}
