@font-face { font-family: "OleText"; src: url("/overlay/fonts/Inter-Variable.ttf"); font-weight: 100 900; }
@font-face { font-family: "OleDisplay"; src: url("/overlay/fonts/BigShoulders-Variable.ttf"); font-weight: 100 900; }
:root { --bg: #f4efe2; --card: #fffdf6; --ink: #151515; --muted: #8a8170; --line: #e3dccb; --accent: #b10f34; --ok: #0f8a3c; --warn: #c88400; --bad: #c4232c; }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 "OleText", system-ui, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--accent); }
.top { display: flex; justify-content: space-between; align-items: center; padding: 10px 24px; background: #111; color: #fffcf3; }
.top a { color: #fffcf3; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 24px "OleDisplay"; text-transform: uppercase; }
.brand img { height: 30px; filter: invert(1); }
main { max-width: 1400px; margin: 0 auto; padding: 20px 24px 60px; }
h1 { font: 800 34px "OleDisplay"; text-transform: uppercase; margin: 6px 0 16px; }
h2 { font: 800 22px/22px "OleDisplay"; text-transform: uppercase; margin: 0 0 12px; }
h3 { font-size: 13px; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
.head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.grid2, .grid-main { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-main { grid-template-columns: 1.3fr 1fr; }
@media (max-width: 1000px) { .grid2, .grid-main { grid-template-columns: 1fr; } }
.col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px 18px 16px; box-shadow: 0 2px 6px rgba(0,0,0,.04); }
label { display: block; margin: 0 0 10px; font-weight: 600; font-size: 13px; }
label.chk { display: flex; gap: 6px; align-items: center; font-weight: 500; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; background: #fffcf3; width: 100%; margin-top: 3px; }
input[type=checkbox] { width: auto; margin: 0; }
.row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 8px 0; }
.row > input, .row > select { width: auto; flex: 1 1 120px; }
.row label { flex: 0 0 auto; margin: 0; }
.row label input { width: 6em; }
button, .btn { font: 600 13px "OleText"; padding: 8px 14px; border: 0; border-radius: 5px; background: #111; color: #fffcf3; cursor: pointer; text-decoration: none; display: inline-block; }
button.link { background: none; color: var(--accent); padding: 2px 4px; text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.log code { font-size: 11px; color: var(--muted); word-break: break-all; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 99px; background: #ddd; font-size: 12px; font-weight: 700; }
.pill.ok { background: #d8f0df; color: var(--ok); } .pill.warn { background: #fbedcc; color: var(--warn); } .pill.bad { background: #f8d6d8; color: var(--bad); }
.preview { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #2f5a2f; border-radius: 6px; overflow: hidden; }
.preview iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; }
.preview p { position: absolute; inset: 0; display: grid; place-items: center; color: #fffcf3; margin: 0; }
.scoreline { display: flex; gap: 24px; margin-top: 12px; flex-wrap: wrap; }
.scoreline small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.scoreline b { font: 800 32px "OleDisplay"; }
table.events { width: 100%; border-collapse: collapse; margin: 10px 0; }
table.events th, table.events td { text-align: left; padding: 6px; border-bottom: 1px solid var(--line); font-size: 13px; }
tr.cancelled td { text-decoration: line-through; color: var(--muted); }
tr.cancelled td:last-child { text-decoration: none; }
.tag { background: #fbedcc; color: #7a5200; font-size: 10px; padding: 1px 6px; border-radius: 3px; font-weight: 700; }
.obs .steps { padding-left: 18px; } .obs .steps li { margin-bottom: 14px; }
.dragbtn { display: block; margin-top: 8px; padding: 18px; text-align: center; border: 2px dashed var(--accent); border-radius: 8px; font: 800 22px "OleDisplay"; text-transform: uppercase; text-decoration: none; cursor: grab; background: #fff5f6; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(80px); background: #111; color: #fffcf3; padding: 10px 18px; border-radius: 6px; transition: transform .25s; z-index: 9; }
#toast.show { transform: translateX(-50%); } #toast.err { background: var(--bad); }
.row label.chk input { width: auto; } .row label.chk { align-self: center; }
/* Ekran seçimi kutucukları */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.small-tiles { grid-template-columns: repeat(3, 1fr); }
.tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 11px 12px 22px; min-height: 74px; text-align: left;
  background: var(--card); color: var(--ink); border: 2px solid var(--line); border-radius: 8px; transition: border-color .12s, background .12s; }
.small-tiles .tile { min-height: 0; padding: 10px 12px 22px; }   /* alt satır "YAYINDA / AÇIK" etiketine ayrılır, yazıyla çakışmaz */
.tile b { font: 800 19px/1.05 "OleDisplay"; text-transform: uppercase; }
.tile span { font-size: 12px; color: var(--muted); font-weight: 500; }
.tile kbd { position: absolute; right: 8px; top: 6px; font: 600 10px "OleText"; color: var(--muted); }
.tile:hover { border-color: #b9ae96; }
.tile.on { border-color: var(--accent); background: #fff1f3; box-shadow: inset 0 0 0 1px var(--accent); }
.tile.on::after { content: "YAYINDA"; position: absolute; right: 8px; bottom: 7px; font: 700 9px "OleText"; letter-spacing: .06em; color: var(--accent); }
.tile.toggle.on::after { content: "AÇIK"; }
.tile.auto { background: #151515; color: #fffcf3; border-color: #151515; }
.tile.auto span, .tile.auto kbd { color: #b9ae96; }
.tile.auto.on { background: #151515; border-color: #151515; box-shadow: none; }   /* açıkken de siyah kalır (tasarımcı, 2026-11-21) */
.tile.auto.on::after { color: #fffcf3; content: "AÇIK"; }
.tile.auto.on span, .tile.auto.on kbd { color: #fffcf3; }
.tile.nodata { opacity: .55; }
.tile.nodata span::after { content: " · veri yok"; }
.auto-play { display: grid; grid-template-columns: auto 1fr 64px; align-items: center; gap: 6px 22px; margin: 14px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #f6f1e4; }
.auto-play .switch { margin: 0; }
.auto-play .switch span { font: 800 17px/1 "OleDisplay"; text-transform: uppercase; }
.auto-play output { font: 800 22px/1 "OleDisplay"; text-align: right; color: var(--accent); }
.auto-play p { grid-column: 1 / -1; margin: 22px 0 0; }
.auto-play.off output { color: var(--muted); }
.auto-play.off .ap-range { opacity: .6; }
.ap-range { position: relative; }   /* ray, anahtar ve süre ile aynı hizada; etiketler altına asılı */
.ap-range input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; margin: 0; padding: 0; border: 0; background: transparent; cursor: grab; --p: 0%; }
.ap-range input[type=range]:active { cursor: grabbing; }
.ap-range input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(to right, var(--accent) var(--p), #d9d0bb var(--p)); }
.ap-range input[type=range]::-moz-range-track { height: 8px; border-radius: 99px; background: #d9d0bb; }
.ap-range input[type=range]::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--accent); }
.ap-range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: #fffcf3; border: 3px solid var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ap-range input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fffcf3; border: 3px solid var(--accent); }
.auto-play.off input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(to right, #9c927c var(--p), #d9d0bb var(--p)); }
.auto-play.off input[type=range]::-webkit-slider-thumb { border-color: #9c927c; }
.ap-ticks { position: absolute; left: 12px; right: 12px; top: 100%; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-weight: 600; }
.ap-ticks span { width: 0; display: flex; justify-content: center; white-space: nowrap; }
.live-line { display: flex; align-items: baseline; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.live-line b { font: 800 32px "OleDisplay"; }
select.big { font-size: 15px; padding: 10px; }
details.tight { margin-top: 8px; } details.tight summary { cursor: pointer; font-size: 13px; color: var(--muted); }
details.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2 { margin: 0; }
details.fold > summary::before { content: "▸"; color: var(--muted); }
details.fold[open] > summary::before { content: "▾"; }
details.fold[open] > summary { margin-bottom: 12px; }
/* Sağ panel kapalıyken kutular soluklaşmaz (tasarımcı, 2026-11-21): ilk tıklama paneli açar. */
.tile.soon { opacity: .55; cursor: default; border-style: dashed; }
.sec-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; height: 22px; }
.sec-head > .switch { margin-top: -5px; margin-bottom: -5px; }   /* anahtar başlık satırını yükseltmesin: her kutuda başlık aynı yükseklikte başlar */
.sec-head h2 { margin: 0; }
.switch { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; background: none; color: var(--ink); padding: 4px 0; }
.switch i { position: relative; width: 44px; height: 24px; border-radius: 99px; background: #cfc6b2; transition: background .15s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fffcf3; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch.on i { background: var(--ok); } .switch.on i::after { left: 23px; }
.switch span { font-weight: 700; font-size: 13px; }
.share-bar { margin-top: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.share-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: #bbb; }
.share-bar.live { border-color: var(--accent); background: #fff1f3; } .share-bar.live .dot { background: var(--accent); animation: blink 1.2s infinite; }
.share-bar #shareText { font-weight: 700; margin-right: auto; }
.share-bar p { flex-basis: 100%; margin: 4px 0 0; }
button.ghost { background: none; color: var(--ink); border: 1px solid var(--line); }
@keyframes blink { 50% { opacity: .3; } }
/* Maç seçici */
.match-picker { position: relative; }
.mp-current { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 4px; text-align: left; background: #fffcf3; color: var(--ink); border: 2px solid var(--line); padding: 10px 40px 10px 12px; position: relative; }
.match-picker.open .mp-current { border-color: var(--accent); }
.mp-caret { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); }
.mp-placeholder { font-size: 15px; color: var(--muted); }
.mp-league-name { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.mp-list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); max-height: 420px; overflow: auto; background: #fffcf3; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; }
.mp-league h4 { margin: 10px 8px 4px; font: 800 17px "OleDisplay"; text-transform: uppercase; color: var(--ink); }
.mp-line, .mp-row { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 10px; }
.mp-row { width: 100%; background: none; color: var(--ink); border-radius: 6px; padding: 9px 8px; font-weight: 500; }
.mp-row:hover { background: #f4efe2; } .mp-row.sel { background: #fff1f3; box-shadow: inset 0 0 0 1px var(--accent); }
.mp-time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mp-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; font-size: 14px; }
.mp-teams .h { text-align: right; } .mp-teams .a { text-align: left; }
.mp-score { font: 800 18px "OleDisplay"; min-width: 40px; text-align: center; } .mp-score.vs { color: var(--muted); }
.mp-tag { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 3px; background: #e9e3d4; color: var(--muted); }
.mp-tag.live { background: var(--accent); color: #fffcf3; }
.mp-line .mp-tag:empty, .mp-row .mp-tag:empty { display: none; }
/* Yayın programları */
.prog-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.prog-tabs button { background: none; color: var(--ink); border: 1px solid var(--line); padding: 6px 10px; }
.prog-tabs button.on { background: var(--ink); color: #fffcf3; border-color: var(--ink); }
.copy-row { display: flex; gap: 8px; margin: 10px 0 4px; }
.copy-row input { margin: 0; font-size: 12px; color: var(--muted); }
.copy-row button { flex: none; }

/* Ayrı paneller (tasarımcı, 2026-11-21): her biri kendi kutusunda, kendi aç/kapa düğmesiyle. */
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; margin-top: 18px; }
@media (max-width: 1000px) { .mini-grid { grid-template-columns: 1fr; } }
.box.mini .sec-head h2 { font-size: 22px; }
.box.mini .small-tiles { grid-template-columns: repeat(3, 1fr); }
.box.mini form { margin-top: 12px; }
.box.mini details.tight { margin-top: 10px; }
.box.is-off > *:not(.sec-head) { opacity: .45; }
.box.is-off .sec-head h2 { color: var(--muted); }
.logo-row { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; }
.logo-prev { width: 96px; height: 96px; border-radius: 10px; display: grid; place-items: center; padding: 10px;
  background: #e9e2d2 repeating-conic-gradient(#ded6c4 0 25%, #e9e2d2 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.logo-act .note, .logo-act .warn-note { flex: 1 1 100%; margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.logo-act .warn-note { color: var(--accent); font-weight: 600; }
label.btn { margin: 0; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: #fffcf3; color: var(--ink); font-weight: 700; font-size: 13px; padding: 9px 6px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: #fffcf3; }
#tickerHint { margin: 8px 0 0; }
#tickerForm textarea { width: 100%; }
details.fold h3.first { margin-top: 0; }
.box.mini .row { flex-wrap: nowrap; align-items: center; }
.box.mini .row label { flex: 1 1 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.box.mini .row label input { flex: 1 1 auto; min-width: 0; width: auto; }
.auto-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.auto-line .k { font-weight: 600; }
.auto-line b { font: 800 20px/1 "OleDisplay"; }
.auto-line .small { flex: 1 1 100%; }
.inline-opt { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 4px 14px; margin-top: 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: #f6f1e4; }
.inline-opt .switch { margin: 0; }
.inline-opt .switch span { display: none; }   /* anahtarın durumu yeterli; yanında başlık var */
.inline-opt b { font: 800 17px/1 "OleDisplay"; text-transform: uppercase; }
.inline-opt.is-off b, .inline-opt.is-off .small { opacity: .5; }
/* Otomatikte o an yayındaki ekran: seçili kutunun renginde, etiketi "ŞU AN" */
.tile.now { border-color: var(--accent); background: #fff1f3; box-shadow: inset 0 0 0 1px var(--accent); }
.tile.now::after { content: "ŞU AN"; position: absolute; right: 8px; bottom: 7px; font: 700 9px "OleText"; letter-spacing: .06em; color: var(--accent); }
.tile { transition: background .15s, border-color .15s; }
.seg.two { grid-template-columns: 1fr 1fr; }
#headlineForm { margin-top: 12px; }
#headlineForm label { display: block; margin-bottom: 10px; }
#headlineForm input[name=text] { width: 100%; margin-top: 4px; }
#headlineForm .row { align-items: stretch; }
#headlineForm .row .seg { flex: 1 1 auto; }
#boardHint { margin: 8px 0 0; }
/* Satır satır hizalı düzen: iki sütundaki kutuların üst ve alt kenarları aynı çizgide. */
.grid-main.rows { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: stretch; }
.grid-main.rows > .box, .grid-main.rows > .stack { margin: 0; min-width: 0; }
.grid-main.rows .stack { display: flex; flex-direction: column; gap: 18px; }
.grid-main.rows .stack > :last-child { flex: 1 1 auto; }
.grid-main.rows .span2 { grid-column: 1 / -1; }
.grid-main.rows .span2 #sideTiles { grid-template-columns: repeat(6, 1fr); }
.box-preview { display: flex; flex-direction: column; }
.box-preview .live-line { margin-top: auto; padding-top: 10px; }
.grid-main.rows > details.box[open] { align-self: start; }
@media (max-width: 1000px) { .grid-main.rows { grid-template-columns: 1fr; } .grid-main.rows .span2 #sideTiles { grid-template-columns: repeat(3, 1fr); } }

/* Oyuncu puanları: veri yokken soluk, tıklanamaz; veri gelince yanıp sönen "HAZIR" ışığı */
.tile.pending { opacity: .45; cursor: default; border-style: dashed; }
.tile.pending:hover { border-color: var(--line); }
.tile.ready::before { content: ""; position: absolute; right: 30px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(31, 138, 76, .6); animation: readyPulse 1.2s ease-in-out infinite; }
.tile.ready:not(.on)::after { content: "HAZIR"; position: absolute; right: 8px; bottom: 7px; font: 700 9px "OleText"; letter-spacing: .06em; color: var(--ok); }
@keyframes readyPulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(31, 138, 76, .55); } 50% { opacity: .35; box-shadow: 0 0 0 5px rgba(31, 138, 76, 0); } }

/* Ekran kutuları sürükle bırak ile sıralanır (tasarımcı, 2026-11-21) */
#sideTiles .tile[data-side] { cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#sideTiles.sorting, #sideTiles.sorting .tile { cursor: grabbing; }
#sideTiles .tile.drag-src { opacity: .35; border-style: dashed; box-shadow: none; }
#sideTiles .tile.drag-src::after, #sideTiles .tile.drag-src::before { visibility: hidden; }
.tile-ghost { position: fixed; z-index: 50; margin: 0; pointer-events: none; cursor: grabbing; transform: rotate(-1.5deg) scale(1.03);
  box-shadow: 0 14px 30px rgba(21, 21, 21, .22); opacity: .96; }
.linkbtn { background: none; border: 0; padding: 0; margin-left: 8px; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* Tema barı (logo kartının hemen üstü, iki sütun boyu ince şerit) */
.theme-bar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; }
.theme-bar h2 { margin: 0; }
.theme-opts { display: flex; gap: 8px; }
.theme-opt { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 2px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-weight: 700; font-size: 13px; }
.theme-opt .sw { width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.sw-light { background: linear-gradient(135deg, #fffcf3, #e5ddc6); }
.sw-dark { background: linear-gradient(135deg, #36342f, #1b1a18); }
.sw-ucl { background: linear-gradient(135deg, #1e44a6, #06164a); }
.theme-opt.on { border-color: var(--accent); background: #fff1f3; box-shadow: inset 0 0 0 1px var(--accent); }
.theme-opt[aria-disabled="true"] { opacity: .35; cursor: not-allowed; }

.q-form .q-t { flex: 0 0 34%; }
.q-form .q-act { justify-content: flex-end; }
.box.mini #cornerTiles { grid-template-columns: repeat(4, 1fr); }   /* Abone ol, Superchat, Günün sorusu, xG tek sırada */
#cornerTiles .tile span { white-space: normal; }
.q-head { margin: 14px 0 6px; font-weight: 700; font-size: 13px; }
/* İlk kurulum vurgusu: overlay bağlantısı henüz hiç açılmadıysa */
.box.obs.first-run { border: 2px solid var(--accent); box-shadow: 0 0 0 4px rgba(177, 15, 52, .08); }
.first-badge { margin: 0 0 8px; display: inline-block; background: var(--accent); color: #fffcf3; font-weight: 600; font-size: 13px; padding: 4px 10px; border-radius: 99px; }
