/*
 * KlonoCopy Design System v1.0
 * Modern dark theme SaaS — Opus Clip / CapCut / Descript ilham
 * Tüm sayfalar bu CSS'i link eder → tutarlı görünüm
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ─── TOKENS ──────────────────────────────────────────────────────────── */
:root {
  /* Renkler */
  --ds-bg:         #09090b;
  --ds-surface:    #111113;
  --ds-surface-2:  #1a1a1f;
  --ds-surface-3:  #242429;
  --ds-border:     #27272a;
  --ds-border-hover: #3f3f46;

  --ds-accent:     #7c5cfc;
  --ds-accent-hover: #6d4fe0;
  --ds-accent-soft: rgba(124,92,252,0.12);
  --ds-accent-2:   #f472b6;

  --ds-success:    #34d399;
  --ds-error:      #f87171;
  --ds-warning:    #fbbf24;

  --ds-text:       #fafafa;
  --ds-text-2:     #a1a1aa;
  --ds-text-3:     #a0a0a0;  /* WCAG AA 4.5:1 on --ds-bg (was #71717a ~2:1) */

  /* Tipografi */
  --ds-font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ds-font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  --ds-text-xs:    11px;
  --ds-text-sm:    13px;
  --ds-text-base:  15px;
  --ds-text-lg:    17px;
  --ds-text-xl:    20px;
  --ds-text-2xl:   24px;
  --ds-text-3xl:   30px;

  /* Spacing (8px grid) */
  --ds-sp-1: 4px;
  --ds-sp-2: 8px;
  --ds-sp-3: 12px;
  --ds-sp-4: 16px;
  --ds-sp-5: 20px;
  --ds-sp-6: 24px;
  --ds-sp-8: 32px;
  --ds-sp-10: 40px;
  --ds-sp-12: 48px;

  /* Border radius */
  --ds-radius-sm:  6px;
  --ds-radius:     10px;
  --ds-radius-lg:  14px;
  --ds-radius-xl:  20px;
  --ds-radius-full: 9999px;

  /* Shadows */
  --ds-shadow-sm:  0 1px 2px rgba(0,0,0,0.4);
  --ds-shadow:     0 4px 12px rgba(0,0,0,0.3);
  --ds-shadow-lg:  0 8px 24px rgba(0,0,0,0.4);

  /* Transitions */
  --ds-ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --ds-duration:   150ms;
}

/* ─── RESET & BASE ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--ds-bg);
  color: var(--ds-text);
  font-family: var(--ds-font);
  font-size: var(--ds-text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--ds-accent-soft); color: var(--ds-text); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ds-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ds-text-3); }

/* ─── SKIP LINK (a11y WCAG 2.1) ───────────────────────────────────────── */
.ds-skip-link {
  position: absolute; top: -48px; left: 8px;
  background: var(--ds-accent); color: white;
  padding: 10px 18px; border-radius: var(--ds-radius);
  font-weight: 600; font-size: var(--ds-text-sm); text-decoration: none;
  z-index: 9999;
  transition: top 120ms var(--ds-ease);
}
.ds-skip-link:focus {
  top: 8px;
  outline: 3px solid white; outline-offset: 2px;
}

/* ─── GLOBAL FOCUS (a11y) ─────────────────────────────────────────────── */
*:focus { outline: none; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--ds-accent);
  outline-offset: 2px;
  border-radius: var(--ds-radius-sm);
}
/* Tighter focus for form controls (already have border) */
input.ds-input:focus-visible,
textarea.ds-textarea:focus-visible,
select.ds-select:focus-visible,
.ds-search input:focus-visible {
  outline: none;
  border-color: var(--ds-accent);
  box-shadow: 0 0 0 3px var(--ds-accent-soft);
}

/* ─── BUTTONS ─────────────────────────────────────────────────────────── */
.ds-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--ds-radius); border: none;
  font-family: var(--ds-font); font-size: var(--ds-text-sm); font-weight: 600;
  cursor: pointer; transition: all var(--ds-duration) var(--ds-ease);
  text-decoration: none; white-space: nowrap; line-height: 1;
}
.ds-btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.ds-btn-primary {
  background: var(--ds-accent); color: white;
  box-shadow: 0 1px 2px rgba(124,92,252,0.3);
}
.ds-btn-primary:hover { background: var(--ds-accent-hover); box-shadow: 0 4px 12px rgba(124,92,252,0.25); transform: translateY(-1px); }
.ds-btn-primary:active { transform: translateY(0); }

.ds-btn-secondary {
  background: var(--ds-surface-2); color: var(--ds-text);
  border: 1px solid var(--ds-border);
}
.ds-btn-secondary:hover { border-color: var(--ds-border-hover); background: var(--ds-surface-3); }

.ds-btn-ghost {
  background: transparent; color: var(--ds-text-2);
  border: 1px solid transparent;
}
.ds-btn-ghost:hover { background: var(--ds-surface-2); color: var(--ds-text); }

.ds-btn-sm { padding: 6px 14px; font-size: var(--ds-text-xs); }
.ds-btn-lg { padding: 14px 28px; font-size: var(--ds-text-base); }
.ds-btn-full { width: 100%; }
.ds-btn-icon { padding: 10px; width: 40px; height: 40px; }

/* ─── CARDS ───────────────────────────────────────────────────────────── */
.ds-card {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  padding: var(--ds-sp-6);
  transition: border-color var(--ds-duration) var(--ds-ease), box-shadow var(--ds-duration) var(--ds-ease);
}
.ds-card:hover { border-color: var(--ds-border-hover); }
.ds-card-interactive { cursor: pointer; }
.ds-card-interactive:hover { border-color: var(--ds-accent); box-shadow: var(--ds-shadow); }
.ds-card-selected { border-color: var(--ds-accent); background: var(--ds-accent-soft); }

.ds-card-header { margin-bottom: var(--ds-sp-4); }
.ds-card-title { font-size: var(--ds-text-lg); font-weight: 700; }
.ds-card-desc { font-size: var(--ds-text-sm); color: var(--ds-text-2); margin-top: var(--ds-sp-1); }

/* ─── FORMS ───────────────────────────────────────────────────────────── */
.ds-input, .ds-textarea, .ds-select {
  width: 100%; padding: 10px 14px;
  background: var(--ds-surface); border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius); color: var(--ds-text);
  font-family: var(--ds-font); font-size: var(--ds-text-sm);
  outline: none; transition: border-color var(--ds-duration) var(--ds-ease);
}
.ds-input:focus, .ds-textarea:focus, .ds-select:focus {
  border-color: var(--ds-accent); box-shadow: 0 0 0 3px var(--ds-accent-soft);
}
.ds-input::placeholder, .ds-textarea::placeholder { color: var(--ds-text-3); }
.ds-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.ds-label {
  display: block; font-size: var(--ds-text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--ds-text-3); margin-bottom: var(--ds-sp-2);
}

/* ─── CHIPS / TABS ────────────────────────────────────────────────────── */
.ds-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--ds-radius-full);
  border: 1px solid var(--ds-border); background: var(--ds-surface-2);
  color: var(--ds-text-2); font-size: var(--ds-text-xs); font-weight: 600;
  cursor: pointer; transition: all var(--ds-duration) var(--ds-ease);
}
.ds-chip:hover { border-color: var(--ds-accent); color: var(--ds-text); }
.ds-chip-active, .ds-chip.active {
  background: var(--ds-accent); color: white; border-color: var(--ds-accent);
}

.ds-tabs {
  display: flex; gap: 0; border-radius: var(--ds-radius); overflow: hidden;
  border: 1px solid var(--ds-border);
}
.ds-tab {
  flex: 1; padding: 10px 0; border: none;
  background: var(--ds-surface-2); color: var(--ds-text-3);
  font-family: var(--ds-font); font-size: var(--ds-text-sm); font-weight: 600;
  cursor: pointer; transition: all var(--ds-duration) var(--ds-ease);
}
.ds-tab:hover:not(.active) { background: var(--ds-surface-3); color: var(--ds-text-2); }
.ds-tab.active { background: var(--ds-accent); color: white; }

/* ─── BADGES ──────────────────────────────────────────────────────────── */
.ds-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--ds-radius-full);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.ds-badge-accent { background: var(--ds-accent-soft); color: var(--ds-accent); }
.ds-badge-success { background: rgba(52,211,153,0.15); color: var(--ds-success); }
.ds-badge-warning { background: rgba(251,191,36,0.15); color: var(--ds-warning); }

/* ─── HEADER ──────────────────────────────────────────────────────────── */
.ds-header {
  padding: var(--ds-sp-4) var(--ds-sp-8);
  background: var(--ds-surface);
  border-bottom: 1px solid var(--ds-border);
  display: flex; align-items: center; justify-content: space-between;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
}
.ds-logo {
  font-size: var(--ds-text-xl); font-weight: 800;
  color: var(--ds-accent); text-decoration: none;
}
.ds-logo span { color: var(--ds-accent-2); }

/* ─── TYPOGRAPHY HIERARCHY ────────────────────────────────────────────── */
/* Semantic tag selectors — pages using <h1>, <h2>, <h3> auto-inherit */
h1, .ds-h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
h2, .ds-h2 { font-size: clamp(22px, 3.2vw, 30px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.22; }
h3, .ds-h3 { font-size: var(--ds-text-xl); font-weight: 700; line-height: 1.3; }
h4, .ds-h4 { font-size: var(--ds-text-lg); font-weight: 700; line-height: 1.35; }
h5, .ds-h5 { font-size: var(--ds-text-base); font-weight: 600; line-height: 1.4; }
h6 { font-size: var(--ds-text-sm); font-weight: 600; line-height: 1.4; color: var(--ds-text-2); }
.ds-lead { font-size: var(--ds-text-lg); color: var(--ds-text-2); line-height: 1.55; }
.ds-body { font-size: var(--ds-text-base); line-height: 1.6; }
.ds-body-sm { font-size: var(--ds-text-sm); line-height: 1.5; }
.ds-caption { font-size: var(--ds-text-xs); color: var(--ds-text-3); line-height: 1.4; }
.ds-eyebrow {
  font-size: var(--ds-text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ds-accent);
}

/* Section title (eyebrow-style heading for cards/panels) */
.ds-section-title {
  font-size: var(--ds-text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--ds-text-3); margin-bottom: var(--ds-sp-4);
}

/* Normalize page-specific ad-hoc classes to DS tokens (no HTML rewrite needed) */
/* panel/section patterns exist in studio/mascot/app — route to DS sizes */
.panel-title { font-size: var(--ds-text-2xl); font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.panel-desc { font-size: var(--ds-text-sm); color: var(--ds-text-2); line-height: 1.55; }
.section-title:not(.ds-section-title) { font-size: var(--ds-text-lg); font-weight: 700; line-height: 1.35; }
.section-label { font-size: var(--ds-text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--ds-text-3); }
.section-kicker { font-size: var(--ds-text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: var(--ds-accent); }

/* ─── UTILITY ─────────────────────────────────────────────────────────── */
.ds-flex { display: flex; }
.ds-flex-center { display: flex; align-items: center; justify-content: center; }
.ds-gap-2 { gap: var(--ds-sp-2); }
.ds-gap-3 { gap: var(--ds-sp-3); }
.ds-gap-4 { gap: var(--ds-sp-4); }
.ds-text-muted { color: var(--ds-text-2); }
.ds-text-xs { font-size: var(--ds-text-xs); }
.ds-text-sm { font-size: var(--ds-text-sm); }
.ds-mt-4 { margin-top: var(--ds-sp-4); }
.ds-mb-4 { margin-bottom: var(--ds-sp-4); }
.ds-mb-6 { margin-bottom: var(--ds-sp-6); }

/* ─── ICONS (inline SVG helper) ───────────────────────────────────────── */
.ds-icon {
  display: inline-block; width: 18px; height: 18px; flex-shrink: 0;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: middle;
}
.ds-icon-sm { width: 14px; height: 14px; }
.ds-icon-lg { width: 24px; height: 24px; }

/* ─── SEARCH INPUT (icon prefix) ──────────────────────────────────────── */
.ds-search {
  position: relative; width: 100%;
}
.ds-search .ds-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ds-text-3); pointer-events: none;
}
.ds-search input {
  width: 100%; padding: 10px 14px 10px 38px;
  background: var(--ds-surface); border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius); color: var(--ds-text);
  font-family: var(--ds-font); font-size: var(--ds-text-sm);
  outline: none; transition: border-color var(--ds-duration) var(--ds-ease);
}
.ds-search input:focus { border-color: var(--ds-accent); box-shadow: 0 0 0 3px var(--ds-accent-soft); }
.ds-search input::placeholder { color: var(--ds-text-3); }

/* ─── SIDEBAR NAV ─────────────────────────────────────────────────────── */
.ds-nav-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 14px; margin: 2px 0;
  border: none; background: transparent; color: var(--ds-text-2);
  font-family: var(--ds-font); font-size: var(--ds-text-sm); font-weight: 500;
  text-align: left; cursor: pointer; border-radius: var(--ds-radius);
  position: relative; transition: all var(--ds-duration) var(--ds-ease);
}
.ds-nav-item:hover { background: var(--ds-surface-2); color: var(--ds-text); }
.ds-nav-item.active {
  background: var(--ds-accent-soft); color: var(--ds-accent);
  font-weight: 600;
}
.ds-nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px;
  width: 3px; background: var(--ds-accent); border-radius: 0 3px 3px 0;
}
.ds-nav-item .ds-icon { color: inherit; }
.ds-nav-group-label {
  display: block; padding: 14px 14px 6px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--ds-text-3);
}

/* ─── SKELETON LOADER ─────────────────────────────────────────────────── */
.ds-skeleton {
  display: block; background: linear-gradient(90deg,
    var(--ds-surface-2) 0%, var(--ds-surface-3) 50%, var(--ds-surface-2) 100%);
  background-size: 200% 100%;
  animation: ds-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--ds-radius-sm);
}
.ds-skeleton-line { height: 12px; margin-bottom: 8px; }
.ds-skeleton-line:last-child { margin-bottom: 0; }
.ds-skeleton-card { height: 140px; border-radius: var(--ds-radius-lg); margin-bottom: 12px; }
.ds-skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }
@keyframes ds-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── EMPTY STATE ─────────────────────────────────────────────────────── */
.ds-empty {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 48px 24px;
  background: var(--ds-surface); border: 1px dashed var(--ds-border);
  border-radius: var(--ds-radius-lg);
}
.ds-empty-icon {
  width: 48px; height: 48px; margin-bottom: 16px;
  color: var(--ds-text-3);
}
.ds-empty-title {
  font-size: var(--ds-text-base); font-weight: 600;
  color: var(--ds-text); margin-bottom: 6px;
}
.ds-empty-desc {
  font-size: var(--ds-text-sm); color: var(--ds-text-2);
  max-width: 360px; line-height: 1.5; margin-bottom: 16px;
}
.ds-empty-action { margin-top: 4px; }

/* ─── TOOLTIP ─────────────────────────────────────────────────────────── */
[data-ds-tooltip] { position: relative; }
[data-ds-tooltip]::after {
  content: attr(data-ds-tooltip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  padding: 6px 10px; border-radius: 6px;
  background: #0a0a0c; color: var(--ds-text);
  font-size: var(--ds-text-xs); font-weight: 500; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 120ms var(--ds-ease), transform 120ms var(--ds-ease);
  z-index: 1000; box-shadow: var(--ds-shadow);
}
[data-ds-tooltip]::before {
  content: ''; position: absolute; bottom: calc(100% + 2px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 4px solid transparent; border-top-color: #0a0a0c;
  opacity: 0; pointer-events: none;
  transition: opacity 120ms var(--ds-ease), transform 120ms var(--ds-ease);
  z-index: 1000;
}
[data-ds-tooltip]:hover::after,
[data-ds-tooltip]:hover::before {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
[data-ds-tooltip-pos="right"]::after {
  bottom: auto; left: calc(100% + 8px); top: 50%;
  transform: translateY(-50%) translateX(4px);
}
[data-ds-tooltip-pos="right"]::before {
  bottom: auto; left: calc(100% + 2px); top: 50%;
  transform: translateY(-50%) translateX(4px);
  border: 4px solid transparent; border-right-color: #0a0a0c;
}
[data-ds-tooltip-pos="right"]:hover::after,
[data-ds-tooltip-pos="right"]:hover::before {
  transform: translateY(-50%) translateX(0);
}

/* ─── INFO CARD ───────────────────────────────────────────────────────── */
.ds-info-card {
  display: flex; gap: 12px;
  padding: 14px 16px; border-radius: var(--ds-radius);
  background: var(--ds-accent-soft); border: 1px solid rgba(124,92,252,0.24);
  font-size: var(--ds-text-sm); color: var(--ds-text-2); line-height: 1.5;
}
.ds-info-card .ds-icon { color: var(--ds-accent); margin-top: 2px; }
.ds-info-card strong { color: var(--ds-text); }

/* ─── SPINNER ─────────────────────────────────────────────────────────── */
.ds-spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--ds-border); border-top-color: var(--ds-accent);
  border-radius: 50%; animation: ds-spin 0.8s linear infinite;
  vertical-align: middle;
}
.ds-spinner-lg { width: 28px; height: 28px; border-width: 3px; }
@keyframes ds-spin { to { transform: rotate(360deg); } }

/* ─── STEPPER (wizard) ────────────────────────────────────────────────── */
.ds-stepper {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 10px;
}
.ds-step-dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--ds-surface-2); border: 2px solid var(--ds-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--ds-text-3);
  transition: all var(--ds-duration) var(--ds-ease);
}
.ds-step-dot.active {
  background: var(--ds-accent); border-color: var(--ds-accent); color: white;
  box-shadow: 0 0 0 4px var(--ds-accent-soft);
}
.ds-step-dot.done {
  background: rgba(52,211,153,0.16); border-color: var(--ds-success); color: var(--ds-success);
}
.ds-step-line {
  flex: 1; height: 2px; background: var(--ds-border); margin: 0 6px;
  transition: background var(--ds-duration) var(--ds-ease);
}
.ds-step-line.done { background: var(--ds-success); }
.ds-step-labels {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--ds-text-3); font-weight: 600;
}
.ds-step-labels span { flex: 1; text-align: center; }
.ds-step-labels span:first-child { text-align: left; }
.ds-step-labels span:last-child { text-align: right; }
.ds-step-labels span.active { color: var(--ds-accent); }

/* ─── TOAST ───────────────────────────────────────────────────────────── */
.ds-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ds-surface-2); color: var(--ds-text);
  border: 1px solid var(--ds-border); border-radius: var(--ds-radius);
  padding: 12px 18px; font-size: var(--ds-text-sm); font-weight: 500;
  box-shadow: var(--ds-shadow-lg);
  opacity: 0; pointer-events: none;
  transition: transform 240ms var(--ds-ease), opacity 240ms var(--ds-ease);
  z-index: 10000; max-width: calc(100vw - 32px);
  display: inline-flex; align-items: center; gap: 10px;
}
.ds-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1; pointer-events: auto;
}
.ds-toast-success { border-color: var(--ds-success); }
.ds-toast-success::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ds-success); flex-shrink: 0; }
.ds-toast-error { border-color: var(--ds-error); }
.ds-toast-error::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ds-error); flex-shrink: 0; }
.ds-toast-warning { border-color: var(--ds-warning); }
.ds-toast-warning::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ds-warning); flex-shrink: 0; }

/* ─── MODAL ───────────────────────────────────────────────────────────── */
.ds-modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.ds-modal-backdrop.open { display: flex; animation: ds-fadeIn 160ms var(--ds-ease); }
.ds-modal {
  background: var(--ds-surface); border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  width: 100%; max-width: 520px; max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: var(--ds-shadow-lg);
}
.ds-modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--ds-border);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  position: sticky; top: 0; background: var(--ds-surface); z-index: 1;
}
.ds-modal-title { font-size: var(--ds-text-lg); font-weight: 700; line-height: 1.3; }
.ds-modal-desc { font-size: var(--ds-text-sm); color: var(--ds-text-2); margin-top: 4px; }
.ds-modal-close {
  background: transparent; border: none; color: var(--ds-text-2);
  cursor: pointer; padding: 4px; border-radius: var(--ds-radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 150ms var(--ds-ease);
}
.ds-modal-close:hover { color: var(--ds-text); background: var(--ds-surface-2); }
.ds-modal-body { padding: 20px 24px; }
.ds-modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--ds-border);
  display: flex; justify-content: flex-end; gap: 8px;
  position: sticky; bottom: 0; background: var(--ds-surface);
}

/* ─── ANIMATION ───────────────────────────────────────────────────────── */
@keyframes ds-fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ds-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.ds-animate-in { animation: ds-fadeIn 0.3s var(--ds-ease) both; }
.ds-animate-pulse { animation: ds-pulse 1.5s ease-in-out infinite; }

/* ─── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ds-header { padding: var(--ds-sp-3) var(--ds-sp-4); }
  .ds-card { padding: var(--ds-sp-4); }
  /* WCAG 2.5.5 — touch target min 44x44 on mobile */
  .ds-btn,
  .ds-btn-sm,
  .ds-btn-icon,
  .ds-chip,
  .ds-tab,
  .ds-nav-item { min-height: 44px; }
  .ds-btn-sm { padding: 10px 16px; font-size: var(--ds-text-sm); }
  .ds-btn-lg { padding: 12px 20px; }
  .ds-btn-icon { width: 44px; height: 44px; }
}

/* Küçük ekranlar (phone) — 2-col grid'leri 1-col'a düşür + tipografi sıkılaştır */
@media (max-width: 480px) {
  /* Sayfa-local grid override'ları — studio/app/mascot/dashboard ortak pattern'leri */
  .bg-grid,
  .bg-grid-m,
  .mannequin-grid,
  .scene-grid,
  .carousel-grid,
  .template-grid,
  .history-grid,
  .ps-grid,
  .mascot-grid,
  .format-grid,
  .voice-grid { grid-template-columns: 1fr !important; gap: 10px !important; }

  /* Modal body daralsın */
  .modal,
  .share-modal,
  .paytr-modal { width: 94vw !important; max-width: 94vw !important; padding: 20px !important; }
  .modal-header h3,
  .share-modal h3 { font-size: 17px !important; }

  /* Chip/tab taşması */
  .ds-tabs,
  .tabs { flex-wrap: wrap; gap: 4px; }

  /* Hero tipografi — landing clamp zaten var, extra sıkılaştır */
  .hero h1 { font-size: clamp(32px, 9vw, 44px) !important; letter-spacing: -0.02em; }
  .hero { padding: 120px 20px 48px !important; }

  /* Section padding */
  .section { padding: 56px 20px !important; }

  /* Card padding */
  .ds-card,
  .card,
  .feature-card,
  .step-card,
  .carousel-card { padding: 16px !important; }

  /* Button full-width default — small screens */
  .btn-mobile-full { width: 100%; }

  /* Cost badge / pill küçült */
  .cost-badge { font-size: 10px !important; padding: 2px 6px !important; }
}
