/* ============================================================
   Sosyal Psikoloji 2 – Final Çalışma Sitesi
   Pembe–Beyaz tema · Responsive
   ============================================================ */

:root {
  --pink-900: #8a1c4d;
  --pink-700: #c2185b;
  --pink-500: #ff5fa2;
  --pink-400: #ff8fc0;
  --pink-300: #ffb3d4;
  --pink-200: #ffd6e7;
  --pink-100: #ffe9f2;
  --pink-50:  #fff5f9;
  --white:    #ffffff;
  --ink:      #3b2230;
  --ink-soft: #6d5560;
  --good:     #2e9e6b;
  --good-bg:  #e3f7ee;
  --bad:      #d6336c;
  --bad-bg:   #ffe3ec;
  --star:     #ffb703;
  --shadow:   0 8px 28px rgba(194, 24, 91, 0.12);
  --shadow-sm: 0 3px 12px rgba(194, 24, 91, 0.10);
  --radius:   18px;
  --radius-sm: 12px;
  --sidebar-w: 280px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  background: linear-gradient(160deg, var(--pink-50) 0%, var(--pink-100) 100%);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--pink-700); }

/* ---------------- Layout ---------------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--pink-500) 0%, var(--pink-700) 100%);
  color: var(--white);
  padding: 24px 18px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 50;
  box-shadow: var(--shadow);
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: .3px;
}
.sidebar .brand .heart { font-size: 1.4rem; }
.sidebar .subtitle {
  font-size: .78rem;
  opacity: .9;
  margin-bottom: 22px;
  font-weight: 500;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  margin-bottom: 7px;
  border-radius: var(--radius-sm);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: .94rem;
  transition: background .18s, transform .18s;
}
.nav-link .ico { font-size: 1.15rem; width: 22px; text-align: center; }
.nav-link:hover { background: rgba(255,255,255,.16); transform: translateX(3px); }
.nav-link.active { background: var(--white); color: var(--pink-700); box-shadow: var(--shadow-sm); }

.sidebar .sb-foot {
  margin-top: 22px;
  font-size: .72rem;
  opacity: .85;
  border-top: 1px solid rgba(255,255,255,.25);
  padding-top: 14px;
}

/* ---------------- Main ---------------- */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px clamp(18px, 5vw, 60px) 80px;
  width: calc(100% - var(--sidebar-w));
}

.topbar {
  display: none;
  align-items: center;
  gap: 14px;
  background: var(--pink-700);
  color: #fff;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}
.topbar .menu-btn {
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  width: 42px; height: 42px;
  border-radius: 10px;
  cursor: pointer;
}
.topbar .tb-title { font-weight: 700; }

/* ---------------- Headings ---------------- */
.page-head {
  background: linear-gradient(120deg, var(--pink-400), var(--pink-700));
  color: #fff;
  border-radius: var(--radius);
  padding: 26px 30px;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
}
.page-head h1 { margin: 0 0 8px; font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.page-head .source-tag {
  display: inline-block;
  background: rgba(255,255,255,.22);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  margin-top: 4px;
}
.page-head p { margin: 12px 0 0; opacity: .96; }

h2 {
  color: var(--pink-900);
  font-size: 1.5rem;
  margin: 38px 0 14px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--pink-200);
}
h3 { color: var(--pink-700); font-size: 1.18rem; margin: 24px 0 8px; }

/* ---------------- Cards & boxes ---------------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--pink-100);
}

.summary-box {
  background: var(--pink-100);
  border-left: 6px solid var(--pink-500);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.summary-box strong { color: var(--pink-900); }

.hoca-box {
  background: #fff7e6;
  border: 1px solid #ffe2a8;
  border-left: 6px solid var(--star);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 18px 0;
}
.hoca-box .hb-title {
  font-weight: 800;
  color: #b07400;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}

.klasik-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(120deg, #ffd166, var(--star));
  color: #5a3d00;
  font-weight: 800;
  font-size: .76rem;
  padding: 4px 12px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
  box-shadow: var(--shadow-sm);
}

.example {
  background: var(--pink-50);
  border: 1px dashed var(--pink-300);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  margin: 12px 0;
}
.example::before {
  content: "🔎 Örnek";
  display: block;
  font-weight: 700;
  color: var(--pink-700);
  font-size: .82rem;
  margin-bottom: 4px;
}

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; margin: 18px 0; }
table.compare {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-width: 520px;
}
table.compare th, table.compare td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--pink-100);
  vertical-align: top;
}
table.compare th {
  background: var(--pink-500);
  color: #fff;
  font-size: .92rem;
}
table.compare tr:nth-child(even) td { background: var(--pink-50); }
table.compare td:first-child { font-weight: 700; color: var(--pink-900); }

ul.clean { padding-left: 20px; }
ul.clean li { margin-bottom: 6px; }

.pill {
  display: inline-block;
  background: var(--pink-200);
  color: var(--pink-900);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: .8rem;
  font-weight: 600;
  margin: 2px;
}

/* ---------------- Quiz ---------------- */
.quiz {
  background: linear-gradient(160deg, #fff, var(--pink-50));
  border: 2px solid var(--pink-200);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 28px;
  box-shadow: var(--shadow-sm);
}
.quiz h2 { border: none; margin-top: 0; }
.quiz-meta { color: var(--ink-soft); font-size: .9rem; margin-bottom: 16px; }

.q-item {
  background: #fff;
  border: 1px solid var(--pink-100);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.q-num {
  display: inline-block;
  background: var(--pink-700);
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  padding: 1px 10px;
  font-size: .82rem;
  margin-right: 8px;
}
.q-text { font-weight: 600; margin-bottom: 12px; }
.q-tag {
  font-size: .72rem;
  background: var(--pink-100);
  color: var(--pink-900);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.opt {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--pink-50);
  border: 1.5px solid var(--pink-200);
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: .94rem;
  color: var(--ink);
  transition: background .15s, border-color .15s;
}
.opt:hover:not(:disabled) { background: var(--pink-100); border-color: var(--pink-400); }
.opt.correct { background: var(--good-bg); border-color: var(--good); color: #14623f; font-weight: 600; }
.opt.wrong   { background: var(--bad-bg);  border-color: var(--bad);  color: #8a1239; font-weight: 600; }
.opt:disabled { cursor: default; }

.explain {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--pink-100);
  border-left: 4px solid var(--pink-500);
  font-size: .9rem;
  display: none;
}
.explain.show { display: block; }
.explain .src { display: block; margin-top: 6px; font-size: .78rem; color: var(--ink-soft); }

/* açık uçlu klasik */
.classic-q .reveal-btn {
  background: var(--pink-700); color: #fff; border: none;
  padding: 9px 16px; border-radius: 10px; cursor: pointer; font-weight: 600;
}
.classic-q .model-answer {
  display: none;
  margin-top: 12px;
  background: var(--good-bg);
  border-left: 4px solid var(--good);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: .92rem;
}
.classic-q .model-answer.show { display: block; }

/* eşleştirme */
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match-grid .m-col h4 { margin: 0 0 8px; color: var(--pink-700); }

.btn {
  background: var(--pink-700);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  font-size: .95rem;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, background .15s;
}
.btn:hover { background: var(--pink-900); transform: translateY(-2px); }
.btn.ghost { background: #fff; color: var(--pink-700); border: 2px solid var(--pink-400); }

.quiz-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.score-board {
  display: none;
  margin-top: 18px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--pink-400), var(--pink-700));
  color: #fff;
  font-weight: 600;
}
.score-board.show { display: block; }
.score-board .big { font-size: 2rem; font-weight: 800; }

/* ---------------- Quiz Modal ---------------- */
body.modal-open { overflow: hidden; }

.quiz-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(60, 20, 40, .55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .25s ease;
}
.quiz-modal.show { opacity: 1; }

.quiz-modal-box {
  width: min(760px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #fff, var(--pink-50));
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  transform: translateY(18px) scale(.98);
  transition: transform .25s ease;
  overflow: hidden;
}
.quiz-modal.show .quiz-modal-box { transform: translateY(0) scale(1); }

.quiz-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  background: var(--pink-700);
  color: #fff;
  flex-shrink: 0;
}
.quiz-modal-head .qm-title { font-weight: 700; font-size: 1.1rem; }
.qm-close {
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  width: 38px; height: 38px;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.qm-close:hover { background: rgba(255,255,255,.35); }

.quiz-modal-body {
  padding: 22px;
  overflow-y: auto;
}

/* tek tek soru navigasyonu */
.quiz-progress { margin-bottom: 18px; }
.quiz-progress-label {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  color: var(--pink-700);
  margin-bottom: 6px;
}
.quiz-progress-bar {
  height: 8px;
  background: var(--pink-100);
  border-radius: 999px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--pink-400), var(--pink-700));
  border-radius: 999px;
  transition: width .3s ease;
}
.quiz-nav {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.quiz-nav .btn { flex: 1 1 auto; min-width: 120px; }
.quiz-nav .btn:disabled { opacity: .45; cursor: default; transform: none; }

@media (max-width: 600px) {
  .quiz-modal { padding: 0; }
  .quiz-modal-box { max-height: 100vh; height: 100vh; border-radius: 0; width: 100%; }
}


.cheat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.cheat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border-top: 5px solid var(--pink-500);
}
.cheat-card h3 { margin-top: 0; }
.cheat-card ul { padding-left: 18px; margin: 8px 0 0; }
.cheat-card li { margin-bottom: 5px; font-size: .92rem; }

/* ---------------- Welcome (index) ---------------- */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(150deg, var(--pink-300), var(--pink-700));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  color: #fff;
  text-align: center;
  padding: 20px;
  transition: opacity .6s ease, visibility .6s ease;
}
.welcome-overlay.hide { opacity: 0; visibility: hidden; }
.welcome-overlay h1 {
  font-size: clamp(2rem, 7vw, 4rem);
  margin: 0;
  animation: pop 0.9s cubic-bezier(.2,.9,.3,1.4) both;
  text-shadow: 0 6px 22px rgba(0,0,0,.18);
}
.welcome-overlay .peanut { font-size: clamp(3rem, 12vw, 6rem); animation: float 2.2s ease-in-out infinite; }
.welcome-overlay .sub { margin-top: 14px; font-size: 1.05rem; opacity: .95; animation: fadeUp 1.2s .3s both; }
.welcome-overlay .enter-btn {
  margin-top: 26px;
  background: #fff;
  color: var(--pink-700);
  border: none;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  animation: fadeUp 1.2s .5s both;
}
.welcome-overlay .enter-btn:hover { transform: scale(1.05); }

.hearts span {
  position: absolute;
  bottom: -40px;
  color: rgba(255,255,255,.85);
  font-size: 1.6rem;
  animation: rise linear infinite;
}

.hero-card {
  background: linear-gradient(135deg, var(--pink-400), var(--pink-700));
  color: #fff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}
.hero-card h1 { margin: 0 0 10px; font-size: clamp(1.8rem, 5vw, 2.6rem); }
.hero-card p { font-size: 1.05rem; opacity: .96; max-width: 640px; }

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.home-tile {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--pink-100);
  transition: transform .18s, box-shadow .18s;
  display: block;
}
.home-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.home-tile .t-ico { font-size: 2rem; }
.home-tile h3 { margin: 8px 0 6px; }
.home-tile p { margin: 0; font-size: .9rem; color: var(--ink-soft); }

/* ---------------- Animations ---------------- */
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rise { to { transform: translateY(-110vh); opacity: 0; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .28s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; width: 100%; padding-top: 0; }
  .topbar {
    display: flex;
    margin-left: calc(-1 * clamp(18px, 5vw, 60px));
    margin-right: calc(-1 * clamp(18px, 5vw, 60px));
    margin-bottom: 18px;
  }
  .page-head { margin-top: 0; }
  .backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4); z-index: 45;
  }
  .backdrop.show { display: block; }
  .match-grid { grid-template-columns: 1fr; }
}

@media print {
  .sidebar, .topbar, .quiz-actions, .reveal-btn { display: none !important; }
  .main { margin: 0; width: 100%; }
  body { background: #fff; }
  .cheat-card, .card { box-shadow: none; border: 1px solid #ddd; }
}
