:root {
  --bg: #0a0e17;
  --panel: #121a2b;
  --panel2: #0d1424;
  --field: #0b1120;
  --line: #22304d;
  --line2: #1a2740;
  --text: #e8edf7;
  --muted: #8da0c0;
  --accent: #7b5cff;
  --accent2: #38bdf8;
  --cyan: #45e0ff;
  --grad: linear-gradient(135deg, #7b5cff 0%, #38bdf8 100%);
  --radius: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 50% -8%, #1a2a55 0%, transparent 62%),
    linear-gradient(180deg, #0a0f1c 0%, #080b14 100%);
  position: relative;
  overflow-x: hidden;
}
/* Gezinen renk kümeleri (aurora) */
body::before {
  content: ""; position: fixed; inset: -20vmax; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40vmax 40vmax at 16% 18%, rgba(45,212,191,.15) 0%, transparent 62%),
    radial-gradient(36vmax 36vmax at 86% 80%, rgba(99,102,241,.15) 0%, transparent 62%),
    radial-gradient(30vmax 30vmax at 78% 12%, rgba(56,189,248,.07) 0%, transparent 62%);
  filter: blur(16px);
  animation: aurora 40s ease-in-out infinite alternate;
}
/* İnce ızgara + saat-ibresi taç ışıması + vinyet */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    conic-gradient(from 0deg at 50% -18%, rgba(45,212,191,.06), transparent 24%, rgba(99,102,241,.06) 48%, transparent 72%, rgba(45,212,191,.06)),
    linear-gradient(rgba(255,255,255,.016) 1px, transparent 1px) 0 0 / 100% 52px,
    linear-gradient(90deg, rgba(255,255,255,.016) 1px, transparent 1px) 0 0 / 52px 100%,
    radial-gradient(130% 92% at 50% 42%, transparent 58%, rgba(0,0,0,.5) 100%);
  mask-image: radial-gradient(120% 90% at 50% 30%, #000 62%, transparent 100%);
}
@keyframes aurora {
  0%   { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  50%  { transform: translate3d(1%, 1.5%, 0) scale(1.03); }
  100% { transform: translate3d(1.5%, -1.5%, 0) scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
}
.wrap { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 32px 24px 100px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
code { background: var(--field); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 7px; color: var(--cyan); font-size: 0.92em; }

/* Hero */
.hero { text-align: center; background: linear-gradient(180deg, var(--panel) 0%, var(--panel2) 100%); border: 1px solid var(--line); border-radius: 24px; padding: 34px 28px 30px; }
.brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--grad); color: #fff; font-size: 18px; box-shadow: 0 6px 24px rgba(123,92,255,.45); }
.brand-kicker { letter-spacing: 2.5px; font-size: 12px; font-weight: 700; color: #b7a6ff; }
.title { margin: 4px 0 8px; font-size: 64px; font-weight: 800; line-height: 1.02; letter-spacing: -1px; }
.title .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.subtitle { max-width: 760px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.5; }
.subtitle strong { color: #cbb8ff; }

/* Note */
.note { margin-top: 22px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.note p { margin: 4px 0; }

/* Cards */
.cards { margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { position: relative; background: linear-gradient(180deg, var(--panel) 0%, var(--panel2) 100%); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); opacity: .8; }
.badge { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 8px; border-radius: 7px; background: var(--field); border: 1px solid var(--accent2); color: var(--cyan); font-weight: 700; font-size: 13px; }
.card h2 { margin: 14px 0 6px; font-size: 20px; letter-spacing: -.2px; white-space: nowrap; }
.card .muted { margin: 0 0 16px; font-size: 14px; }

/* File input */
.file { display: flex; align-items: center; gap: 10px; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; transition: border-color .15s; }
.file:hover { border-color: var(--accent2); }
.file input[type="file"] { display: none; }
.file-btn { background: #1b2335; border: 1px solid var(--line); border-radius: 7px; padding: 6px 12px; font-size: 13px; white-space: nowrap; }
.file-name { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name.ok { color: #7ee787; }

/* Otomatik SRT (02 kart) */
.auto-srt { margin-top: 14px; }
.auto-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.auto-sep::before, .auto-sep::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.auto-row { display: flex; flex-wrap: wrap; gap: 8px; }
.auto-row select { flex: 1; min-width: 110px; background: var(--field); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font-size: 13px; cursor: pointer; }
.asr-btn { flex-basis: 100%; background: linear-gradient(135deg, #2dd4bf 0%, #6366f1 100%); color: #fff; border: 0; border-radius: 9px; padding: 11px 14px; font-size: 14px; font-weight: 700; cursor: pointer; }
.asr-btn:disabled { opacity: .5; cursor: not-allowed; }
.asr-status { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; }
.asr-status.err { color: #ff8585; }
.asr-status.ok { color: #7ee787; }
.asr-dl { display: inline-block; margin-top: 10px; color: #7ee787; text-decoration: none; font-weight: 700; font-size: 13px; border: 1px solid #2f5e3a; background: #10251a; padding: 9px 14px; border-radius: 9px; }
.asr-dl:hover { background: #14301f; }

/* Controls (build) */
.controls { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.cta { background: var(--grad); color: #fff; border: 0; border-radius: 12px; padding: 16px 26px; font-size: 17px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 30px rgba(123,92,255,.35); transition: transform .1s; white-space: nowrap; }
.cta:hover { transform: translateY(-1px); }
.cta:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.status { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 14px; }
.status.err { color: #ff8585; }
.status.ok { color: #7ee787; }

/* Plan */
.plan { margin-top: 26px; background: var(--panel2); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.plan-head { margin-bottom: 18px; }
.kicker { letter-spacing: 2.5px; font-size: 12px; font-weight: 800; color: #b48bff; }
.kicker.small { font-size: 12px; }
.plan-head h2 { margin: 6px 0 0; font-size: 30px; font-weight: 800; }

.group { background: #0c1322; border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.gbadge { display: inline-grid; place-items: center; min-width: 32px; height: 26px; border-radius: 8px; background: var(--field); border: 1px solid var(--accent2); color: var(--cyan); font-weight: 700; font-size: 12px; }
.group-head h3 { margin: 0; font-size: 18px; }
.group-head .muted { margin: 2px 0 0; font-size: 13px; }

.fields { display: grid; gap: 14px; }
.fields.four { grid-template-columns: repeat(4, 1fr); }
.fields.two { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
.field { display: flex; flex-direction: column; gap: 8px; background: #0a1120; border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; }
.field > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.field select { background: var(--field); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.field select:focus { outline: none; border-color: var(--accent2); }
.field select:disabled { opacity: .45; cursor: not-allowed; }

/* Bilgi ipucu simgesi */
.info {
  display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 6px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--field);
  color: var(--muted); font-size: 10px; font-style: normal; font-weight: 700;
  cursor: help; vertical-align: middle; user-select: none;
}
.info:hover { color: var(--cyan); border-color: var(--accent2); }

/* Canlı önizleme */
.demo { margin-top: 14px; display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.demo-info { flex: 1; min-width: 180px; }
.demo-label { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 1.5px; color: #b48bff; }
.demo-cap { display: block; font-size: 12.5px; margin-top: 6px; line-height: 1.5; }
#demoCanvas {
  width: 320px; max-width: 100%; aspect-ratio: 16 / 9; background: #000;
  border: 1px solid var(--line); border-radius: 10px; display: block;
}

/* Subtitle style grid */
.style-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.style-tile { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 14px 10px 10px; cursor: pointer; text-align: center; transition: border-color .12s, transform .08s; }
.style-tile:hover { transform: translateY(-1px); border-color: var(--accent2); }
.style-tile.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.style-preview { height: 56px; display: grid; place-items: center; border-radius: 8px; margin-bottom: 8px; overflow: hidden; background: #05070d; }
.style-preview span { font-size: 15px; font-weight: 700; }
.style-name { font-size: 13px; font-weight: 700; }
.style-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Cue list */
.cue-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 1px; max-height: 360px; overflow: auto; border-radius: 10px; }
.cue-list li { display: grid; grid-template-columns: 54px 200px 1fr 150px; gap: 12px; align-items: center; font-size: 13px; padding: 10px 12px; background: #0a1120; border-bottom: 1px solid var(--line2); }
.cue-list li:hover { background: #0d1626; }
.cue-list .cnum { color: var(--cyan); font-weight: 700; }
.cue-list .cfile { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cue-list .cfile.miss { color: #ff8585; }
.cue-list .ctext { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cue-list .ctime { justify-self: end; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; background: #0b1424; border: 1px solid var(--line2); border-radius: 20px; padding: 4px 12px; }

/* Plan foot */
.plan-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 2px 0; }
.plan-foot .cta { padding: 16px 30px; }
.master { font-size: 12.5px; line-height: 1.5; background: #0c1322; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 16px; }
.master strong { color: #cbb8ff; }

/* Render */
.render { margin-top: 26px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stage { position: relative; }
#stage { width: 100%; max-height: 72vh; background: #000; border-radius: 12px; border: 1px solid var(--line); display: block; object-fit: contain; }
.progress { margin-top: 10px; height: 8px; background: var(--field); border-radius: 6px; overflow: hidden; border: 1px solid var(--line2); }
.bar { height: 100%; width: 0; background: var(--grad); transition: width .1s linear; }
.render-actions { margin-top: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 13px 20px; font-size: 15px; cursor: pointer; }
.ghost:disabled { opacity: .4; cursor: not-allowed; }
.download { color: #7ee787; text-decoration: none; font-weight: 700; border: 1px solid #2f5e3a; background: #10251a; padding: 12px 20px; border-radius: 12px; }
.hint { margin-top: 12px; font-size: 13px; }

@media (max-width: 1000px) {
  .fields.four { grid-template-columns: repeat(2, 1fr); }
  .style-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; }
  .fields.four, .fields.two { grid-template-columns: 1fr; }
  .style-grid { grid-template-columns: repeat(2, 1fr); }
  .title { font-size: 44px; }
  .cue-list li { grid-template-columns: 40px 1fr 92px; }
  .cue-list .ctext { display: none; }
}
