:root {
  --bg: #0a0d0e; --panel: #13181a; --panel-2: #1a2023; --line: #242c30; --text: #e9eff1; --muted: #8b9ba0;
  --accent: #53fc18; --accent-ink: #071000;
  --kill: #53fc18; --knock: #f5c518; --death: #ff5a5a; --knocked: #ff9a3c;
  --own: #53fc18; --enemy: #ff5a5a; --other: #7aa7ff;
  --radius: 12px;
  --lol: #c8aa6e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
body.noscroll { overflow: hidden; }
main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px 40px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { letter-spacing: -.02em; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
code { background: var(--panel); padding: 1px 5px; border-radius: 4px; }

button { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 10px 20px; font: inherit; font-weight: 700; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 500; padding: 7px 14px; }
button.ghost:hover:not(:disabled) { background: var(--panel-2); }
button.icon { background: transparent; color: var(--muted); padding: 4px 10px; font-size: 18px; }
input, select { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; min-width: 0; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

/* ---- üst çubuk ---- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(10, 13, 14, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.brand { font-weight: 800; font-size: 19px; color: var(--text); display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.logo { width: 26px; height: 26px; color: var(--accent); flex: none; filter: drop-shadow(0 0 6px rgba(83, 252, 24, .45)); transition: transform .25s; }
.brand:hover .logo { transform: rotate(90deg); }
.wordmark { letter-spacing: -.02em; }
.wordmark .accent { color: var(--accent); }

.search { display: flex; gap: 8px; }
.search input { flex: 1; }
.search.mini { flex: 1; max-width: 420px; margin-left: auto; }
/* oyun menüsü */
.game-nav { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.game-nav a { color: var(--muted); padding: 6px 14px; border-radius: 7px; font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.game-nav a:hover { color: var(--text); text-decoration: none; }
.game-nav a.on { color: var(--accent-ink); background: var(--accent); }
.game-nav a[data-game="lol"].on { color: #1a1206; background: var(--lol); }
.search.mini input, .search.mini select, .search.mini button { padding: 7px 10px; font-size: 14px; }
.search.big { max-width: 680px; margin: 26px auto 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.search.big input { border: 0; background: transparent; font-size: 17px; padding: 12px 14px; }
.search.big input:focus { outline: none; }
.search.big select { border-color: transparent; background: var(--panel-2); }
.search.big button { padding: 12px 26px; font-size: 16px; }

/* ---- ana sayfa ---- */
.hero { text-align: center; padding: 64px 0 48px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.1; }
.hero h1 span { color: var(--accent); }
.hero > p { color: var(--muted); max-width: 620px; margin: 14px auto 0; }
/* son görüntülenenler */
.recent { max-width: 680px; margin: 14px auto 0; text-align: left; }
.recent-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 8px; padding: 0 4px; }
.link-btn { background: none; color: var(--muted); padding: 2px 4px; font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.link-btn:hover { color: var(--text); }
.recent-list { display: flex; flex-wrap: wrap; gap: 8px; }
.recent-chip { display: inline-flex; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; max-width: 100%; }
.recent-chip:hover { border-color: var(--accent); }
.recent-chip a { color: var(--text); padding: 6px 4px 6px 14px; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-chip a:hover { text-decoration: none; color: var(--accent); }
.recent-chip button { background: none; color: var(--muted); padding: 6px 12px 6px 6px; font-size: 12px; font-weight: 400; }
.recent-chip button:hover { color: var(--death); }
.hero .note { color: var(--knock); font-size: 13px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 14px; gap: 12px; }
.section-head h2 { font-size: 20px; }
.streamer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.streamer-card, .streamer-row { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); min-width: 0; }
.streamer-card:hover { border-color: var(--accent); text-decoration: none; }
.sc-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sc-text b, .sc-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-text small { color: var(--muted); }
.live-pill { background: var(--death); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 5px; flex: none; }

.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--panel-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--muted); flex: none; overflow: hidden; border: 2px solid transparent; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.live { border-color: var(--death); }

.empty-box { padding: 28px; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); grid-column: 1 / -1; }

/* ---- yayıncılar sayfası ---- */
.page-head { padding: 36px 0 18px; }
.page-head h1 { font-size: 30px; }
.page-head p { max-width: 680px; margin: 6px 0 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.add-form { display: grid; grid-template-columns: 2fr 1fr 2fr auto; gap: 12px; align-items: end; }
.add-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.streamer-list { display: grid; gap: 8px; }
.streamer-row .avatar { width: 36px; height: 36px; }
.ghost-link { color: var(--muted); font-size: 14px; padding: 6px 8px; }
.login { display: flex; justify-content: center; padding: 80px 0 40px; }
.login-box { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.login-box h1 { font-size: 22px; }
.login-box label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.login-box .status { margin: 0; }
.page-head .logout { float: right; }
.discovery { font-size: 14px; color: var(--muted); line-height: 1.6; }
.discovery b { color: var(--text); }
.discovery-line { margin-top: 14px; }
.discovery-line b { color: var(--text); }
.err { color: var(--death); }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 12px; flex-wrap: wrap; }
.list-head h2, #unmatchedBox h2 { font-size: 20px; }
.list-head input { width: min(320px, 100%); }
#unmatchedBox { margin-top: 30px; }
#unmatchedBox > p { margin: 4px 0 12px; }
.streamer-row.unmatched input { width: 150px; padding: 7px 10px; }
.src { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); flex: none; }
.src.auto { color: var(--other); border-color: rgba(122, 167, 255, .35); }
button.more { display: block; margin: 12px auto 0; }
.manual-add { margin-top: 30px; }
.manual-add summary { cursor: pointer; font-weight: 700; }
.manual-add .add-form { margin-top: 14px; }
.status { margin: 12px 0; color: var(--muted); }
.status:empty { margin: 0; }
.status.error { color: var(--death); }

/* ---- oyuncu sayfası ---- */
.player-head { display: flex; align-items: center; gap: 16px; padding: 30px 0 20px; flex-wrap: wrap; }
.player-head h1 { font-size: 30px; word-break: break-all; }
.ph-game { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.ph-avatar.lol { background: linear-gradient(135deg, var(--lol), #7a5a1c); color: #1a1206; }
.admin-tabs { display: inline-flex; margin: 12px 0 4px; }
.ph-avatar { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, var(--accent), #1f7a00); color: var(--accent-ink); font-size: 28px; font-weight: 900; display: flex; align-items: center; justify-content: center; flex: none; }
.stats { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; text-align: center; min-width: 74px; }
.stat b { display: block; font-size: 20px; line-height: 1.2; }
.stat span { font-size: 12px; color: var(--muted); }

.progress { position: relative; height: 34px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; align-items: center; padding: 0 14px; font-size: 14px; color: var(--muted); }
.progress .bar { position: absolute; inset: 0 auto 0 0; width: 2%; background: rgba(83, 252, 24, .14); transition: width .3s; }
.progress span { position: relative; }

.filters { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; overflow-x: auto; max-width: 100%; }
.tabs button { background: transparent; color: var(--muted); padding: 7px 14px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--panel-2); color: var(--text); }

.match { margin-bottom: 22px; }
.match-head { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.mh-main b { font-size: 17px; }
.mh-meta { color: var(--muted); font-size: 13px; }
.mh-streams { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.place { background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; padding: 1px 8px; font-weight: 800; font-size: 14px; }
.place.win { background: var(--knock); color: #000; border-color: var(--knock); }
.place.loss { background: rgba(255, 90, 90, .15); color: var(--death); border-color: rgba(255, 90, 90, .4); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 13px; padding: 3px 10px 3px 3px; border-radius: 99px; }
.chip:hover { border-color: var(--accent); }
.chip .avatar { width: 24px; height: 24px; font-size: 11px; border-width: 1px; }
.offline { text-align: center; padding: 10px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; overflow: hidden; color: var(--text); font-weight: 400; text-align: left; transition: transform .12s, border-color .12s; min-width: 0; }
.card:hover, .card:focus-visible { transform: translateY(-2px); border-color: var(--accent); outline: none; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(circle at 30% 30%, #233036, #0d1214) center / cover no-repeat; }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .65)); }
.thumb .play { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; font-size: 17px; padding-left: 3px; z-index: 1; opacity: .85; transition: background .12s, opacity .12s; }
.card:hover .play { background: var(--accent); color: var(--accent-ink); opacity: 1; }
.thumb .ts { position: absolute; right: 8px; bottom: 8px; z-index: 1; background: rgba(0, 0, 0, .75); font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.role-badge { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 5px; color: #000; display: inline-block; }
.thumb .role-badge { position: absolute; left: 8px; top: 8px; z-index: 1; }
.role-badge.own { background: var(--own); } .role-badge.enemy { background: var(--enemy); color: #fff; } .role-badge.other { background: var(--other); }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 15px; }
.vs b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs .arrow { color: var(--muted); flex: none; }
.sub { font-size: 13px; color: var(--muted); }
.by { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 13px; font-weight: 600; min-width: 0; }
.by .avatar { width: 22px; height: 22px; font-size: 10px; border-width: 1px; }
.by span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { font-size: 11px; font-weight: 800; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; color: #0b0e0f; display: inline-block; }
.tag.kill { background: var(--kill); } .tag.knock { background: var(--knock); }
.tag.death { background: var(--death); } .tag.knocked { background: var(--knocked); } .tag.start { background: var(--other); }

/* ---- video penceresi ---- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .82); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { width: min(1100px, 100%); max-height: 100%; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.modal-top { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; }
.modal-title { flex: 1; min-width: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
video { width: 100%; display: block; background: #000; aspect-ratio: 16 / 9; max-height: 70vh; }
.modal-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.modal-info { flex: 1; text-align: center; font-size: 14px; min-width: 0; }
.modal-info .err { color: var(--death); }
.play-error { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: rgba(255, 90, 90, .12); border: 1px solid rgba(255, 90, 90, .35); color: var(--text); text-align: left; }
.modal-sync { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; padding: 0 16px 14px; font-size: 13px; color: var(--muted); }
.modal-sync input { width: 70px; padding: 5px 8px; margin: 0 4px; }
.modal-sync a { margin-left: auto; font-weight: 600; }

/* ---- footer ---- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: linear-gradient(180deg, #0d1113, #080a0b); color: var(--muted); }
.footer-in { max-width: 1240px; margin: 0 auto; padding: 36px 16px 22px; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px 40px; flex-wrap: wrap; }
.footer-brand { max-width: 380px; }
.footer-brand .brand { font-size: 18px; }
.footer-brand p { margin: 10px 0 0; font-size: 14px; line-height: 1.6; }
.footer-community h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 12px; font-weight: 700; }
.footer-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.coffee-btn { display: inline-flex; align-items: center; gap: 12px; padding: 11px 18px 11px 14px; border-radius: 12px; background: #ffdd00; color: #1a1400; text-decoration: none; box-shadow: 0 6px 20px rgba(255, 221, 0, .18); transition: background .15s, transform .15s, box-shadow .15s; }
.coffee-btn:hover { background: #f5d000; text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(255, 221, 0, .28); }
.coffee-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.coffee-btn svg { width: 28px; height: 28px; flex: none; }
.coffee-btn span { display: flex; flex-direction: column; line-height: 1.25; }
.coffee-btn b { font-size: 15px; }
.coffee-btn small { font-size: 12px; opacity: .75; }
.discord-btn { display: inline-flex; align-items: center; gap: 12px; padding: 11px 18px 11px 14px; border-radius: 12px; background: #5865f2; color: #fff; text-decoration: none; box-shadow: 0 6px 20px rgba(88, 101, 242, .25); transition: background .15s, transform .15s, box-shadow .15s; }
.discord-btn:hover { background: #4752c4; text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(88, 101, 242, .35); }
.discord-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.discord-btn svg { width: 28px; height: 28px; flex: none; }
.discord-btn span { display: flex; flex-direction: column; line-height: 1.25; }
.discord-btn b { font-size: 15px; }
.discord-btn small { font-size: 12px; opacity: .8; }
.footer-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 32px; flex-wrap: wrap; font-size: 12px; }
.footer-bottom p { margin: 0; }
.footer-bottom .copyright { color: var(--text); font-size: 13px; }
.footer-bottom .company { color: var(--text); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(233, 239, 241, .3); text-underline-offset: 3px; }
.footer-bottom .company:hover { color: var(--accent); text-decoration-color: var(--accent); }
.footer-bottom .legal { max-width: 620px; line-height: 1.6; }

@media (max-width: 760px) {
  .topbar-in { flex-wrap: wrap; gap: 8px 12px; }
  .search.mini { order: 3; max-width: none; flex-basis: 100%; }
  .game-nav { margin-left: auto; }
  .game-nav a { padding: 6px 12px; }
  .hero { padding: 36px 0 30px; }
  .search.big { flex-wrap: wrap; }
  .search.big input { flex-basis: 100%; }
  .search.big button { flex: 1; }
  .add-form { grid-template-columns: 1fr 1fr; }
  .add-form label:first-child, .add-form label:nth-child(3), .add-form button { grid-column: 1 / -1; }
  .stats { margin-left: 0; width: 100%; }
  .footer-community, .discord-btn, .coffee-btn { width: 100%; }
  .footer-in { padding-top: 28px; }
  .streamer-row { flex-wrap: wrap; }
  .streamer-row .sc-text { flex-basis: calc(100% - 52px); }
  .streamer-row.unmatched input { flex: 1; width: auto; }
  .stat { flex: 1; min-width: 0; padding: 6px 4px; }
  .mh-streams { margin-left: 0; }
  .card-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .modal { padding: 0; align-items: stretch; }
  .modal-box { border-radius: 0; }
  .modal-sync a { margin-left: 0; }
}
@media (max-width: 460px) {
  .card-grid { grid-template-columns: 1fr; }
}
