/* Otistify web — sadece otistify.online/app için eklemeler (eklentinin styles.css'i üstüne) */

html[data-host="web"] { -webkit-text-size-adjust: 100%; }

/* iPhone çentiği ve alt çubuk */
[data-host="web"] .app-header {
  padding-top: env(safe-area-inset-top);
  height: calc(52px + env(safe-area-inset-top));
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
}
[data-host="web"] .app-main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
[data-host="web"] .toasts { bottom: calc(14px + env(safe-area-inset-bottom)); }

/* Video sayfada olduğu için küçük resim gereksiz */
[data-host="web"] .np-thumb { display: none; }

/* Efektlerin bu cihazda ne kadar uygulanabildiği */
.fx-note { margin: 10px 2px 0; font-size: 11.5px; color: var(--text-3); }
.fx-note.ok { color: var(--accent-text); }
.fx-note a { color: var(--accent-text); font-weight: 650; }
@media (pointer: coarse) { [data-host="web"] #shortcutHint { display: none; } }

/* ---------- Link kutusu ---------- */
.url-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 4px 4px 4px 12px;
  margin-bottom: 12px;
  border-radius: var(--r);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.url-bar:focus-within { box-shadow: inset 0 0 0 1px var(--accent-line), 0 0 0 3px var(--accent-soft); }
.url-icon { color: var(--text-3); }
.url-bar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px; /* iOS 16px altında odaklanınca sayfayı yakınlaştırıyor */
}
.url-bar input::placeholder { color: var(--text-3); }
.url-bar .btn { height: 34px; }

/* ---------- Video ---------- */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: 14px;
  border-radius: var(--r);
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 0 1px var(--line);
}
.video-frame iframe, .video-frame #ytPlayer { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-empty, .video-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  background:
    radial-gradient(90% 120% at 50% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
}
.video-empty .ic, .video-error .ic { width: 28px; height: 28px; margin-bottom: 2px; }
.video-empty strong { font-size: 14px; color: var(--text); }
.video-empty span { max-width: 300px; }
.video-error { color: var(--text-2); }
.video-error .ic { color: var(--warn); }
.video-error .btn { margin-top: 6px; text-decoration: none; }

/* ---------- Geniş ekran: video solda, kitaplık sağda ---------- */
.web-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 980px) {
  [data-host="web"] .app-main {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: start;
    max-width: 1180px;
    gap: 16px;
  }
  [data-host="web"] #player { position: sticky; top: 64px; }
}

/* ---------- Kaynak: YouTube / Dosya ---------- */
.source-tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  margin-bottom: 12px;
  border-radius: var(--r);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.source-tab {
  flex: 1;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-2);
}
.source-tab:hover { color: var(--text); }
.source-tab[aria-selected="true"] { background: var(--seg-selected); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }

/* Dosya cihazda olduğu için link ile paylaşılamaz */
html[data-source="file"] #btnShareLoop { display: none; }

/* ---------- Dosya modu ---------- */
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.file-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  aspect-ratio: 16 / 9;
  padding: 16px 22px;
  margin-bottom: 14px;
  border-radius: var(--r);
  border: 1.5px dashed var(--line-strong);
  background:
    radial-gradient(90% 120% at 50% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.file-drop:hover, .file-drop.dragging { border-color: var(--accent-line); }
.file-drop .ic { width: 30px; height: 30px; color: var(--accent-text); margin-bottom: 2px; }
.file-drop strong { font-size: 14px; color: var(--text); }
.file-drop span { max-width: 300px; }

.file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 14px;
  border-radius: var(--r);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.file-play {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 16px -6px rgba(30, 215, 96, 0.6);
}
.file-play:hover { background: var(--accent-hover); }
.file-play .ic { width: 20px; height: 20px; }
.file-meta { flex: 1; min-width: 0; }
.file-name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-seek { display: flex; align-items: center; gap: 8px; margin: 5px 0 3px; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.file-seek input[type="range"] { flex: 1; min-width: 0; height: 4px; accent-color: var(--accent); cursor: pointer; }
.file-sub { font-size: 11px; color: var(--text-3); }
.file-change { position: relative; align-self: flex-start; }

.file-section { margin-bottom: 14px; }
.file-section-head { margin: 0 2px 6px; font-size: 11.5px; font-weight: 650; color: var(--text-2); }
.file-list { display: flex; flex-direction: column; gap: 2px; padding: 3px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.file-row { display: flex; align-items: center; gap: 8px; padding: 7px 5px 7px 11px; border-radius: 9px; cursor: pointer; }
.file-row:hover { background: var(--surface-2); }
.file-row.active { background: var(--accent-soft); }
.file-row.active .file-row-title { color: var(--accent-text); }
.file-row-text { flex: 1; min-width: 0; }
.file-row-title { font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row-sub { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* Zaman çizelgesinde dalga formu (dosya modu) */
.tl-wave { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; border-radius: inherit; }
.tl-track.has-wave { background-image: none; }
