/* ===== F1 VOORSPEL GAME — PUBLIEKE STYLESHEET ===== */
/* Kleuren/lettertype worden overschreven door inline <style> uit instellingen (CSS variabelen) */
:root {
    --f1-red:     #e10600;
    --f1-dark:    #1a1a2e;
    --f1-bg:      #f5f5f5;
    --f1-card:    #ffffff;
    --f1-text:    #1a1a2e;
    --f1-muted:   #6c757d;
    --f1-gold:    #ffd700;
    --f1-green:   #28a745;
    --f1-border:  #e0e0e0;
    --radius:     8px;
    --f1-font:    -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --shadow:     0 2px 12px rgba(0,0,0,0.08);
}

.f1vg-wrap * { box-sizing: border-box; }
.f1vg-wrap { font-family: var(--f1-font); color: var(--f1-text); max-width: 1100px; margin: 0 auto; }

.f1vg-header { background: var(--f1-dark); color: white; padding: 16px 24px; border-radius: var(--radius) var(--radius) 0 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.f1vg-header-logo { font-size: 1.3em; font-weight: 700; letter-spacing: -0.5px; display: flex; align-items: center; gap: 10px; }
.f1vg-logo-img { max-height: 36px; }
.f1vg-header-stats { display: flex; gap: 24px; }
.f1vg-header-stat { text-align: center; }
.f1vg-header-stat-value { display: block; font-size: 1.3em; font-weight: 700; color: var(--f1-gold); line-height: 1; }
.f1vg-header-stat-label { display: block; font-size: 0.75em; color: #c0c0c0; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.05em; }

.f1vg-tabs { display: flex; background: var(--f1-dark); border-bottom: 3px solid var(--f1-red); overflow-x: auto; }
.f1vg-tab { background: none; border: none; color: #c0c0c0; padding: 14px 20px; cursor: pointer; font-size: 0.9em; font-weight: 600; white-space: nowrap; transition: all 0.2s; }
.f1vg-tab:hover { color: white; background: rgba(255,255,255,0.05); }
.f1vg-tab.active { color: white; background: var(--f1-red); }

.f1vg-tab-content { display: none; background: var(--f1-bg); padding: 24px; }
.f1vg-tab-content.active { display: block; }

.f1vg-section { background: var(--f1-card); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow); }
.f1vg-section-muted { opacity: 0.6; }
.f1vg-section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.f1vg-section-header h2 { margin: 0; font-size: 1.15em; }
.f1vg-race-badge { background: var(--f1-dark); color: white; padding: 4px 12px; border-radius: 20px; font-size: 0.8em; font-weight: 600; }
.f1vg-budget-badge { background: #e8f5e9; color: #2e7d32; padding: 4px 12px; border-radius: 20px; font-size: 0.85em; }

.f1vg-hint { color: var(--f1-muted); font-size: 0.9em; margin: 0 0 12px; }

.f1vg-input { width: 100%; padding: 10px 14px; border: 2px solid var(--f1-border); border-radius: var(--radius); font-size: 1em; }
.f1vg-input:focus { outline: none; border-color: var(--f1-red); }
.f1vg-input-row { display: flex; gap: 10px; }
.f1vg-input-row .f1vg-input { flex: 1; }
.f1vg-select { width: 100%; padding: 10px 14px; border: 2px solid var(--f1-border); border-radius: var(--radius); font-size: 0.95em; background: white; margin-bottom: 14px; }
.f1vg-select:focus { outline: none; border-color: var(--f1-red); }

.f1vg-btn { padding: 10px 20px; border: none; border-radius: var(--radius); font-size: 0.95em; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: var(--f1-font); }
.f1vg-btn-primary { background: var(--f1-red); color: white; }
.f1vg-btn-primary:hover { filter: brightness(0.9); }
.f1vg-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.f1vg-btn-secondary { background: var(--f1-dark); color: white; }
.f1vg-btn-full { width: 100%; margin-top: 16px; padding: 14px; font-size: 1em; }

.f1vg-saved-notice { margin-top: 10px; padding: 10px 14px; background: #e8f5e9; border-radius: var(--radius); color: #2e7d32; font-size: 0.9em; }
.f1vg-msg { padding: 10px 14px; border-radius: var(--radius); margin-top: 10px; font-size: 0.9em; }
.f1vg-msg.success { background: #e8f5e9; color: #2e7d32; }
.f1vg-msg.error   { background: #ffebee; color: #c62828; }

.f1vg-pole-form { max-width: 400px; }
.f1vg-pole-form label { display: block; font-weight: 600; margin-bottom: 8px; }

.f1vg-pred-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.f1vg-pred-col h3 { margin: 0 0 12px; font-size: 1em; }
.f1vg-search-input { margin-bottom: 10px; }
.f1vg-driver-pool { max-height: 400px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; }
.f1vg-driver-chip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #f8f9fa; border: 2px solid var(--f1-border); border-radius: 6px; cursor: pointer; }
.f1vg-driver-chip:hover { border-color: var(--f1-red); }
.f1vg-driver-chip.f1vg-driver-used { opacity: 0.4; cursor: not-allowed; }
.f1vg-chip-abbr { font-weight: 800; font-size: 0.85em; min-width: 32px; color: var(--f1-red); }
.f1vg-chip-name { flex: 1; font-size: 0.9em; }
.f1vg-chip-team { font-size: 0.75em; color: var(--f1-muted); }

.f1vg-top10 { display: flex; flex-direction: column; gap: 6px; }
.f1vg-top10-slot { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #f8f9fa; border: 2px dashed var(--f1-border); border-radius: 6px; min-height: 46px; }
.f1vg-top10-slot.filled { background: white; border-style: solid; border-color: var(--f1-dark); }
.f1vg-pos-num { font-weight: 800; font-size: 0.85em; min-width: 28px; color: var(--f1-red); }
.f1vg-pos-driver { flex: 1; font-size: 0.9em; color: var(--f1-muted); display: flex; align-items: center; gap: 6px; }
.f1vg-top10-slot.filled .f1vg-pos-driver { color: var(--f1-text); }
.f1vg-remove-driver { background: none; border: none; color: var(--f1-muted); cursor: pointer; font-size: 1em; margin-left: auto; }
.f1vg-remove-driver:hover { color: var(--f1-red); }
.f1vg-earned-pts { display: inline-block; background: var(--f1-gold); color: #333; padding: 1px 7px; border-radius: 10px; font-size: 0.78em; font-weight: 700; }

.f1vg-current-team { margin-bottom: 20px; }
.f1vg-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 12px; }
.f1vg-team-slot { background: #f8f9fa; border: 2px solid var(--f1-border); border-radius: var(--radius); padding: 14px; }
.f1vg-slot-label { font-size: 0.78em; font-weight: 700; text-transform: uppercase; color: var(--f1-muted); margin-bottom: 6px; }
.f1vg-slot-filled strong { display: block; font-size: 0.95em; margin-bottom: 2px; }
.f1vg-slot-filled span { display: block; font-size: 0.8em; color: var(--f1-muted); }
.f1vg-slot-empty { color: var(--f1-muted); font-style: italic; font-size: 0.9em; }

.f1vg-team-builder { background: var(--f1-bg); }
.f1vg-builder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.f1vg-field-label { display: block; font-weight: 600; font-size: 0.88em; margin-bottom: 6px; }

.f1vg-budget-summary { background: var(--f1-dark); color: white; border-radius: var(--radius); padding: 16px 20px; margin-top: 16px; }
.f1vg-budget-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 0.9em; }
.f1vg-budget-remaining { border-top: 1px solid rgba(255,255,255,0.2); margin-top: 8px; padding-top: 8px; font-weight: 700; font-size: 1em; }

.f1vg-market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 12px; }
.f1vg-market-card { background: white; border: 2px solid var(--f1-border); border-radius: var(--radius); padding: 14px; text-align: center; }
.f1vg-market-abbr { font-size: 1.4em; font-weight: 800; color: var(--f1-red); letter-spacing: 1px; }
.f1vg-market-name { font-size: 0.82em; font-weight: 600; margin: 4px 0 2px; }
.f1vg-market-team { font-size: 0.75em; color: var(--f1-muted); margin-bottom: 8px; }
.f1vg-market-price { font-size: 1em; font-weight: 700; }
.f1vg-market-change { font-size: 0.82em; font-weight: 600; margin-top: 4px; }
.f1vg-market-change.positive { color: var(--f1-green); }
.f1vg-market-change.negative { color: var(--f1-red); }

.f1vg-history-table { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.f1vg-history-table th { background: var(--f1-dark); color: white; padding: 10px 12px; text-align: left; }
.f1vg-history-table td { padding: 10px 12px; border-bottom: 1px solid var(--f1-border); }
.f1vg-money-earned { color: var(--f1-green); font-weight: 600; }

.f1vg-current-user-row td { background: #fff8dc !important; font-weight: 600; }
.f1vg-you-badge { display: inline-block; background: var(--f1-red); color: white; padding: 1px 7px; border-radius: 10px; font-size: 0.75em; }

.f1vg-upcoming-races h2 { margin-bottom: 14px; }
.f1vg-race-card { display: flex; align-items: center; gap: 16px; background: white; border: 2px solid var(--f1-border); border-left: 4px solid var(--f1-red); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.f1vg-race-info { flex: 1; }
.f1vg-race-info strong { display: block; }
.f1vg-race-info span { font-size: 0.82em; color: var(--f1-muted); }
.f1vg-race-date { font-weight: 700; font-size: 0.9em; }

.f1vg-toast { position: fixed; bottom: 24px; right: 24px; background: var(--f1-dark); color: white; padding: 14px 20px; border-radius: var(--radius); box-shadow: 0 4px 20px rgba(0,0,0,0.3); z-index: 9999; font-size: 0.95em; max-width: 300px; }
.f1vg-toast.success { border-left: 4px solid var(--f1-green); }
.f1vg-toast.error   { border-left: 4px solid var(--f1-red); }

.f1vg-login-notice { background: var(--f1-dark); color: white; padding: 30px; border-radius: var(--radius); text-align: center; }
.f1vg-login-notice a { color: var(--f1-gold); font-weight: 700; }

@media (max-width: 700px) {
    .f1vg-tab-content { padding: 16px; }
    .f1vg-pred-columns, .f1vg-builder-grid { grid-template-columns: 1fr; }
    .f1vg-team-grid { grid-template-columns: 1fr 1fr; }
}
