/* ============================================================
   ZepPrompter — styles.css
   Koyu tema teleprompter web uygulaması
   Mobil öncelikli, dikey + yatay responsive, safe-area destekli
   ============================================================ */

/* ---------- Değişkenler ---------- */
:root {
  --bg-app: #0b0b0b;          /* genel uygulama arka planı */
  --bg-black: #000000;        /* prompter tam siyah */
  --bg-elev: #161616;         /* yükseltilmiş yüzey (kart, input) */
  --bg-elev-2: #1f1f1f;       /* daha yüksek yüzey */
  --border: #2a2a2a;          /* ince çizgiler */
  --border-strong: #3a3a3a;

  --text: #f2f2f2;            /* ana metin */
  --text-muted: #9a9a9a;      /* soluk metin */
  --text-dim: #6d6d6d;        /* çok soluk */

  --accent: #2ea043;          /* vurgu (Zep yeşili — marka) */
  --accent-hover: #3fb457;
  --accent-press: #268537;
  --danger: #e74c5e;          /* kırmızı */
  --danger-hover: #f0566c;

  --radius: 12px;
  --radius-sm: 9px;
  --radius-lg: 18px;

  --tap: 44px;                /* minimum dokunma alanı */

  --ease: cubic-bezier(.2, .7, .3, 1);
  --dur: .2s;

  /* güvenli alanlar */
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
}

/* ---------- Reset / temel ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--bg-app);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  overflow: hidden;                 /* yatay/dikey sayfa scroll'u yok */
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input,
textarea {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  background: var(--bg-elev-2);
  padding: .1em .4em;
  border-radius: 6px;
  color: #a9e6b8;
}

::selection {
  background: rgba(46, 160, 67,.45);
  color: #fff;
}

/* ============================================================
   EKRAN GEÇİŞ KONTRATI
   ============================================================ */
.screen {
  display: none;
}

.screen.is-active {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0;
  min-height: 100dvh;
  background: var(--bg-app);
  padding: var(--sat) var(--sar) var(--sab) var(--sal);
}

/* Ortalanmış kutulu ekranlar (loading / setup / login) */
#screen-loading.is-active,
#screen-setup.is-active,
#screen-login.is-active {
  align-items: center;
  justify-content: center;
}

/* ============================================================
   ORTA KUTU (center-box)
   ============================================================ */
.center-box {
  width: 100%;
  max-width: 380px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.05;
  margin-bottom: 4px;
}

/* Terminal imleci — monospace, yanıp sönen */
.logo-caret {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  color: var(--accent);
  margin-right: 2px;
  animation: zp-caret-blink 1.1s steps(1, end) infinite;
}

@keyframes zp-caret-blink {
  0%, 50% {
    opacity: 1;
  }
  50.01%, 100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-caret {
    animation: none;
    opacity: 1;
  }
}

/* Marka adı — düz beyaz, kalın */
.logo-name {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -.02em;
}

/* Gerçek logo (SVG) — koyu zemin için beyaz sürüm */
.logo-img {
  display: block;
  width: clamp(200px, 72vw, 300px);
  height: auto;
  margin: 0 auto 4px;
}

.muted {
  color: var(--text-muted);
  margin: 0;
}

.small {
  font-size: 13px;
}

.error {
  color: var(--danger);
  font-size: 14px;
  margin: 0;
  font-weight: 500;
}

.error[hidden] {
  display: none;
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .12);
  border-top-color: var(--accent);
  animation: zp-spin .8s linear infinite;
}

@keyframes zp-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 1.6s;
  }
}

/* ============================================================
   BUTONLAR
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--bg-elev-2);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform .08s var(--ease),
              opacity var(--dur) var(--ease);
}

.btn:active {
  transform: scale(.97);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn[hidden] {
  display: none;
}

.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

/* Primary — vurgu */
.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:active {
  background: var(--accent-press);
}

/* Ghost — şeffaf */
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, .06);
  color: var(--text);
}

/* Outline */
.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(46, 160, 67,.1);
}

/* Danger */
.btn-danger {
  background: transparent;
  border-color: rgba(231, 76, 94, .5);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

/* Giriş formu (şifre) */
.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  font-size: 16px;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  outline: none;
  transition: border-color var(--dur) var(--ease);
}

.login-input::placeholder {
  color: var(--text-muted);
}

.login-input:focus {
  border-color: var(--accent);
}

.login-form .btn {
  width: 100%;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: none;
  min-height: 56px;
  padding: 8px 14px;
  background: var(--bg-app);
  border-bottom: 1px solid var(--border);
}

.topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

/* Düzenleyici topbar'da başlık ortada */
#screen-editor .topbar-title {
  text-align: center;
  flex: 1 1 auto;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

/* ============================================================
   KATEGORİ ÇUBUĞU (yatay kaydırılabilir chip'ler)
   ============================================================ */
.category-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px calc(12px + var(--sar)) 8px calc(12px + var(--sal));
  background: var(--bg-app);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;               /* Firefox — çubuk gizli */
}

.category-bar::-webkit-scrollbar {
  display: none;                       /* WebKit — çubuk gizli */
}

/* Boşken çubuğu gizle (JS hidden ekleyebilir) */
.category-bar:empty,
.category-bar[hidden] {
  display: none;
}

.cat-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              transform .08s var(--ease);
}

.cat-chip:hover {
  background: var(--bg-elev-2);
  border-color: var(--border-strong);
}

.cat-chip:active {
  transform: scale(.95);
}

.cat-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Seçili kategori */
.cat-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.cat-chip.active:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* "+ Kategori" ekleme chip'i */
.cat-chip.cat-add {
  background: transparent;
  border-style: dashed;
  border-color: var(--border-strong);
  color: var(--text-muted);
}

.cat-chip.cat-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(46, 160, 67,.08);
}

/* ============================================================
   İÇERİK ALANI
   ============================================================ */
.content {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px;
  padding-bottom: calc(14px + var(--sab));
}

/* ============================================================
   NOT LİSTESİ
   ============================================================ */
.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  user-select: none;
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform .08s var(--ease);
}

.note-item:hover {
  background: var(--bg-elev-2);
  border-color: var(--border-strong);
}

.note-item:active {
  transform: scale(.99);
}

.note-item > .note-main,
.note-item .note-body {
  flex: 1 1 auto;
  min-width: 0;
}

.note-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-meta {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.note-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.note-actions .btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

/* "Kullanıldı" checkbox — büyük, dokunmatik dostu */
.note-used {
  flex: none;
  width: 26px;
  height: 26px;
  margin: 0 2px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}

.note-used:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Kullanılmış kayıt — "tamamlandı" görünümü */
.note-item.is-used {
  opacity: .65;
}

.note-item.is-used .note-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Kategori rozeti — .note-meta içinde küçük pill */
.note-cat {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(46, 160, 67,.16);
  color: #8fe0a0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  vertical-align: middle;
}

/* Boş durum */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  min-height: 50dvh;
  color: var(--text-muted);
  padding: 24px;
}

.empty[hidden] {
  display: none;
}

.empty p {
  margin: 0;
}

.empty strong {
  color: var(--text);
}

/* ============================================================
   DÜZENLEYİCİ
   ============================================================ */
.editor-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  padding-bottom: calc(14px + var(--sab));
  overflow: hidden;              /* iç textarea kendi scroll'u */
}

/* Kategori seçimi satırı */
.editor-catrow {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.editor-catlabel {
  flex: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.editor-category {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 40px 0 14px;
  background-color: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  /* özel açılır ok (mor) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232ea043' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color var(--dur) var(--ease);
}

.editor-category:focus {
  border-color: var(--accent);
}

/* açılır menü seçenekleri koyu (destekleyen tarayıcılarda) */
.editor-category option {
  background: var(--bg-elev);
  color: var(--text);
}

.editor-title {
  flex: none;
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
  outline: none;
  transition: border-color var(--dur) var(--ease);
}

.editor-title::placeholder {
  color: var(--text-dim);
  font-weight: 500;
}

.editor-title:focus {
  border-color: var(--accent);
}

.editor-body {
  flex: 1 1 auto;
  width: 100%;
  min-height: 120px;
  padding: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  outline: none;
  resize: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: border-color var(--dur) var(--ease);
}

.editor-body::placeholder {
  color: var(--text-dim);
}

.editor-body:focus {
  border-color: var(--accent);
}

.editor-footer {
  flex: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.editor-footer .btn {
  flex: 1 1 auto;
}

.editor-footer .btn-danger {
  flex: 0 0 auto;
}

/* ============================================================
   PROMPTER EKRANI
   ============================================================ */
.prompter-screen.is-active {
  background: var(--bg-black);
  padding: 0;                    /* tam siyah, kenardan kenara */
  overflow: hidden;
}

.prompter-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bg-black);
  touch-action: none;   /* parmakla dikey sürükleme sayfa jestlerini tetiklemesin */
}

.prompter-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
}

.prompter-text {
  color: var(--text);
  text-align: center;
  font-size: 64px;                     /* JS inline ile ezilir */
  line-height: 1.4;                    /* JS inline ile ezilir */
  font-weight: 600;
  padding-left: 6%;                    /* JS inline ile ezilebilir */
  padding-right: 6%;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  /* üst/alt büyük boşluk JS padding ile verilir — engellenmez */
}

/* Okuma referans çizgisi — dikey ortada */
.reading-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
  background: rgba(46, 160, 67,.55);
  box-shadow: 0 0 12px rgba(46, 160, 67,.5);
  pointer-events: none;
  z-index: 5;
}

/* ---------- Prompter üst çubuk ---------- */
.prompter-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(10px + var(--sat)) calc(14px + var(--sar)) 10px calc(14px + var(--sal));
  background: linear-gradient(to bottom, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0));
  user-select: none;
  transition: opacity var(--dur) var(--ease);
}

.prompter-topbar.hidden {
  opacity: 0;
  pointer-events: none;
}

.prompter-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}

/* ---------- Prompter alt kontrol paneli ---------- */
.prompter-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px calc(14px + var(--sar)) calc(16px + var(--sab)) calc(14px + var(--sal));
  background: linear-gradient(to top, rgba(0, 0, 0, .9) 55%, rgba(0, 0, 0, 0));
  user-select: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.prompter-controls.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.ctrl-row {
  display: flex;
  align-items: center;
}

.ctrl-main {
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px 22px;
}

/* ---------- İlerleme / konum çubuğu (seek) ---------- */
.ctrl-seek {
  padding: 0 4px;
}

.seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;                 /* dokunma alanı geniş */
  margin: 0;
  background: transparent;      /* iz ::track ile çizilir */
  cursor: pointer;
  touch-action: none;           /* sürüklerken sayfa kaymasın */
}

/* İz (track) — WebKit */
.seek::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
}

/* İz — Firefox */
.seek::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
}

/* Doldurulan kısım — Firefox */
.seek::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

/* Tutamaç (thumb) — WebKit */
.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;             /* 6px iz ile dikey ortala */
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 8px rgba(46, 160, 67, .6);
}

/* Tutamaç — Firefox */
.seek::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 8px rgba(46, 160, 67, .6);
}

.seek:focus-visible {
  outline: none;
}
.seek:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(46, 160, 67, .5);
}

/* Ayar paneli — varsayılan gizli */
.ctrl-panel {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: rgba(20, 20, 20, .82);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ctrl-panel.open {
  display: flex;
}

/* Ayar paneli üst başlık + kapatma (▼) */
.ctrl-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 6px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.ctrl-panel-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pbtn-collapse {
  min-width: 44px;
  min-height: 36px;
  padding: 0 12px;
  font-size: 15px;
}

/* Ayarları aç butonu (kapalıyken görünen minimal ▲) */
.pbtn-settings {
  font-size: 15px;
}

.ctrl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--tap);
  padding: 4px 10px;
}

.ctrl-item > label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

/* Stepper (− değer +) */
.stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.val {
  min-width: 48px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Toggle satırı */
.toggles {
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============================================================
   PROMPTER BUTONLARI (.pbtn)
   ============================================================ */
.pbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  user-select: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform .08s var(--ease),
              color var(--dur) var(--ease);
}

.pbtn:hover {
  background: rgba(255, 255, 255, .14);
}

.pbtn:active {
  transform: scale(.94);
}

.pbtn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Stepper içindeki − / + butonları kompakt kare */
.stepper .pbtn {
  min-width: var(--tap);
  padding: 0;
  font-size: 22px;
  font-weight: 700;
}

/* Ana oynat butonu — büyük vurgulu */
.pbtn-play {
  min-width: 68px;
  min-height: 68px;
  border-radius: 50%;
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  font-size: 26px;
  box-shadow: 0 6px 22px rgba(46, 160, 67,.45);
}

.pbtn-play:hover {
  background: var(--accent-hover);
}

.pbtn-play:active {
  background: var(--accent-press);
}

/* Toggle butonu aktif durumu */
.tgl.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tgl.active:hover {
  background: var(--accent-hover);
}

/* ---------- Kısa bildirim (toast) ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--sab));
  transform: translate(-50%, 12px);
  z-index: 100;
  max-width: min(86vw, 420px);
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(28, 28, 28, .95);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Buton içi SVG ikonları (restart / yenile) — her cihazda net render */
.pbtn-ico {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
}

/* Yenile butonu — topbar'da kompakt kare, sağda */
.pbtn-reload {
  min-width: var(--tap);
  padding: 0;
  flex: 0 0 auto;
}

/* Yenilenirken ikon döner */
.pbtn-reload.loading {
  pointer-events: none;
  opacity: .8;
}
.pbtn-reload.loading .pbtn-ico {
  animation: pbtn-spin .8s linear infinite;
  transform-origin: 50% 50%;
}
@keyframes pbtn-spin {
  to { transform: rotate(360deg); }
}

/* Yön butonu (Oto / Yatay / Dikey) — kompakt, yazı sığsın */
.pbtn-orient {
  min-width: 52px;
  padding: 0 12px;
  font-size: 13.5px;
  font-weight: 600;
}

/* Yön kilitliyken vurgulu */
.pbtn-orient.locked {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pbtn-orient.locked:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* ============================================================
   RESPONSIVE — YATAY (landscape) düzen
   ============================================================ */
@media (orientation: landscape) and (max-height: 560px) {
  /* Ortalanmış kutular yatayda taşmasın, scroll edilebilir olsun */
  #screen-loading.is-active,
  #screen-setup.is-active,
  #screen-login.is-active {
    overflow-y: auto;
  }

  .center-box {
    padding: 18px 24px;
    gap: 12px;
  }

  .logo {
    font-size: clamp(24px, 5vh, 34px);
  }

  /* Prompter kontrolleri yatayda daha derli toplu */
  .prompter-controls {
    padding-top: 10px;
    gap: 8px;
  }

  .ctrl-main {
    gap: 18px;
  }

  .pbtn-play {
    min-width: 58px;
    min-height: 58px;
    font-size: 22px;
  }

  /* Ayar paneli yatayda 2 sütun — daha az dikey yer kaplasın */
  .ctrl-panel.open {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
  }

  .ctrl-panel-head,
  .toggles {
    grid-column: 1 / -1;
  }
}

/* Çok dar ekranlar */
@media (max-width: 360px) {
  .topbar-title {
    font-size: 16px;
  }

  .btn-sm {
    padding: 0 11px;
  }

  .ctrl-main {
    gap: 16px;
  }
}
