:root {
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --ink: #17324d;
  --muted: #5c7088;
  --accent: #ff7a59;
  --accent-2: #19b7a6;
  --accent-3: #ffcb47;
  --accent-4: #6a7cff;
  --success: #0ea66f;
  --danger: #d74d63;
  --shadow: 0 22px 50px rgba(30, 53, 84, 0.14);
  --radius: 28px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 203, 71, 0.35), transparent 24%),
    radial-gradient(circle at top right, rgba(106, 124, 255, 0.24), transparent 22%),
    linear-gradient(135deg, #fff4d9 0%, #ffd9c8 45%, #dff9f2 100%);
}

body { overflow: hidden; }
body.is-adventure { padding-top: 80px; overflow: auto; }
button, input { font: inherit; }

.app-shell { min-height: 100vh; padding: 18px 20px 20px; }
.topbar, .nav-pills, .source-note, .slide, .spark-card, .hero-card, .concept-card, .quote-card, .org-card, .match-board, .tf-card, .quiz-card, .score-panel, .crossword-shell { backdrop-filter: blur(12px); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.eyebrow, .tag, .section-note, .source-note, .progress-meta span, .org-hint { color: var(--muted); }
.eyebrow, .tag { margin: 0 0 4px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; }
h1, h2, h3 { margin: 0; font-family: "Fredoka", sans-serif; }
h1 { font-size: clamp(1.9rem, 3vw, 2.7rem); }
h2 { font-size: clamp(1.6rem, 2.2vw, 2.2rem); }

.progress-box { min-width: min(320px, 100%); padding: 14px 16px; background: rgba(255, 255, 255, 0.7); border-radius: 22px; box-shadow: var(--shadow); }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.95rem; }
.progress-track { width: 100%; height: 12px; background: rgba(23, 50, 77, 0.08); border-radius: 999px; overflow: hidden; }
.progress-fill { width: 12.5%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2)); transition: width 0.35s ease; }

.nav-pills { display: flex; gap: 10px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; }
.nav-pill, .choice-btn, .next-btn, .check-btn, .match-item, .tf-btn, .option-btn, .org-card, .crossword-check { border: 0; cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease; }
.nav-pill { flex: 0 0 auto; padding: 12px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.72); color: var(--ink); font-weight: 800; }
.nav-pill.active { background: linear-gradient(135deg, var(--accent-4), var(--accent)); color: white; box-shadow: 0 14px 30px rgba(106, 124, 255, 0.24); }
.nav-pill[data-done="true"]:not(.active)::after { content: " ✓"; color: var(--success); font-size: 0.85em; }
.nav-pill[data-done="true"].active::after { content: " ✓"; color: rgba(255,255,255,0.9); font-size: 0.85em; }

.slider-wrap { position: relative; height: calc(100vh - 230px); overflow: hidden; }
.slides { display: flex; width: 800%; height: 100%; transition: transform 0.45s ease; }
.slide { width: 12.5%; height: 100%; padding: 24px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow-y: auto; }

.hero-grid, .section-head, .section-actions, .match-board, .match-column, .tf-actions, .options, .quiz-headline, .org-modal-grid { display: flex; }
.hero-grid { height: 100%; align-items: stretch; gap: 22px; }
.hero-card, .spark-card { background: rgba(255, 255, 255, 0.78); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.hero-card { flex: 1.45; display: flex; flex-direction: column; justify-content: center; background: radial-gradient(circle at 85% 15%, rgba(255, 203, 71, 0.35), transparent 20%), rgba(255, 255, 255, 0.85); position: relative; overflow: hidden; }
.hero-image-wrapper { width: 100%; height: 280px; margin-bottom: 20px; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.08); background: #fdfdfd; }
.hero-main-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; }
.hero-card:hover .hero-main-img { transform: scale(1.05); }
.hero-card h2 { font-size: clamp(2rem, 4vw, 3.4rem); margin-bottom: 16px; position: relative; z-index: 1; }
.hero-card p { max-width: 720px; font-size: 1.1rem; line-height: 1.6; position: relative; z-index: 1; }
.spark-card { flex: 0.8; align-self: center; background: linear-gradient(180deg, rgba(25, 183, 166, 0.12), rgba(106, 124, 255, 0.12)); }
.spark-list { padding-left: 18px; line-height: 1.8; }
.hook-actions, .section-actions, .tf-actions, .options { gap: 12px; flex-wrap: wrap; }

.choice-btn, .next-btn, .check-btn, .tf-btn, .option-btn, .crossword-check { padding: 12px 18px; border-radius: 16px; font-weight: 800; box-shadow: 0 10px 20px rgba(23, 50, 77, 0.08); }
.choice-btn, .check-btn, .tf-btn, .option-btn, .crossword-check { background: var(--surface-strong); color: var(--ink); }
.next-btn { background: linear-gradient(135deg, var(--accent), #ff9b62); color: white; }
.choice-btn:hover, .next-btn:hover, .check-btn:hover, .match-item:hover, .tf-btn:hover, .option-btn:hover, .nav-pill:hover, .concept-card:hover, .org-card:hover, .crossword-check:hover { transform: translateY(-2px); }

.feedback-panel, .match-feedback, .score-panel { margin-top: 18px; padding: 14px 16px; border-radius: 18px; background: rgba(25, 183, 166, 0.12); font-weight: 700; }
.match-controls { margin-top: 10px; }
.section-head { align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 24px; }
.policy-hero { flex: 1; display: flex; justify-content: center; }
.policy-img { max-height: 140px; border-radius: 100px; box-shadow: 0 8px 24px rgba(106, 124, 255, 0.15); border: 4px solid white; transition: transform 0.4s ease; }
.policy-img:hover { transform: rotate(3deg) scale(1.05); }

.concept-grid, .policy-grid, .org-grid, .tf-grid { display: grid; gap: 18px; }
.concept-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.concept-card { text-align: left; min-height: 158px; padding: 22px; border: 0; border-radius: 24px; background: rgba(255, 255, 255, 0.88); box-shadow: var(--shadow); }
.concept-title { display: block; font-family: "Fredoka", sans-serif; font-size: 1.25rem; margin-bottom: 10px; }
.concept-body { display: block; opacity: 0; max-height: 0; overflow: hidden; transition: max-height 0.25s ease, opacity 0.25s ease; line-height: 1.55; }
.concept-card.open .concept-body { opacity: 1; max-height: 160px; }

/* Kavram kartı renkleri */
.concept-card:nth-child(1) { background: linear-gradient(160deg, rgba(255,203,71,0.22), rgba(255,255,255,0.92)); }
.concept-card:nth-child(1) .concept-title { color: #9a6b00; }
.concept-card:nth-child(2) { background: linear-gradient(160deg, rgba(255,122,89,0.18), rgba(255,255,255,0.92)); }
.concept-card:nth-child(2) .concept-title { color: #b83818; }
.concept-card:nth-child(3) { background: linear-gradient(160deg, rgba(25,183,166,0.2), rgba(255,255,255,0.92)); }
.concept-card:nth-child(3) .concept-title { color: #0b7a6e; }
.concept-card:nth-child(4) { background: linear-gradient(160deg, rgba(106,124,255,0.18), rgba(255,255,255,0.92)); }
.concept-card:nth-child(4) .concept-title { color: #3a4dcc; }
.concept-card:nth-child(5) { background: linear-gradient(160deg, rgba(14,166,111,0.18), rgba(255,255,255,0.92)); }
.concept-card:nth-child(5) .concept-title { color: #0a7a52; }
.concept-card:nth-child(6) { background: linear-gradient(160deg, rgba(215,77,99,0.14), rgba(255,255,255,0.92)); }
.concept-card:nth-child(6) .concept-title { color: #a02040; }
.concept-card:nth-child(7) { background: linear-gradient(160deg, rgba(74,130,234,0.16), rgba(255,255,255,0.92)); }
.concept-card:nth-child(7) .concept-title { color: #1e4eb0; }
.concept-card:nth-child(8) { background: linear-gradient(160deg, rgba(255,160,50,0.18), rgba(255,255,255,0.92)); }
.concept-card:nth-child(8) .concept-title { color: #b05800; }

/* Açık halde biraz daha doygun */
.concept-card:nth-child(1).open { background: linear-gradient(160deg, rgba(255,203,71,0.32), rgba(255,255,255,0.95)); }
.concept-card:nth-child(2).open { background: linear-gradient(160deg, rgba(255,122,89,0.26), rgba(255,255,255,0.95)); }
.concept-card:nth-child(3).open { background: linear-gradient(160deg, rgba(25,183,166,0.28), rgba(255,255,255,0.95)); }
.concept-card:nth-child(4).open { background: linear-gradient(160deg, rgba(106,124,255,0.26), rgba(255,255,255,0.95)); }
.concept-card:nth-child(5).open { background: linear-gradient(160deg, rgba(14,166,111,0.26), rgba(255,255,255,0.95)); }
.concept-card:nth-child(6).open { background: linear-gradient(160deg, rgba(215,77,99,0.22), rgba(255,255,255,0.95)); }
.concept-card:nth-child(7).open { background: linear-gradient(160deg, rgba(74,130,234,0.24), rgba(255,255,255,0.95)); }
.concept-card:nth-child(8).open { background: linear-gradient(160deg, rgba(255,160,50,0.26), rgba(255,255,255,0.95)); }

.policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quote-card, .tf-card, .quiz-card, .crossword-shell { padding: 22px; border-radius: 24px; background: rgba(255, 255, 255, 0.86); box-shadow: var(--shadow); }
.quote-card { background: linear-gradient(160deg, rgba(106, 124, 255, 0.14), rgba(255, 255, 255, 0.92)), white; }
blockquote { margin: 14px 0; font-family: "Fredoka", sans-serif; font-size: 1.2rem; color: #354dff; }

.org-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.org-card { padding: 18px; text-align: left; border-radius: 24px; background: rgba(255, 255, 255, 0.88); box-shadow: var(--shadow); }
.org-card img { width: 100%; height: 108px; object-fit: contain; padding: 8px; border-radius: 18px; background: rgba(23, 50, 77, 0.04); margin-bottom: 14px; }
.org-card h3 { margin-bottom: 6px; }
.org-hint { display: block; margin-top: 8px; font-size: 0.88rem; font-weight: 700; }
.map-panel { margin-top: 22px; padding: 22px; border-radius: 24px; background: rgba(255,255,255,0.86); box-shadow: var(--shadow); }
.mini-world { position: relative; min-height: 260px; margin-top: 16px; border-radius: 22px; background: linear-gradient(180deg, #dff2ff, #f7fcff); overflow: hidden; }
.continent { position: absolute; background: rgba(25, 183, 166, 0.24); border-radius: 50px; }
.americas { left: 7%; top: 20%; width: 18%; height: 42%; }
.europe { left: 43%; top: 16%; width: 10%; height: 14%; }
.africa { left: 46%; top: 32%; width: 12%; height: 28%; }
.asia { left: 55%; top: 18%; width: 26%; height: 32%; }
.oceania { left: 80%; top: 56%; width: 10%; height: 12%; }
.map-pin { position: absolute; padding: 8px 10px; border-radius: 14px; background: white; box-shadow: var(--shadow); font-size: 0.82rem; font-weight: 800; line-height: 1.3; }
.ny { left: 17%; top: 28%; }
.brussels { left: 47%; top: 18%; }
.paris { left: 45%; top: 25%; }
.geneva { left: 47%; top: 31%; }
.jeddah { left: 54%; top: 43%; }
.istanbul { left: 51%; top: 27%; }

.crossword-shell { display: grid; grid-template-columns: 1.2fr 0.9fr; gap: 24px; align-items: start; }
.crossword-board { position: relative; min-height: 560px; background: linear-gradient(180deg, rgba(255, 244, 217, 0.85), rgba(255, 255, 255, 0.96)); border-radius: 24px; padding: 18px; overflow: auto; }
.crossword-grid { position: relative; width: 600px; height: 520px; margin: 0 auto; }
.cw-cell, .cw-input { position: absolute; width: 40px; height: 40px; border: 1.5px solid #b7bcc6; background: white; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.15rem; text-transform: uppercase; }
.cw-cell.fixed { background: rgba(106, 124, 255, 0.07); cursor: pointer; }
.cw-cell.fixed:hover:not(.revealed) { background: rgba(106, 124, 255, 0.16); }
.cw-cell.fixed.revealed { background: #fafafa; cursor: default; }
.cw-cell.blank { background: transparent; border: 0; }
.cw-input { text-align: center; outline: 0; padding: 0; cursor: text; transition: background 0.18s, border-color 0.18s; }
.cw-input:focus { border-color: var(--accent-4); box-shadow: 0 0 0 3px rgba(106,124,255,0.18); z-index: 2; }
.cw-input.good { background: rgba(14, 166, 111, 0.15); border-color: var(--success); }
.cw-input.bad  { background: rgba(215, 77, 99, 0.12);  border-color: var(--danger); }
.cw-number { position: absolute; width: 16px; height: 16px; font-size: 0.58rem; font-weight: 900; line-height: 16px; text-align: center; z-index: 3; pointer-events: none; color: #4a5568; background: rgba(255,248,230,0.95); border-radius: 3px; }
.crossword-clues { background: rgba(255, 255, 255, 0.9); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); }
.crossword-clues ol { padding-left: 20px; line-height: 1.9; margin: 10px 0 16px; }
.crossword-clue-btn { width: 100%; text-align: left; padding: 10px 12px; border-radius: 14px; border: 0; background: rgba(106, 124, 255, 0.08); font-weight: 700; cursor: pointer; }
.crossword-clue-btn:hover { background: rgba(106, 124, 255, 0.16); }

.mini-feedback { display: block; margin-top: 10px; font-weight: 800; }
.is-correct { color: var(--success); }
.is-wrong { color: var(--danger); }

.match-board { gap: 18px; }
.match-column { flex: 1; flex-direction: column; gap: 12px; }
.match-item { width: 100%; padding: 16px 18px; text-align: left; border-radius: 18px; background: rgba(255, 255, 255, 0.88); font-weight: 800; box-shadow: var(--shadow); }
.match-item.selected { outline: 3px solid var(--accent-4); }
.match-item.matched { background: rgba(14, 166, 111, 0.15); color: var(--success); }

.tf-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tf-card p, .quote-card p { line-height: 1.55; }

.quiz-stage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.quiz-card { display: block; }
.quiz-headline { justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 12px; }
.quiz-badge { padding: 6px 10px; border-radius: 999px; background: rgba(106, 124, 255, 0.12); font-weight: 800; font-size: 0.8rem; }
.quiz-num { font-weight: 900; font-size: 1rem; color: var(--muted); }
.option-btn { width: 100%; text-align: left; }
.quiz-mini-feedback { display: block; margin-top: 8px; font-weight: 700; font-size: 0.88rem; line-height: 1.4; }
.option-btn.correct, .tf-btn.correct { background: rgba(14, 166, 111, 0.15); color: var(--success); }
.option-btn.wrong, .tf-btn.wrong { background: rgba(215, 77, 99, 0.12); color: var(--danger); }
.difficulty-panel, .score-strip { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.difficulty-btn { padding: 10px 14px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 800; background: rgba(255,255,255,0.9); }
.difficulty-btn.active { background: linear-gradient(135deg, var(--accent-4), var(--accent)); color: white; }
.badge-panel { padding: 14px 16px; border-radius: 18px; background: rgba(255, 203, 71, 0.2); font-weight: 800; }
.summary-panel { margin-top: 16px; padding: 24px; border-radius: 22px; background: rgba(255,255,255,0.92); box-shadow: var(--shadow); }
.summary-head { display: flex; gap: 24px; align-items: center; margin-bottom: 20px; }
.summary-img { width: 140px; height: 140px; object-fit: cover; border-radius: 20px; box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.summary-panel p { line-height: 1.65; margin-bottom: 12px; }

.section-actions { justify-content: flex-end; margin-top: 24px; }
.source-note { margin-top: 14px; text-align: center; font-size: 0.92rem; }
.sub-term { font-size: 0.7em; font-weight: 500; opacity: 0.65; font-family: "Nunito", sans-serif; }

.org-modal { border: 0; border-radius: 28px; padding: 0; width: min(820px, calc(100vw - 32px)); background: white; box-shadow: 0 30px 80px rgba(18, 32, 53, 0.32); }
.org-modal::backdrop { background: rgba(22, 35, 53, 0.45); }
.org-modal-body { padding: 24px; }
.org-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.org-modal-close { width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(23, 50, 77, 0.08); font-size: 1.4rem; }
.org-modal-grid { gap: 20px; align-items: flex-start; }
.org-modal-grid img { width: 140px; height: 140px; object-fit: contain; background: rgba(23, 50, 77, 0.04); border-radius: 20px; padding: 12px; }
.org-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.fact-box { padding: 14px; border-radius: 18px; background: rgba(106, 124, 255, 0.08); }
.fact-box span { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; }
.org-info p { margin: 0 0 10px; line-height: 1.65; }

@media (max-width: 1180px) {
  body { overflow: auto; }
  .topbar { flex-direction: column; align-items: stretch; }
  .slider-wrap { height: auto; overflow: visible; }
  .slides { width: 100%; display: block; transform: none !important; }
  .slide { width: 100%; height: auto; margin-bottom: 18px; }
  .hero-grid, .match-board, .crossword-shell, .org-modal-grid { flex-direction: column; display: flex; }
  .section-head { flex-direction: column; align-items: flex-start; text-align: center; width: 100%; }
  .policy-hero { margin-top: 16px; width: 100%; }
  .policy-img { max-height: 120px; }
  .summary-head { flex-direction: column; text-align: center; }
  .summary-img { margin: 0 auto 16px; }
  .concept-grid, .policy-grid, .org-grid, .tf-grid, .quiz-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crossword-shell { display: flex; }
}

@media (max-width: 720px) {
  .app-shell { padding: 14px; }
  .slide, .hero-card, .spark-card, .quote-card, .org-card, .tf-card, .quiz-card, .crossword-shell { padding: 18px; }
  .concept-grid, .policy-grid, .org-grid, .tf-grid, .quiz-stage, .org-facts { grid-template-columns: 1fr; }
  .hero-card h2 { font-size: 2rem; }
  .crossword-grid { transform: scale(0.72); transform-origin: top left; width: 600px; }
  .crossword-board { min-height: 400px; }
}
