/* =====================================================================
   Vices Forum — ANKET arayüzü
   forum.html'in değişkenlerini (--surface, --border, --accent …) kullanır.
   ===================================================================== */

/* ---- ortak ---- */
.ank-wrap { max-width: 780px; margin: 0 auto; }
.ank-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 22px; margin-bottom: 14px; position: relative;
}
.ank-card.sec-head { border-top: 3px solid var(--ank-accent, var(--accent)); }
.ank-hero {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  border-top: 6px solid var(--ank-accent, var(--accent)); padding: 26px 24px; margin-bottom: 16px;
}
.ank-hero h1 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.15; margin: 0 0 8px; color: var(--text-bright); }
.ank-hero p { margin: 0; color: var(--text-muted); font-size: 14.5px; white-space: pre-wrap; line-height: 1.6; }
.ank-cover { width: 100%; max-height: 240px; object-fit: cover; border-radius: 10px; margin-bottom: 16px; display: block; }
.ank-req-note { margin-top: 14px; font-size: 12.5px; color: var(--robber); }

/* ---- liste ---- */
.ank-grid { display: grid; gap: 12px; }
.ank-row {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px;
  transition: border-color .16s, transform .16s;
}
.ank-row:hover { border-color: rgba(232, 200, 74, .38); transform: translateY(-1px); }
a.ank-row { text-decoration: none; color: inherit; }
.ank-row h3 { margin: 0 0 4px; font-size: 16.5px; color: var(--text-bright); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ank-row .ank-ex { margin: 0 0 8px; font-size: 13px; color: var(--text-muted); }
.ank-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.ank-meta b { color: var(--text); font-weight: 600; }
.ank-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.ank-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid; }
.ank-tag.acik { color: var(--accent3); border-color: rgba(61, 191, 138, .45); background: rgba(61, 191, 138, .08); }
.ank-tag.taslak { color: var(--text-muted); border-color: var(--border); background: var(--surface2); }
.ank-tag.kapali { color: var(--robber); border-color: rgba(217, 64, 64, .45); background: rgba(217, 64, 64, .08); }
.ank-tag.bilgi { color: var(--police); border-color: rgba(58, 127, 213, .45); background: rgba(58, 127, 213, .08); }

/* ---- soru kartı (doldurma) ---- */
.q-title { font-size: 16px; color: var(--text-bright); line-height: 1.45; margin-bottom: 4px; }
.q-title .yildiz { color: var(--robber); margin-left: 3px; }
.q-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; white-space: pre-wrap; line-height: 1.55; }
.q-img { max-width: 100%; border-radius: 8px; margin: 4px 0 12px; display: block; }
.q-err { margin-top: 10px; font-size: 12.5px; color: #ff9c9c; display: flex; gap: 6px; align-items: center; }
.ank-card.hatali { border-color: rgba(217, 64, 64, .55); }

.opt-list { display: grid; gap: 2px; }
.opt {
  display: flex; align-items: flex-start; gap: 11px; padding: 9px 10px; border-radius: 8px;
  cursor: pointer; transition: background .14s; font-size: 14.5px; color: var(--text); line-height: 1.5;
}
.opt:hover { background: var(--surface2); }
.opt input { margin: 2px 0 0; accent-color: var(--ank-accent, var(--accent)); width: 17px; height: 17px; flex: none; cursor: pointer; }
.opt .diger-in { flex: 1; min-width: 120px; }

.ank-sel { width: 100%; max-width: 340px; }

/* doğrusal ölçek */
.scale {
  display: flex; align-items: flex-end; gap: 4px; overflow-x: auto; padding: 6px 0 2px;
}
.scale-lbl { font-size: 12.5px; color: var(--text-muted); align-self: center; padding: 0 8px; flex: none; max-width: 140px; }
.scale-item { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: 1; min-width: 42px; }
.scale-item span { font-size: 13px; color: var(--text-muted); }
.scale-item input { accent-color: var(--ank-accent, var(--accent)); width: 19px; height: 19px; cursor: pointer; }

/* yıldız derecelendirme */
.rate { display: flex; gap: 4px; }
.rate button {
  background: none; border: 0; cursor: pointer; font-size: 27px; line-height: 1;
  filter: grayscale(1) opacity(.32); transition: filter .12s, transform .12s; padding: 2px;
}
.rate button:hover { transform: scale(1.14); }
.rate button.on { filter: none; }
.rate .temizle { font-size: 12px; color: var(--text-muted); filter: none; align-self: center; margin-left: 8px; }

/* tablo (grid) soruları */
.gwrap { overflow-x: auto; margin: 0 -4px; }
.gtable { border-collapse: collapse; width: 100%; min-width: 420px; font-size: 13.5px; }
.gtable th, .gtable td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--border); }
.gtable th { color: var(--text-muted); font-weight: 600; font-size: 12.5px; }
.gtable td:first-child, .gtable th:first-child { text-align: left; color: var(--text); min-width: 120px; }
.gtable tbody tr:hover { background: var(--surface2); }
.gtable input { accent-color: var(--ank-accent, var(--accent)); width: 17px; height: 17px; cursor: pointer; }

/* görsel yükleme */
.upl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.upl-thumb { position: relative; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.upl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upl-thumb button {
  position: absolute; top: 3px; right: 3px; border: 0; border-radius: 6px; cursor: pointer;
  background: rgba(0, 0, 0, .66); color: #fff; width: 22px; height: 22px; line-height: 1; font-size: 13px;
}

/* ---- ilerleme + gezinme ---- */
.ank-prog { height: 4px; background: var(--surface2); border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.ank-prog i { display: block; height: 100%; background: var(--ank-accent, var(--accent)); transition: width .3s; }
.ank-nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.ank-nav .sag { margin-left: auto; display: flex; gap: 8px; }
.ank-step { font-size: 12.5px; color: var(--text-muted); }

/* ---- teşekkür ---- */
.ank-done { text-align: center; padding: 46px 20px; }
.ank-done .ic { font-size: 46px; margin-bottom: 12px; }
.ank-done h2 { color: var(--text-bright); margin: 0 0 8px; font-size: 24px; }
.ank-done p { color: var(--text-muted); max-width: 460px; margin: 0 auto 22px; line-height: 1.6; white-space: pre-wrap; }

/* ---- sonuçlar ---- */
.res-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.res-tabs button {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text-muted);
  padding: 8px 15px; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.res-tabs button.on { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.bar-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; margin-bottom: 9px; font-size: 13.5px; }
.bar-row .lbl { color: var(--text); overflow-wrap: anywhere; }
.bar-track { background: var(--surface2); border-radius: 999px; height: 22px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 999px; min-width: 2px; transition: width .4s; }
.bar-num { color: var(--text-muted); font-size: 12.5px; white-space: nowrap; }
.res-empty { color: var(--text-muted); font-size: 13px; font-style: italic; }
.res-avg { font-size: 13px; color: var(--accent); margin-bottom: 10px; }
.txt-list { display: grid; gap: 7px; max-height: 340px; overflow-y: auto; }
.txt-item { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.res-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.res-imgs img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.mat-table { border-collapse: collapse; width: 100%; min-width: 420px; font-size: 13px; }
.mat-table th, .mat-table td { padding: 8px 7px; border: 1px solid var(--border); text-align: center; }
.mat-table td:first-child, .mat-table th:first-child { text-align: left; }
.mat-cell { position: relative; }
.mat-cell i { position: absolute; inset: 0; background: var(--accent); opacity: .16; }
.mat-cell b { position: relative; font-weight: 600; }

.resp-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.resp-a { background: var(--surface2); border-radius: 8px; padding: 10px 13px; font-size: 13.5px; margin-bottom: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.resp-q { font-size: 12.5px; color: var(--text-muted); margin-bottom: 3px; }

/* ---- editör ---- */
.ed-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 12px;
}
.ed-card.aktif { border-color: rgba(232, 200, 74, .5); }
.ed-top { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; }
.ed-top .ed-q { flex: 1; min-width: 200px; }
.ed-type { width: 190px; flex: none; }
.ed-sub { display: grid; gap: 8px; margin-top: 10px; }
.ed-opt { display: flex; gap: 8px; align-items: center; }
.ed-opt .mark { color: var(--text-muted); font-size: 14px; width: 16px; text-align: center; flex: none; }
.ed-opt .field { flex: 1; }
.ed-opt .git { width: 172px; flex: none; font-size: 12px; }
.ed-x { background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: 17px; padding: 2px 6px; border-radius: 6px; flex: none; }
.ed-x:hover { color: var(--robber); background: var(--surface2); }
.ed-foot {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  border-top: 1px solid var(--border); margin-top: 14px; padding-top: 11px;
}
.ed-foot .sag { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.ed-mini { background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: 15px; padding: 5px 8px; border-radius: 7px; }
.ed-mini:hover { color: var(--accent); background: var(--surface2); }
.ed-sec {
  display: flex; align-items: center; gap: 10px; margin: 22px 0 10px;
  color: var(--text-muted); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.ed-sec::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.ed-add { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 26px; }
.ed-bar {
  position: sticky; bottom: 0; z-index: 30; margin: 0 -2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
}
.ed-bar .sag { margin-left: auto; display: flex; gap: 8px; }
.ed-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.ed-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; line-height: 1.5; }

@media (max-width: 680px) {
  .ank-row { grid-template-columns: 1fr; }
  .ank-acts { justify-content: flex-start; }
  .ed-type { width: 100%; }
  .ed-opt { flex-wrap: wrap; }
  .ed-opt .git { width: 100%; }
  .bar-row { grid-template-columns: 1fr; gap: 4px; }
  .bar-row .bar-num { justify-self: end; margin-top: -22px; margin-right: 8px; }
}
