/* MultiOyun — çocuk-eğlence teması: ejderha, alev, canlı renkler */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg1: #2b1055; --bg2: #7597de;
  --card: rgba(255,255,255,.12);
  --accent: #ffb703; --fire: #fb5607; --ok: #06d6a0; --bad: #ef476f;
}
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh; color: #fff;
  background: linear-gradient(160deg, var(--bg1) 0%, #4a2a8a 45%, var(--bg2) 100%) fixed;
  overflow-x: hidden;
}
.screen { display: none; max-width: 680px; margin: 0 auto; padding: 24px 16px 60px; }
.screen.active { display: block; animation: pop .3s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
.hidden { display: none !important; }

/* Bağış */
#donateBtn {
  position: fixed; top: 12px; right: 12px; z-index: 50;
  background: linear-gradient(135deg, #ff6b9d, #ef476f); color: #fff;
  border: none; border-radius: 999px; padding: 8px 16px; font-weight: 700;
  cursor: pointer; box-shadow: 0 4px 14px rgba(239,71,111,.5);
}
#donateBtn:hover { transform: scale(1.06); }

/* Ana ekran */
.hero { text-align: center; padding-top: 40px; }
.dragon-big { font-size: 110px; filter: drop-shadow(0 8px 24px rgba(255,105,0,.45)); }
.float { animation: float 3s ease-in-out infinite; display: inline-block; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-14px) } }
h1 { font-size: 52px; letter-spacing: 1px; margin: 8px 0 4px; }
.fire-text {
  background: linear-gradient(90deg, #ffb703, #fb5607, #ff006e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { font-size: 18px; opacity: .95; margin-bottom: 26px; }
.nick-box { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#nickInput {
  font-size: 20px; padding: 14px 18px; border-radius: 16px; border: 3px solid var(--accent);
  outline: none; width: 280px; text-align: center; background: rgba(255,255,255,.95); color: #333;
}
.btn-big {
  font-size: 20px; font-weight: 800; padding: 14px 28px; border: none; border-radius: 16px;
  background: linear-gradient(135deg, #ffb703, #fb8500); color: #4a2000; cursor: pointer;
  box-shadow: 0 6px 0 #b45309, 0 10px 24px rgba(0,0,0,.3); transition: transform .1s;
}
.btn-big:active { transform: translateY(4px); box-shadow: 0 2px 0 #b45309; }
.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1) } 50% { transform: scale(1.04) } }
.btn-link { background: none; border: none; color: #cdd7ff; font-size: 15px; cursor: pointer; text-decoration: underline; }
.err { color: #ffd166; min-height: 22px; margin-top: 10px; text-align: center; font-weight: 600; }
.welcome { margin-top: 14px; font-size: 17px; background: var(--card); display: inline-block; padding: 10px 20px; border-radius: 14px; }

.board-card { margin: 36px auto 0; max-width: 380px; background: var(--card); border-radius: 20px; padding: 18px 24px; backdrop-filter: blur(6px); }
.board-card h3 { text-align: center; margin-bottom: 10px; }
.board-card ol { padding-left: 24px; }
.board-card li { padding: 3px 0; font-size: 15px; }

/* Seçim ekranı */
.setup-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.badge { background: var(--card); padding: 8px 16px; border-radius: 999px; font-weight: 700; }
#screen-setup h2 { font-size: 20px; margin: 22px 0 10px; }
.hint { font-size: 13px; font-weight: 400; opacity: .8; }
.cards { display: flex; gap: 12px; flex-wrap: wrap; }
.card {
  background: var(--card); border-radius: 18px; padding: 16px 18px; text-align: center;
  min-width: 130px; font-size: 30px; border: 3px solid transparent; backdrop-filter: blur(4px);
}
.card b { display: block; font-size: 16px; margin-top: 6px; }
.card small { display: block; font-size: 12px; opacity: .75; margin-top: 2px; }
.card.selectable { cursor: pointer; }
.card.selectable:hover { transform: translateY(-3px); }
.card.selected { border-color: var(--accent); background: rgba(255,183,3,.18); box-shadow: 0 0 18px rgba(255,183,3,.35); }
.card.disabled { opacity: .45; }
.league-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.league-btn {
  padding: 12px 4px; border-radius: 14px; border: 3px solid transparent; cursor: pointer;
  background: var(--card); color: #fff; font-size: 16px; font-weight: 800; text-align: center;
}
.league-btn small { display: block; font-size: 10px; font-weight: 400; opacity: .7; }
.league-btn.selected { border-color: var(--ok); background: rgba(6,214,160,.2); box-shadow: 0 0 14px rgba(6,214,160,.4); }
.scope-row { margin-bottom: 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--card); border: 2px solid transparent; color: #fff; border-radius: 999px;
  padding: 8px 16px; font-size: 14px; cursor: pointer;
}
.chip-big { font-size: 16px; font-weight: 700; padding: 12px 22px; }
.chip.selected { border-color: var(--fire); background: rgba(251,86,7,.25); }
.chip-off { opacity: .45; cursor: default; }
#playBtn { display: block; margin: 30px auto 0; }

/* Oyun ekranı */
.scorebar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fighter { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 999px; padding: 8px 16px; font-weight: 700; }
.fighter b { font-size: 22px; color: var(--accent); }
.avatar { font-size: 26px; }
.qcount { font-weight: 800; opacity: .9; }
.timerbar { height: 14px; background: rgba(255,255,255,.15); border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
#timerFill { height: 100%; width: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ok), var(--accent), var(--fire)); transition: width .2s linear; }
.streak { text-align: center; font-size: 22px; font-weight: 900; color: var(--accent); animation: pulse .6s infinite; margin-bottom: 8px; }
.joker-bar { display: flex; gap: 10px; justify-content: center; align-items: center; margin-bottom: 12px; }
.joker {
  background: linear-gradient(135deg, #9b5de5, #6a3fc9); color: #fff; border: none;
  border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 3px 0 #4a2a8a;
}
.joker small { opacity: .8; font-weight: 400; margin-left: 4px; }
.joker:disabled { opacity: .4; cursor: default; box-shadow: none; }
.joker:not(:disabled):hover { transform: scale(1.05); }
.xp-badge { background: var(--card); border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 14px; }
.room-row { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.room-or { opacity: .7; font-size: 14px; }
.btn-small { font-size: 16px; padding: 10px 18px; }
#roomCodeInput {
  font-size: 20px; padding: 10px 14px; border-radius: 12px; border: 3px solid var(--accent);
  width: 130px; text-align: center; letter-spacing: 3px; background: rgba(255,255,255,.95); color: #333;
}
.opp-panel { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }
.opp { background: var(--card); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.opp b { color: var(--accent); margin-left: 4px; }
.opp.gone { opacity: .4; text-decoration: line-through; }
.choice.eliminated { visibility: hidden; }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.shake { animation: shake .45s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); } 40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); } 80% { transform: translateX(4px); }
}
/* Beyaz kâğıt: soru + kalem alanı bir arada, HEP açık */
.paper {
  position: relative; background: #fffefb; color: #1d1d35; border-radius: 22px;
  height: 350px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
#paper-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  touch-action: none; cursor: crosshair; z-index: 1;
}
#qText {
  position: relative; z-index: 2; pointer-events: none;
  font-size: 28px; font-weight: 800; text-align: center; padding: 22px 18px 8px;
}
#paperClear {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  border: none; background: #eee7d8; border-radius: 50%; width: 44px; height: 44px;
  font-size: 20px; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
#paperClear:hover { background: #ffd166; }
.paper-hint {
  position: absolute; left: 12px; bottom: 12px; z-index: 0;
  font-size: 12px; color: #b9b2a0;
}
/* İpucu jokeri: kâğıda yapışan sarı not */
.hint-note {
  position: absolute; left: 14px; bottom: 46px; z-index: 3; max-width: 62%;
  background: #fff3b0; color: #5c4a00; border-radius: 4px 14px 4px 14px;
  padding: 12px 16px; font-size: 15px; line-height: 1.45; font-weight: 600;
  transform: rotate(-2deg); box-shadow: 3px 4px 12px rgba(0,0,0,.25);
  border-left: 5px solid #ffb703;
}
.hint-note::before { content: '💡 '; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.choice {
  font-size: 24px; font-weight: 800; padding: 20px 10px; border-radius: 18px; border: none; cursor: pointer;
  color: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.3); transition: transform .08s;
}
.choice:nth-child(1) { background: #ef476f; } .choice:nth-child(2) { background: #118ab2; }
.choice:nth-child(3) { background: #06a077; } .choice:nth-child(4) { background: #9b5de5; }
.choice:active { transform: translateY(4px); box-shadow: none; }
.choice.correct { background: var(--ok) !important; animation: pulse .4s 2; }
.choice.wrong { background: #555 !important; opacity: .7; }
.choice:disabled { cursor: default; }
.robo-status { text-align: center; margin-top: 16px; opacity: .85; font-size: 15px; min-height: 24px; }
.scratch-row { text-align: center; margin-top: 8px; display: flex; gap: 18px; justify-content: center; }
#scratch {
  display: block; width: 100%; height: 230px; margin-top: 8px;
  background: repeating-linear-gradient(#fffdf2, #fffdf2 27px, #e8e2c8 28px);
  border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.3);
  touch-action: none; cursor: crosshair;
}
.dots::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: '' } 25% { content: '.' } 50% { content: '..' } 75% { content: '...' } }

/* Sonuç */
.result-card { text-align: center; padding-top: 50px; position: relative; z-index: 2; }
.result-emoji { font-size: 100px; animation: float 2s ease-in-out infinite; }
.final-score { display: flex; justify-content: center; align-items: center; gap: 22px; font-size: 34px; font-weight: 900; margin: 18px 0; }
.vs { font-size: 18px; opacity: .7; }
.xp-earn { font-size: 30px; font-weight: 900; color: var(--accent); margin: 16px 0 26px; animation: pulse 1s infinite; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
/* Maç sonu: bilemediklerinin çözümlü listesi */
.review-box { max-width: 560px; margin: 0 auto 22px; text-align: left; }
.review-box h3 { text-align: center; margin-bottom: 12px; }
.review-item {
  background: rgba(255,255,255,.94); color: #1d1d35; border-radius: 14px;
  padding: 12px 16px; margin-bottom: 10px; font-size: 15px;
}
.review-q { font-weight: 800; margin-bottom: 6px; }
.review-a { margin-bottom: 6px; }
.review-a b { color: #067a5b; }
.review-h {
  background: #fff3b0; color: #5c4a00; border-radius: 8px; padding: 8px 12px;
  font-size: 14px; border-left: 4px solid #ffb703;
}
#againBtn { margin-bottom: 12px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-box { background: #fff; color: #333; border-radius: 22px; padding: 30px; max-width: 380px; text-align: center; }
.modal-box h3 { margin-bottom: 12px; } .modal-box p { margin-bottom: 20px; line-height: 1.5; }

/* Kesir gösterimi: pay üstte, kesir çizgisi, payda altta */
.frac {
  display: inline-flex; flex-direction: column; vertical-align: middle;
  text-align: center; margin: 0 4px; line-height: 1.15; font-size: .85em;
}
.frac .top { border-bottom: 3px solid currentColor; padding: 0 7px 1px; }
.frac .bot { padding: 1px 7px 0; }

/* SEO içerik bölümleri (ana sayfa) */
.info-section { margin: 44px auto 0; max-width: 640px; }
.info-section h2 { text-align: center; font-size: 26px; margin-bottom: 18px; }
.steps, .features { display: grid; gap: 14px; }
.steps { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.features { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.step, .feature {
  background: var(--card); border-radius: 18px; padding: 18px; text-align: center;
  backdrop-filter: blur(4px);
}
.step span, .feature { font-size: 30px; }
.step b, .feature b { display: block; font-size: 16px; margin: 8px 0 6px; }
.step p, .feature p { font-size: 13.5px; opacity: .88; line-height: 1.45; }
.info-section details {
  background: var(--card); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px;
}
.info-section summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.info-section details p { margin-top: 10px; font-size: 14px; opacity: .9; line-height: 1.5; }
.site-footer { text-align: center; margin-top: 50px; opacity: .75; font-size: 13.5px; line-height: 1.8; }
.site-footer a { color: #ffd166; }

@media (max-width: 480px) {
  h1 { font-size: 40px; } .dragon-big { font-size: 84px; }
  .qcard { font-size: 24px; } .choice { font-size: 20px; }
}
