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

:root {
    --bg-color: #0b0f19;
    --bg-gradient: linear-gradient(135deg, #0b0f19 0%, #1a1b41 100%);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --card-bg: rgba(30, 41, 59, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --danger: #ef4444;
    --warning: #f59e0b;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Base layouts */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 1rem 1.5rem;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.navbar .brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar .brand img {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.nav-links a {
    margin-left: 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Cards */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Headings */
h1, h2, h3 {
    margin-top: 0;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.8rem;
}

a.card {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, var(--primary-hover) 0%, #6366f1 100%);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #b91c1c 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #f87171 0%, var(--danger) 100%);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.8rem;
}

th, td {
    padding: 0.85rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

td {
    font-size: 0.95rem;
    font-weight: 500;
}

.table-row-hover {
    transition: background-color 0.2s ease;
}

.table-row-hover:hover {
    background-color: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

/* Standings Highlight */
.standings-table tbody tr:nth-child(-n+2) td {
    background-color: var(--success-bg);
}
.standings-table tbody tr:nth-child(-n+2) td:first-child {
    border-left: 4px solid var(--success);
}
.standings-table tbody tr:nth-child(3) td:first-child {
    border-left: 4px solid var(--warning);
}

/* Text Colors */
.text-success { color: var(--success); text-shadow: 0 0 10px rgba(16,185,129,0.3); }
.text-danger { color: #f87171; text-shadow: 0 0 10px rgba(239,68,68,0.3); }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }

/* Match Inputs */
.match-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-inputs-row {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.3rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

input[type="number"] {
    width: 50px;
    padding: 0.6rem;
    border: none;
    background: transparent;
    color: var(--text-color);
    text-align: center;
    font-weight: 800;
    font-size: 1.3rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

input[type="number"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px var(--primary);
}

.score-separator {
    color: var(--text-muted);
    font-weight: 700;
    padding: 0 0.4rem;
}

/* Probabilities */
.probabilities {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.6rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.prob-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.prob-val {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-weight: 700;
    margin-top: 0.2rem;
    color: #cbd5e1;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Select */
select {
    width: 100%;
    padding: 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

/* Utilities */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-left: 4px solid var(--success);
    color: #d1fae5;
    font-weight: 500;
    backdrop-filter: blur(8px);
}
.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 4px solid var(--danger);
    color: #fee2e2;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
