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

:root {
    --bg-dark: #0f1016;
    --bg-panel: rgba(25, 27, 38, 0.6);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-red: #ff3333;
    --accent-blue: #00d4ff;
    --hard-tire: #ff4757;
    --medium-tire: #eccc68;
    --soft-tire: #2ed573;
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255, 51, 51, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 212, 255, 0.05), transparent 25%);
    background-attachment: fixed;
    min-height: 100vh;
}

h1, h2, h3, .brand {
    font-family: 'Outfit', sans-serif;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.brand h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(90deg, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand span {
    color: var(--accent-red);
    -webkit-text-fill-color: var(--accent-red);
}

/* Glass Panel */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
    border-color: rgba(255,255,255,0.15);
}

/* Highlights Grid */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.highlight-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.highlight-card h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.highlight-card .stat {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-blue);
}

.highlight-card .driver {
    font-size: 1rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

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

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

td.pos {
    font-weight: 800;
    color: var(--accent-red);
    width: 50px;
}

td.pts {
    font-weight: 700;
    color: var(--accent-blue);
    text-align: right;
}

/* Tire Rules */
.tire-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tire-hard { background: rgba(255, 71, 87, 0.15); color: var(--hard-tire); border: 1px solid rgba(255, 71, 87, 0.3); }
.tire-medium { background: rgba(236, 204, 104, 0.15); color: var(--medium-tire); border: 1px solid rgba(236, 204, 104, 0.3); }
.tire-free { background: rgba(46, 213, 115, 0.15); color: var(--soft-tire); border: 1px solid rgba(46, 213, 115, 0.3); }

/* Layout Grid */
.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 992px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* Next Race */
#next-race {
    text-align: center;
}
.countdown {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-red);
    margin: 1rem 0;
}

/* Admin Button */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-red), #b30000);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 51, 51, 0.4);
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Formamutató Pöttyök */
.form-dots {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}
.dot.green { background: #2ed573; }
.dot.yellow { background: #eccc68; }
.dot.gray { background: #747d8c; }
.dot.red { background: #ff4757; }
.dot.empty { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); box-shadow: none; }

/* Pilóta Név Link */
.driver-link {
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: underline;
    text-decoration-color: transparent;
}
.driver-link:hover {
    color: var(--accent-blue);
    text-decoration-color: var(--accent-blue);
}

/* Modal (Pókháló) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: var(--bg-panel);
    border: 1px solid var(--accent-red);
    border-radius: 16px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}
.modal-overlay.active .modal-content {
    transform: scale(1);
}
.modal-close {
    position: absolute;
    top: 15px; right: 20px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    background: transparent;
    border: none;
}
.modal-close:hover { color: var(--accent-red); }
.radar-container {
    margin-top: 1.5rem;
    height: 300px;
    display: flex;
    justify-content: center;
}
.driver-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}
.stat-box {
    background: rgba(0,0,0,0.3);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}
.stat-box .val {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-blue);
    margin-top: 0.5rem;
}
