/* ============================================================
   ÖYANSIMA — STYLE.CSS
   Dark Premium Theme | DM Serif Display + DM Sans
   ============================================================ */

/* ── 1. CSS DEĞİŞKENLERİ (Design Tokens) ─────────────────── */
:root {
  /* Renkler */
  --bg-base:        #0e0f11;   /* en koyu zemin */
  --bg-surface:     #161719;   /* kart / panel yüzeyi */
  --bg-elevated:    #1e2024;   /* modal, input gibi yükseltilmiş yüzeyler */
  --bg-hover:       #252830;   /* hover durumu */

  --accent:         #5b9cf6;   /* ana vurgu — sakin mavi */
  --accent-dim:     rgba(91, 156, 246, 0.12);
  --accent-glow:    rgba(91, 156, 246, 0.25);

  --emerald:        #4ecca3;   /* ikincil vurgu — zümrüt */
  --emerald-dim:    rgba(78, 204, 163, 0.10);

  --text-primary:   #e8eaf0;   /* ana metin */
  --text-secondary: #8b8fa8;   /* ikincil / açıklama metni */
  --text-muted:     #4a4e65;   /* çok soluk metin */

  --border:         rgba(255, 255, 255, 0.07);
  --border-focus:   rgba(91, 156, 246, 0.45);

  --danger:         #e06c75;
  --danger-dim:     rgba(224, 108, 117, 0.12);

  --success:        #4ecca3;

  /* Boyutlar */
  --sidebar-w:      240px;
  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --radius-xl:      28px;

  /* Gölgeler */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.35);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.50);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.65);

  /* Geçişler */
  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:   cubic-bezier(0.64, 0, 0.78, 0);
  --t-fast:    0.15s;
  --t-med:     0.28s;
  --t-slow:    0.45s;
}

/* ── 2. RESET & TEMEL ─────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.9375rem;        /* 15px */
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;

  /* İnce grain dokusu — arka planda hafif derinlik hissi */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

button { cursor: pointer; font-family: inherit; border: none; background: none; }
a { color: inherit; text-decoration: none; }
textarea, input { font-family: inherit; }
ul { list-style: none; }

/* Scrollbar — minimalist stil */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 99px; }

/* ── 3. YARDIMCI SINIFLAR ─────────────────────────────────── */
.hidden   { display: none !important; }
.sr-only  { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── 4. SIDEBAR ───────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 32px 20px;
  z-index: 100;
  transition: transform var(--t-med) var(--ease-out);
}

/* Marka alanı */
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
  padding-left: 4px;
}

.sidebar__brand-icon {
  font-size: 1.4rem;
  color: var(--accent);
  line-height: 1;
  /* Hafif dönen animasyon */
  display: inline-block;
  animation: spin-slow 12s linear infinite;
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

.sidebar__brand-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

/* Navigasyon */
.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  position: relative;
  overflow: hidden;
}

.nav-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-dim);
  opacity: 0;
  transition: opacity var(--t-fast);
  border-radius: inherit;
}

.nav-btn:hover { color: var(--text-primary); transform: translateX(2px); }
.nav-btn:hover::before { opacity: 1; }

.nav-btn.active {
  color: var(--accent);
  background: var(--accent-dim);
  font-weight: 500;
}

.nav-btn.active::after {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}

.nav-btn__icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* Sidebar alt tarih */
.sidebar__date {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-left: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── 5. TOPBAR (Mobil) ────────────────────────────────────── */
.topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 200;
}

.topbar__menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 2px 0;
}

.topbar__menu-btn span {
  display: block;
  height: 1.5px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform var(--t-med) var(--ease-out), opacity var(--t-fast);
}

/* Hamburger → X dönüşümü */
body.menu-open .topbar__menu-btn span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
body.menu-open .topbar__menu-btn span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
body.menu-open .topbar__menu-btn span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.topbar__title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.125rem;
}

.topbar__icon {
  color: var(--accent);
  font-size: 1.1rem;
}

/* Sidebar overlay (mobil) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 99;
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--t-med);
}

/* ── 6. ANA İÇERİK ────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 60px 48px;
  max-width: 820px;   /* okunabilirlik için sınırlandır */
}

/* ── 7. TAB PANELLERİ ─────────────────────────────────────── */
.tab-panel {
  display: none;
  animation: fadeSlideIn var(--t-med) var(--ease-out) forwards;
}

.tab-panel.active { display: block; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 8. ANA SAYFA — KARŞILAMA EKRANI ─────────────────────── */
.home-welcome {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  position: relative;
}

/* Arka planda parlak topuz efekti */
.home-welcome__orb {
  position: absolute;
  top: -80px; right: -120px;
  width: 420px; height: 420px;
  background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: pulse-orb 6s ease-in-out infinite alternate;
}

@keyframes pulse-orb {
  from { transform: scale(1); opacity: 0.6; }
  to   { transform: scale(1.15); opacity: 1; }
}

.home-welcome__date {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  position: relative; z-index: 1;
}

.home-welcome__title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-primary);
  position: relative; z-index: 1;
}

.home-welcome__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 380px;
  line-height: 1.7;
  position: relative; z-index: 1;
}

/* ── 9. ANA SAYFA — TAMAMLANDI EKRANI ─────────────────────── */
.home-done {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
}

.home-done__check {
  width: 64px; height: 64px;
  background: var(--emerald-dim);
  border: 1px solid rgba(78, 204, 163, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--emerald);
  animation: pop-in 0.5s var(--ease-out);
}

@keyframes pop-in {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.home-done__title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 400;
  color: var(--text-primary);
}

.home-done__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ── 10. PANEL BAŞLIĞI ────────────────────────────────────── */
.panel-header { margin-bottom: 36px; }

.panel-header__title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 400;
  margin-bottom: 6px;
}

.panel-header__sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ── 11. BUTONLAR ─────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  box-shadow: 0 0 0 0 var(--accent-glow);
  position: relative; z-index: 1;
}

.btn-primary:hover {
  background: #6faef8;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary__arrow {
  font-size: 1rem;
  transition: transform var(--t-fast);
}

.btn-primary:hover .btn-primary__arrow { transform: translateX(4px); }

.btn-primary.btn-small { padding: 10px 20px; font-size: 0.85rem; }
.btn-primary.btn-full  { width: 100%; justify-content: center; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ── 12. ARŞİV ────────────────────────────────────────────── */
.history-controls { margin-bottom: 24px; }

.search-input {
  width: 100%;
  max-width: 400px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* Arşiv kartları */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
  animation: fadeSlideIn var(--t-med) var(--ease-out) both;
}

.history-card:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
  transform: translateX(4px);
}

.history-card__left { display: flex; flex-direction: column; gap: 4px; }

.history-card__date {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}

.history-card__preview {
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-card__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-card__mood { font-size: 1.4rem; }

.history-card__arrow {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: transform var(--t-fast), color var(--t-fast);
}

.history-card:hover .history-card__arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* ── 13. SORU YÖNETİMİ ────────────────────────────────────── */
.question-add-form {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.q-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 0.875rem;
  resize: vertical;
  min-height: 60px;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  line-height: 1.5;
}

.q-input::placeholder { color: var(--text-muted); }

.q-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* Soru listesi */
.question-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.question-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color var(--t-fast);
  animation: fadeSlideIn var(--t-med) var(--ease-out) both;
}

.question-item:hover { border-color: var(--border-focus); }

.question-item__drag {
  color: var(--text-muted);
  cursor: grab;
  font-size: 0.85rem;
  padding-top: 2px;
  user-select: none;
  flex-shrink: 0;
}

.question-item__text {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.5;
}

/* Soru düzenleme textarea (inline edit) */
.question-item__edit-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.875rem;
  resize: none;
  outline: none;
  line-height: 1.5;
}

.question-item__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  width: 30px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: background var(--t-fast), color var(--t-fast);
}

.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.icon-btn--danger:hover { background: var(--danger-dim); color: var(--danger); }
.icon-btn--save:hover { background: var(--emerald-dim); color: var(--emerald); }

/* Soru no badge */
.question-item__num {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
  margin-top: 3px;
}

/* ── 14. MODAL ────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px 80px;
  overflow-y: auto;
  animation: backdropIn var(--t-med) var(--ease-out);
}

@keyframes backdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  padding: 36px;
  box-shadow: var(--shadow-lg);
  animation: modalIn var(--t-med) var(--ease-out);
  flex-shrink: 0;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.modal--read { max-width: 680px; }

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

.modal__date {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.modal__title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  font-weight: 400;
}

.modal__close {
  width: 36px; height: 36px;
  background: var(--bg-elevated);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  flex-shrink: 0;
}

.modal__close:hover {
  background: var(--danger-dim);
  color: var(--danger);
  transform: rotate(90deg);
}

/* Ruh hali seçici */
.mood-selector {
  margin-bottom: 28px;
  padding: 18px 20px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.mood-selector__label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.mood-options {
  display: flex;
  gap: 8px;
}

.mood-btn {
  font-size: 1.5rem;
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast);
  opacity: 0.45;
  filter: grayscale(0.4);
}

.mood-btn:hover { background: var(--bg-hover); opacity: 0.8; transform: scale(1.1); }

.mood-btn.selected {
  background: var(--accent-dim);
  border: 1px solid var(--border-focus);
  opacity: 1;
  filter: none;
  transform: scale(1.12);
}

/* Modal soru alanları */
.modal__questions {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.question-block { display: flex; flex-direction: column; gap: 8px; }

.question-block__label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.question-block__label span.q-num {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-radius: 4px;
  padding: 1px 6px;
  margin-right: 8px;
  vertical-align: middle;
}

.question-block__textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-primary);
  font-size: 0.9rem;
  resize: vertical;
  min-height: 100px;
  line-height: 1.7;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.question-block__textarea::placeholder { color: var(--text-muted); font-style: italic; }

.question-block__textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* Okuma modu cevap bloğu */
.read-answer {
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.read-answer--empty {
  color: var(--text-muted);
  font-style: italic;
  border-left-color: var(--text-muted);
}

.modal__footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ── 15. BOŞ DURUM ────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.empty-state__icon {
  font-size: 2rem;
  display: block;
  opacity: 0.4;
}

/* ── 16. TOAST BİLDİRİM ───────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-size: 0.875rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  z-index: 9999;
  pointer-events: none;
  transition: transform var(--t-med) var(--ease-out), opacity var(--t-med);
  opacity: 0;
  white-space: nowrap;
}

.toast.toast--show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.toast--success { border-color: rgba(78, 204, 163, 0.4); color: var(--emerald); }
.toast.toast--error   { border-color: rgba(224, 108, 117, 0.4); color: var(--danger); }

/* ── 17. RESPONSİVE (Mobil) ───────────────────────────────── */
@media (max-width: 768px) {
  /* Topbar'ı göster */
  .topbar { display: flex; }

  /* Sidebar varsayılan olarak gizli */
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
    box-shadow: var(--shadow-lg);
  }

  /* Sidebar açık hali */
  body.menu-open .sidebar { transform: translateX(0); }
  body.menu-open .sidebar-overlay { display: block; opacity: 1; }

  /* Ana içerik tam genişliğe yayılır, topbar kadar padding */
  .main-content {
    margin-left: 0;
    padding: 80px 20px 40px;
  }

  .modal { padding: 24px 20px; border-radius: var(--radius-lg); }
  .modal-backdrop { padding: 16px 12px 60px; }

  .mood-options { flex-wrap: wrap; }

  .history-card__preview { max-width: 180px; }
}

@media (max-width: 420px) {
  .home-welcome__title { font-size: 2rem; }
  .btn-primary { padding: 13px 22px; }
  .history-card { padding: 14px 16px; }
}


/* ============================================================
   🔧 MOBILE FIX & PERFORMANCE PATCH
   ============================================================ */

/* ── 1. GLOBAL TAŞMA ENGELLEME ───────────────────────────── */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* ── 2. ANA SAYFA TAŞMA FIX ─────────────────────────────── */
.home-welcome {
  overflow: hidden;
}

/* Orb mobilde küçült (istersen display:none yapabilirsin) */
@media (max-width: 768px) {
  .home-welcome__orb {
    width: 260px;
    height: 260px;
    right: -80px;
    top: -60px;
    animation: none; /* performans */
  }
}

/* ── 3. MAIN CONTENT FIX ───────────────────────────────── */
@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
    padding: 80px 16px 40px;
    max-width: 100%;
  }
}

/* ── 4. TEXT OVERFLOW FIX ─────────────────────────────── */
.question-block__textarea,
.read-answer,
.history-card__preview {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ── 5. MODAL PERFORMANS FIX ──────────────────────────── */
@media (max-width: 768px) {
  .modal-backdrop {
    backdrop-filter: none;
    background: rgba(0,0,0,0.85);
  }

  .modal {
    padding: 20px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }
}

/* ── 6. ANİMASYON OPTİMİZASYONU ───────────────────────── */
@media (max-width: 768px) {
  * {
    animation-duration: 0.2s !important;
    transition-duration: 0.2s !important;
  }

  .home-welcome__orb {
    animation: none;
  }
}

/* ── 7. BACKGROUND PERFORMANCE FIX ───────────────────── */
@media (max-width: 768px) {
  body {
    background-image: none;
  }
}

/* ── 8. HISTORY CARD FIX (taşmayı engelle) ───────────── */
@media (max-width: 768px) {
  .history-card {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .history-card__preview {
    max-width: 140px;
  }
}

/* ── 9. MODAL İÇERİK GENİŞLİK GÜVENCESİ ─────────────── */
.modal,
.modal__questions {
  max-width: 100%;
  overflow-x: hidden;
}

/* ── 10. INPUT GENİŞLİK GÜVENCESİ ───────────────────── */
textarea,
input {
  max-width: 100%;
}