/* ═══════════════════════════════════════════════════════════════
   style.css — Arnari Fotografie GameZone Quiz
   Aangepast naar de groene brand-colors van het logo
═══════════════════════════════════════════════════════════════ */

/* ── RESET & ROOT ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #050f08; /* Donkerder groen-zwart voor de basis */
  --bg2:     #0a1f11; /* Iets lichter groen-zwart voor verloop */
  --purple:  #22c55e; /* HET HOOFDGROEN */
  --purpleg: #4ade80; /* LICHTGROEN voor highlights */
  --gold:    #f0a500; /* Goud/oranje range behouden */
  --orange:  #ff6b35; 
  --green:   #22c55e; 
  --red:     #ef4444; 
  --blue:    #3b82f6; 
  --text:    #e8f7ee; /* Tekstkleur met een lichte groene gloed */
  --textm:   #8bca9b; /* Gedempte tekstkleur */
  --card:    #0f2617; /* Kaart achtergrond */
  --card2:   #14331f; /* Iets lichtere kaart achtergrond */
  --border:  #1b4d2c; /* Randen */
  --border2: #22c55e; /* Actieve randen */
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Groene achtergrond gradiënt */
body::before {
  content: ''; position: fixed; inset: 0;
  background: radial-gradient(circle at 80% 20%, var(--bg2) 0%, var(--bg) 70%);
  z-index: -1;
}

.main-container { max-width: 680px; margin: 0 auto; padding: 0 16px 60px; position: relative; z-index: 1; }

/* ── HEADER & DIVIDER ── */
.logo-area { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; max-width: 680px; margin: 0 auto; }
.logo-main { font-family: 'Bungee', cursive; font-size: 20px; color: #fff; letter-spacing: .5px; }
.logo-sub { font-size: 13px; color: var(--textm); font-weight: 400; margin-left: 5px; text-transform: uppercase; letter-spacing: 1px; }
.logo-gz { font-family: 'Bungee Shade', sans-serif; font-size: 18px; color: var(--gold); margin-left: auto; padding-right: 14px; }
.logo-controls { display: flex; gap: 8px; }

.icon-btn { background: var(--card2); border: 1px solid var(--border); width: 38px; height: 38px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all .2s; text-decoration: none; }
.icon-btn:hover { border-color: var(--purpleg); background: var(--border); transform: scale(1.05); }

.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin-bottom: 24px; }

/* ── SCREENS ── */
.screen { display: none; animation: fadeIn .3s ease-out forwards; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ── CARDS ── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 22px 20px; box-shadow: 0 8px 32px rgba(0,0,0,0.4); margin-bottom: 16px; position: relative; overflow: hidden; }
.card::after { content:''; position:absolute; top:0; left:0; width:4px; height:100%; background:var(--purple); }
.section-label { font-family: 'Bungee', cursive; font-size: 12px; color: var(--purpleg); letter-spacing: .5px; margin-bottom: 14px; text-transform: uppercase; }

/* ── FORMS ── */
.tabs { display: flex; background: var(--card2); border: 1px solid var(--border); padding: 4px; border-radius: 12px; margin-bottom: 16px; }
.tab-btn { flex: 1; background: transparent; border: none; border-radius: 9px; padding: 10px; font-family: 'Bungee', cursive; font-size: 13px; color: var(--textm); cursor: pointer; transition: all .2s; }
.tab-btn.active { background: var(--purple); color: #fff; box-shadow: 0 4px 12px rgba(34,197,94,0.3); }

.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; color: var(--textm); }
.form-input { width: 100%; background: var(--card2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; color: var(--text); font-family: 'Nunito', sans-serif; font-size: 14px; outline: none; transition: all .2s; }
.form-input:focus { border-color: var(--purpleg); box-shadow: 0 0 0 3px rgba(74,222,128,0.15); }

/* ── BUTTONS ── */
.btn { width: 100%; border: none; border-radius: 12px; padding: 12px; font-family: 'Bungee', cursive; font-size: 14px; letter-spacing: .5px; cursor: pointer; transition: all .2s; display: flex; align-items: center; justify-content: center; gap: 8px; position: relative; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.btn-gold { background: linear-gradient(135deg, var(--gold), #cc8400); box-shadow: 0 4px 14px rgba(240,165,0,0.3); }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(240,165,0,0.45); }

/* Zorgt dat javascript de knop kan besturen en dat hij groen is! */
.btn-purple, .btn-green { background: linear-gradient(135deg, var(--purple), #16a34a) !important; box-shadow: 0 4px 14px rgba(34,197,94,0.3) !important; }
.btn-purple:hover, .btn-green:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(34,197,94,0.45); }

.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--textm); font-family: 'Nunito', sans-serif; font-weight: 700; }
.btn-ghost:hover { background: var(--card2); color: var(--text); }
.btn:active { transform: translateY(1px); }

/* ── RADIO OPTIONS (SETTINGS) ── */
.radio-group { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.radio-btn { background: var(--card2); border: 1px solid var(--border); border-radius: 9px; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--textm); cursor: pointer; transition: all .15s; }
.radio-btn:hover { border-color: var(--purple); color: var(--text); }
.radio-btn.active { background: rgba(34,197,94,0.12); border-color: var(--purpleg); color: #fff; font-weight: 700; }

/* ── DASHBOARD WELCOME ── */
.welcome-box { background: linear-gradient(135deg, var(--card2), var(--card)); border: 1px solid var(--border); border-radius: 18px; padding: 16px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 15px; }
.user-stats { display: flex; gap: 14px; font-size: 13px; }
.gold { color: var(--gold); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── LEADERBOARDS ── */
.leaderboard-list { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.lb-item { display: flex; align-items: center; justify-content: space-between; background: var(--card2); border: 1px solid var(--border); padding: 8px 12px; border-radius: 10px; }
.lb-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.lb-pts { font-family: 'Bungee', cursive; color: var(--gold); font-size: 12px; }
.lb-item.me { border-color: var(--purpleg); background: rgba(34,197,94,0.08); }

/* ── QUIZ PLAY SCREEN ── */
.quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--textm); }
.q-curr { font-family: 'Bungee', cursive; font-size: 18px; color: #fff; }
.q-tot { font-size: 13px; }
.q-badge { background: var(--card2); border: 1px solid var(--border); padding: 3px 9px; border-radius: 20px; font-size: 10px; color: var(--text); }
.progress-container { width: 100%; height: 6px; background: var(--card2); border-radius: 99px; overflow: hidden; margin-bottom: 14px; border: 1px solid var(--border); }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--purple), var(--purpleg)); border-radius: 99px; transition: width .3s ease-out; }

/* NIEUWE TIMER CIRKEL */
.timer-circle { width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--purple); display: flex; align-items: center; justify-content: center; font-family: 'Bungee', cursive; font-size: 18px; color: #fff; background: var(--card); box-shadow: 0 0 12px rgba(34,197,94,0.25); transition: border-color 0.2s, cubic-bezier(0.175, 0.885, 0.32, 1.275) transform; }
.timer-circle.warning { border-color: var(--orange); color: var(--orange); box-shadow: 0 0 12px rgba(255,107,53,0.3); transform: scale(1.08); }
.timer-circle.critical { border-color: var(--red); color: var(--red); box-shadow: 0 0 16px rgba(239,68,68,0.5); transform: scale(1.15); animation: pulse 0.5s infinite alternate; }
@keyframes pulse { from { transform: scale(1.1); } to { transform: scale(1.2); } }

.question-card { padding: 24px 20px; text-align: center; margin-bottom: 14px; }
.question-card::after { display: none; }
.q-icon { font-size: 32px; margin-bottom: 8px; display: block; }
.q-text { font-size: 17px; font-weight: 700; line-height: 1.4; color: #fff; }

/* OPTIONS GRID & BUTTONS */
.options-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.opt-btn { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: all .15s; font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 600; color: var(--text); text-align: left; width: 100%; outline: none; }
.opt-btn:hover:not(:disabled) { border-color: var(--purpleg); background: var(--card2); transform: translateX(2px); }
.opt-prefix { background: var(--card2); border: 1px solid var(--border); width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--textm); flex-shrink: 0; }
.opt-btn:hover:not(:disabled) .opt-prefix { background: var(--purple); color: #fff; border-color: var(--purpleg); }

/* FEEDBACK MECHANICS */
.opt-btn.correct { background: rgba(34,197,110,0.1) !important; border-color: var(--green) !important; color: #fff; font-weight: 700; box-shadow: 0 0 12px rgba(34,197,94,0.15); }
.opt-btn.correct .opt-prefix { background: var(--green) !important; color: #fff !important; border-color: var(--green) !important; }
.opt-btn.wrong { background: rgba(239,68,68,0.08) !important; border-color: var(--red) !important; color: var(--textm); opacity: 0.8; }
.opt-btn.wrong .opt-prefix { background: var(--red) !important; color: #fff !important; border-color: var(--red) !important; }

.feedback-card::after { background: var(--gold); }
.fb-status { font-family: 'Bungee', cursive; font-size: 16px; margin-bottom: 4px; }
.fb-status.good { color: var(--green); }
.fb-status.bad { color: var(--orange); }
.fb-text { font-size: 13px; color: var(--textm); line-height: 1.4; }

/* ── RESULTS SCREEN ── */
.medal { font-size: 54px; display: block; margin-bottom: 4px; animation: bounce 1s infinite alternate; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-6px); } }
.result-title { font-family: 'Bungee', cursive; font-size: 24px; color: var(--gold); }
.result-sub { font-size: 14px; color: var(--textm); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }

.score-circle { width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, var(--card2) 0%, var(--card) 100%); border: 4px solid var(--purple); margin: 0 auto 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.score-pct { font-family: 'Bungee', cursive; font-size: 22px; color: #fff; line-height: 1; }
.score-pct-lbl { font-size: 10px; text-transform: uppercase; color: var(--textm); letter-spacing: .5px; margin-top: 2px; }

.result-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 12px 0; margin-bottom: 18px; }
.rs { padding: 12px 8px; text-align: center; }
.rs-val { display: block; font-family: 'Bungee', cursive; font-size: 22px; }
.rs-val.green { color: var(--green); }
.rs-val.red   { color: var(--red); }
.rs-val.gold  { color: var(--gold); }
.rs-lbl { font-size: 11px; color: var(--textm); text-transform: uppercase; letter-spacing: .5px; }

.rank-box { background: linear-gradient(135deg, var(--card2), #07140b); border: 1px solid var(--border); border-radius: 13px; padding: 14px; margin-bottom: 18px; }
.rank-label { font-family: 'Bungee', cursive; font-size: 11px; color: var(--purpleg); letter-spacing: 1px; margin-bottom: 4px; }
.rank-name  { font-family: 'Bungee', cursive; font-size: 20px; color: var(--gold); }

.cr-item { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 13px; }
.cr-name { flex: 1; font-weight: 700; }
.cr-bar-wrap { width: 80px; height: 6px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.cr-bar  { height: 100%; border-radius: 99px; background: var(--purple); }
.cr-pct  { font-size: 11px; font-weight: 700; color: var(--textm); width: 32px; text-align: right; }

/* ── MISC UTILS ── */
.error-msg { background: rgba(239,68,68,0.1); border: 1px solid var(--red); color: #fca5a5; font-size: 13px; font-weight: 600; padding: 10px; border-radius: 10px; margin-bottom: 14px; text-align: center; }
.hidden { display: none !important; }
.loading { text-align: center; color: var(--textm); font-size: 13px; padding: 14px; }

/* SPINNER */
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; margin-left: 4px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* CONFETTI OVERLAY */
#confetti-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 999; display: none; }

.footer { text-align: center; font-size: 11px; color: var(--textm); padding: 40px 16px 20px; opacity: 0.6; }