/* =========================================================
   TAVUK ÇİFTLİĞİ • LIGHT TEMA
========================================================= */

:root[data-theme="light"] {
  --bg: #F9FAFB;
  --bg-soft: #EEF2FF;

  --accent: #eab308;
  --accent-soft: rgba(234, 179, 8, 0.12);
  --accent-strong: #ca8a04;

  --text: #020617;
  --muted: #475569;
  --error: #dc2626;

  --radius-xl: 26px;
  --radius-md: 14px;

  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.10);

  --font-main: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-base: 15px;
  --line-height-base: 1.6;

  /* KART / PİLL / BADGE yüzeyleri */
  --card-bg: #ffffff;
  --card-bg-soft: #f9fafb;
  --card-border: rgba(148, 163, 184, 0.40);

  --pill-bg: #ffffff;
  --pill-border: rgba(148, 163, 184, 0.75);

  --badge-bg: #ffffff;
  --badge-border: rgba(148, 163, 184, 0.40);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
}

html[data-theme="light"] body.tc-body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #ffffff 0, #f1f5f9 42%, #e2e8f0 100%);
  color: var(--text);
  font-family: var(--font-main);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
}

html[data-theme="light"] .tc-container {
  width: 100%;
  max-width: 1280px;
  padding: 40px 24px 40px;
  margin: 0 auto;
}

/* İlk boyamada geçişleri kapat */
.theme-loading *,
.theme-loading *::before,
.theme-loading *::after {
  transition: none !important;
}

/* ================= HEADER ================= */

/* Dark base’deki yapıyla aynı: üst satır (logo + actions) + alt satır (sub) */

html[data-theme="light"] .tc-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 28px;
}

/* Üst satır: Logo + (tema + menü) */
html[data-theme="light"] .tc-header-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */

html[data-theme="light"] .tc-logo {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
}

html[data-theme="light"] .tc-logo::before {
  content: "🐔";
  font-size: 24px;
}

/* Alt satır: sub başlık tam header’ın altında */

html[data-theme="light"] .tc-sub {
  font-size: 15px;
  color: var(--muted);
  width: 100%;
  margin-top: 2px;
}

/* Sağ taraf: tema + hamburger menü */

html[data-theme="light"] .tc-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tema butonu – header-actions içinde, absolute değil */

html[data-theme="light"] .tc-theme-toggle {
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.40);
  background: #ffffffcc;
  color: var(--accent-strong);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

html[data-theme="light"] .tc-theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(234, 179, 8, 0.8);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.15);
}

/* Global Menü (hamburger) – sadece renk/kontrast light uyumu */

html[data-theme="light"] .tc-menu-toggle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.70);
  background: #ffffff;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  box-shadow: var(--shadow-soft);
  transition:
    background var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

html[data-theme="light"] .tc-menu-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(15,23,42,0.18);
}

html[data-theme="light"] .tc-side-menu {
  position: absolute;
  right: 0;
  top: 110%;
  padding: 10px 12px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(148,163,184,0.75);
  box-shadow: 0 18px 50px rgba(15,23,42,0.15);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 190px;

  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast);
  z-index: 999;
}

html[data-theme="light"] .tc-side-menu.tc-side-menu-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

html[data-theme="light"] .tc-side-menu a {
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

html[data-theme="light"] .tc-side-menu-icon {
  font-size: 14px;
}

html[data-theme="light"] .tc-side-menu a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* Mobilde menü pozisyonu */

@media (max-width: 640px) {
  html[data-theme="light"] .tc-side-menu {
    top: 120%;
    right: 0;
  }
}

/* ================= HERO ================= */

html[data-theme="light"] .tc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 32px;
  align-items: center;
  margin-bottom: 36px;
}

html[data-theme="light"] .tc-hero-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

html[data-theme="light"] .tc-hero-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

html[data-theme="light"] .tc-hero-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--muted);
}

html[data-theme="light"] .tc-hero-pill-soft {
  opacity: 0.85;
}

html[data-theme="light"] .tc-hero-title {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
}

html[data-theme="light"] .tc-hero-title span {
  color: var(--accent-strong);
}

html[data-theme="light"] .tc-hero-sub {
  font-size: 14px;
  color: var(--muted);
  max-width: 480px;
}

html[data-theme="light"] .tc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

html[data-theme="light"] .tc-hero-primary {
  font-size: 14px;
}

html[data-theme="light"] .tc-hero-secondary {
  font-size: 13px;
}

html[data-theme="light"] .tc-hero-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* HERO sağ taraf fake preview */

html[data-theme="light"] .tc-hero-right {
  display: flex;
  justify-content: flex-end;
}

html[data-theme="light"] .tc-hero-preview {
  width: 100%;
  max-width: 360px;
  border-radius: 22px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  font-size: 11px;
}

html[data-theme="light"] .tc-hero-preview-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--card-border);
}

html[data-theme="light"] .tc-hero-preview-header .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--muted);
}

html[data-theme="light"] .tc-hero-preview-title {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}

html[data-theme="light"] .tc-hero-preview-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

html[data-theme="light"] .tc-hero-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) auto;
  gap: 6px;
  align-items: center;
}

html[data-theme="light"] .tc-hero-preview-row .label {
  color: var(--muted);
}

html[data-theme="light"] .tc-hero-preview-row .bar {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: var(--card-bg-soft);
  overflow: hidden;
}

html[data-theme="light"] .tc-hero-preview-row .fill {
  position: absolute;
  inset: 0;
  width: 60%;
  background: linear-gradient(
    to right,
    rgba(234, 179, 8, 0.8),
    rgba(234, 179, 8, 0.4)
  );
}

html[data-theme="light"] .tc-hero-preview-row .fill-2 {
  width: 40%;
}

html[data-theme="light"] .tc-hero-preview-row .fill-3 {
  width: 25%;
}

html[data-theme="light"] .tc-hero-preview-row .val {
  font-variant-numeric: tabular-nums;
  color: var(--accent-strong);
}

/* ================= ARAÇLAR BAŞLIK ================= */

html[data-theme="light"] .tc-tools-section {
  margin-top: 8px;
}

html[data-theme="light"] .tc-tools-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

html[data-theme="light"] .tc-tools-title {
  font-size: 18px;
  font-weight: 600;
}

html[data-theme="light"] .tc-tools-sub {
  font-size: 13px;
  color: var(--muted);
  max-width: 420px;
}

/* ================= CARD / GRID ================= */

html[data-theme="light"] .tc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 10px;
}

html[data-theme="light"] .tc-card {
  padding: 22px 18px 18px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.08), transparent),
    linear-gradient(150deg, #ffffff, #f4f4f9);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.20);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 180px;
  position: relative;
  overflow: hidden;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

html[data-theme="light"] .tc-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

html[data-theme="light"] .tc-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: #f1f5f9cc;
  border: 1px solid rgba(148, 163, 184, 0.40);
  margin-bottom: 4px;
}

html[data-theme="light"] .tc-card-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.40);
  color: var(--muted);
}

html[data-theme="light"] .tc-card h2 {
  font-size: 18px;
  font-weight: 600;
}

html[data-theme="light"] .tc-card p {
  font-size: 14px;
  color: var(--muted);
}

html[data-theme="light"] .tc-card-meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

html[data-theme="light"] .tc-card::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top right, var(--accent-soft), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  pointer-events: none;
}

html[data-theme="light"] .tc-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.18);
  border-color: rgba(234, 179, 8, 0.40);
}

html[data-theme="light"] .tc-card:hover::after {
  opacity: 1;
  transform: translate3d(-4px, 4px, 0);
}

/* İki kolonlu tool sayfaları */
html[data-theme="light"] .tc-grid-2col {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  align-items: flex-start;
}

/* ================= FOOTER ================= */

html[data-theme="light"] .tc-footer {
  margin-top: 28px;
  font-size: 11px;
  color: var(--muted);
}

html[data-theme="light"] .tc-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

/* ================= FORM / INPUT GENEL ================= */

html[data-theme="light"] .tc-form-card,
html[data-theme="light"] .tc-poll-card,
html[data-theme="light"] .tc-tier-card,
html[data-theme="light"] .tc-rp-input-card,
html[data-theme="light"] .tc-rp-wheel-card {
  padding: 24px 20px 20px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

html[data-theme="light"] .tc-input,
html[data-theme="light"] .tc-select,
html[data-theme="light"] .tc-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.75);
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast);
}

html[data-theme="light"] .tc-input::placeholder,
html[data-theme="light"] .tc-textarea::placeholder {
  color: var(--muted);
}

html[data-theme="light"] .tc-input:focus,
html[data-theme="light"] .tc-select:focus,
html[data-theme="light"] .tc-textarea:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.28);
  background: #fffef5;
}

html[data-theme="light"] .tc-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Form builder içinde tekrar eden inputlar */

html[data-theme="light"] .tc-form-card input[type="text"],
html[data-theme="light"] .tc-form-card textarea,
html[data-theme="light"] .tc-form-card select {
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.75);
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast);
}

html[data-theme="light"] .tc-form-card input[type="text"]::placeholder,
html[data-theme="light"] .tc-form-card textarea::placeholder {
  color: var(--muted);
}

html[data-theme="light"] .tc-form-card input[type="text"]:focus,
html[data-theme="light"] .tc-form-card textarea:focus,
html[data-theme="light"] .tc-form-card select:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.25);
  background: #fffef3;
}

/* Çoktan seçmeli / checkbox seçenek text inputları */

html[data-theme="light"] .tc-opt-input {
  flex: 1;
  min-width: 80px;
  padding: 4px 2px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  outline: none;
}

html[data-theme="light"] .tc-opt-input::placeholder {
  color: var(--muted);
}

/* Çoktan seçmeli / checkbox wrapper */

html[data-theme="light"] .tc-opt-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.75);
  background: #ffffff;
  align-items: center;
}

html[data-theme="light"] .tc-opt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Chip */

html[data-theme="light"] .tc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--accent-strong);
  background: #fafafa;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10);
}

html[data-theme="light"] .tc-chip-label {
  white-space: nowrap;
}

html[data-theme="light"] .tc-chip-remove {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: none;
  background: #f1f5f9;
  color: var(--accent-strong);
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
}

html[data-theme="light"] .tc-chip-remove:hover {
  background: rgba(248, 113, 113, 0.16);
  color: #7f1d1d;
}

/* Soru bloklarında checkbox / radio */

html[data-theme="light"] .tc-q input[type="checkbox"],
html[data-theme="light"] .tc-q input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid rgba(148, 163, 184, 0.95);
  background: #ffffff;
  margin-right: 6px;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  transition: all var(--transition-fast);
}

html[data-theme="light"] .tc-q input[type="radio"] {
  border-radius: 999px;
}

html[data-theme="light"] .tc-q input[type="checkbox"]:hover,
html[data-theme="light"] .tc-q input[type="radio"]:hover {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.20);
}

html[data-theme="light"] .tc-q input[type="checkbox"]:checked,
html[data-theme="light"] .tc-q input[type="radio"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

html[data-theme="light"] .tc-q input[type="checkbox"]:checked::after {
  content: "✔";
  position: absolute;
  font-size: 11px;
  color: #ffffff;
  top: 0;
  left: 3px;
}

html[data-theme="light"] .tc-q input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ffffff;
  top: 3px;
  left: 3px;
}

/* ================= BUTTONS ================= */

html[data-theme="light"] .tc-btn-primary,
html[data-theme="light"] .tc-btn-outline,
html[data-theme="light"] .tc-btn-ghost,
html[data-theme="light"] .tc-q-remove {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

html[data-theme="light"] .tc-btn-primary {
  background: var(--accent);
  color: #111827;
  font-weight: 600;
  box-shadow: 0 16px 40px rgba(234, 179, 8, 0.28);
}

html[data-theme="light"] .tc-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 60px rgba(234, 179, 8, 0.38);
}

html[data-theme="light"] .tc-btn-outline {
  background: transparent;
  color: var(--accent-strong);
  border: 1px solid rgba(234, 179, 8, 1);
}

html[data-theme="light"] .tc-btn-outline:hover {
  background: rgba(234, 179, 8, 0.08);
  color: var(--accent);
}

html[data-theme="light"] .tc-btn-ghost {
  background: transparent;
  color: var(--muted);
}

html[data-theme="light"] .tc-btn-ghost:hover {
  background: rgba(148, 163, 184, 0.14);
  color: var(--accent-strong);
}

html[data-theme="light"] .tc-q-remove {
  margin-top: 4px;
  background: transparent;
  color: var(--error);
  border-radius: 8px;
  padding-inline: 10px;
}

html[data-theme="light"] .tc-q-remove:hover {
  background: rgba(248, 113, 113, 0.16);
}

/* ================= QUESTION BLOCKS ================= */

html[data-theme="light"] .tc-q {
  padding: 11px 11px 9px;
  border-radius: 15px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 8px;
}

html[data-theme="light"] .tc-q > div:first-child {
  font-size: 13px;
  color: var(--accent-strong);
  font-weight: 500;
}

html[data-theme="light"] .tc-q input[type="text"],
html[data-theme="light"] .tc-q textarea {
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.75);
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast);
}

html[data-theme="light"] .tc-q input[type="text"]::placeholder,
html[data-theme="light"] .tc-q textarea::placeholder {
  color: var(--muted);
}

html[data-theme="light"] .tc-q input[type="text"]:focus,
html[data-theme="light"] .tc-q textarea:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.30);
  background: #fffef7;
}

/* ================= LAYOUT HELPERS ================= */

html[data-theme="light"] .tc-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

html[data-theme="light"] .tc-inline > * {
  flex: 1;
}

html[data-theme="light"] .tc-inline .tc-badge {
  flex: 0 0 auto;
}

html[data-theme="light"] .tc-result {
  font-size: 13px;
  margin-top: 6px;
  color: var(--accent-strong);
  word-break: break-all;
}

html[data-theme="light"] .tc-link {
  font-family: monospace;
  font-size: 12px;
  color: var(--accent-strong);
}

/* Badge */

html[data-theme="light"] .tc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid var(--badge-border);
  color: var(--muted);
  background: var(--badge-bg);
}

/* ================= RESPONSES BOX ================= */

html[data-theme="light"] .tc-responses {
  margin-top: 12px;
  padding: 10px;
  border-radius: 15px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: var(--card-bg-soft);
  font-size: 12px;
  max-height: 260px;
  overflow-y: auto;
}
