/* klippek.hu frontend: alap (betuk, tokenek, kozos elemek, munkater-keret).
   A tokenek a web-dizajn ag (PR #24, a fonok UX-terve v0.2) munkater.css-ebol jonnek, hogy a ket felulet osszeilljen.
   Elteres: a sarga a termek karaoke-feliratanak kimondott szava, pontosan #FFE100 (clipper/tiktok.py YELLOW).
   Markaelem: a karaoke-cim (Bebas Neue, feher szavak, a kimondott szo sarga). Csak a lapcimeken es a belepesnel. */

/* ---------- Betuk (helyben, kulso keres nelkul; SIL OFL 1.1, fonts/OFL-*.txt) ---------- */
@font-face { font-family: "Bebas Neue"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/BebasNeue-Regular.ttf") format("truetype"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/BarlowSemiCondensed-SemiBold.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/BarlowSemiCondensed-SemiBold-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/BarlowSemiCondensed-Bold.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/BarlowSemiCondensed-Bold-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/Inter-Variable.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/Inter-Variable-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokenek ---------- */
:root {
  color-scheme: dark;
  --sarga: #FFE100;
  --sarga-vilagos: #FFF6B3;
  --tinta: #101012;
  --oldal: #0B0B0D;
  --felulet: #18191D;
  --felulet2: #222329;
  --keret: #34363E;
  --szoveg: #F7F7F8;
  --halvany: #B5B7C1;
  --engedely: #FFB65C; --engedely-bg: #3A2A12;
  --kesz: #6FE3B4; --kesz-bg: #123327;
  --hiba: #FF9B9B; --hiba-bg: #3A1A1A;
  --utem: #9DBBFF; --utem-bg: #1D2740;
  --cim: "Barlow Semi Condensed", Bahnschrift, "Arial Narrow", sans-serif;
  --test: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  --felirat: "Bebas Neue", var(--cim);
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 10px;
  /* a felirat fekete korvonala (a termekben 3 px-es fekete keret a betuk korul) */
  --korvonal: 0 0 1px #000, 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000, 2px 2px 0 #000, -2px 2px 0 #000, 2px -2px 0 #000, -2px -2px 0 #000, 0 4px 0 #000;
}

/* ---------- Alap ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--tinta); color: var(--szoveg); font: 16px/1.5 var(--test); overflow-x: hidden; }
body.reteg-nyitva { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--sarga); }
a:hover { color: #FFF27A; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--sarga); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .92em; }
[hidden], .rejtett { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.meta { font-size: 14px; color: var(--halvany); }
.szam { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--sarga); color: var(--tinta); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; color: var(--tinta); }
.nojs { padding: 24px; }
svg.ikon { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Karaoke-cim (a markaelem) ---------- */
.karaoke { font-family: var(--felirat); font-weight: 400; font-size: clamp(40px, 5.2vw, 64px); line-height: .95; letter-spacing: .012em; text-transform: uppercase; color: #fff; text-shadow: var(--korvonal); overflow-wrap: anywhere; }
.karaoke .szo { display: inline; }
.karaoke .szo.most { color: var(--sarga); }

/* ---------- Logo ---------- */
.logo { font-family: var(--cim); font-weight: 700; font-size: 24px; color: var(--sarga); text-decoration: none; letter-spacing: .01em; white-space: nowrap; }
.logo:hover { color: var(--sarga); }
.logo span { color: var(--szoveg); }

/* ---------- Gombok ---------- */
.gomb { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent; background: var(--sarga); color: var(--tinta); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; transition: filter .15s, background .15s; }
.gomb:hover { filter: brightness(1.06); color: var(--tinta); }
.gomb.semleges { background: transparent; color: var(--szoveg); border-color: var(--keret); }
.gomb.semleges:hover { background: var(--felulet2); color: var(--szoveg); filter: none; }
.gomb.biztos { background: var(--hiba-bg); color: var(--hiba); border-color: var(--hiba); }
.gomb.biztos:hover { color: var(--hiba); }
.gomb.jo { background: var(--kesz-bg); color: var(--kesz); border-color: var(--kesz); }
.gomb.jo:hover { color: var(--kesz); }
.gomb.kicsi { min-height: 36px; padding: 0 12px; font-size: 14px; }
.gomb[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.gomb svg { width: 18px; height: 18px; flex-shrink: 0; }
.gomb kbd { border-color: currentColor; color: inherit; opacity: .7; }
.linkgomb { border: 0; background: none; padding: 0; color: var(--sarga); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.ikon-gomb { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 8px; border: 1px solid var(--keret); background: transparent; color: var(--szoveg); padding: 0; }
.ikon-gomb:hover { background: var(--felulet2); }
.ikon-gomb.kicsi { width: 36px; height: 36px; }
.gombsor { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Allapotcimkek ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.chip.wait { border: 1px solid var(--sarga); color: var(--sarga); font-weight: 500; }
.chip.perm { background: var(--engedely-bg); color: var(--engedely); }
.chip.ok { background: var(--kesz-bg); color: var(--kesz); }
.chip.pub { background: var(--szoveg); color: var(--tinta); }
.chip.sched { background: var(--utem-bg); color: var(--utem); }
.chip.no { background: #26272D; color: var(--halvany); }
.chip.hiba { background: var(--hiba-bg); color: var(--hiba); }
.chip.inaktiv { background: transparent; border: 1px dashed var(--keret); color: var(--halvany); font-weight: 500; }
.chip .pont { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge { padding: 1px 8px; border-radius: 999px; background: var(--sarga); color: var(--tinta); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.badge:empty { display: none; }
.platform { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--halvany); white-space: nowrap; }
.potty { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; background: var(--halvany); }
.potty.twitch { background: #9146FF; }
.potty.kick { background: #53FC18; }
.potty.youtube { background: #FF3B30; }
.potty.google { background: #FFFFFF; }
.potty.tiktok { background: #25F4EE; box-shadow: 2px 2px 0 #FE2C55; }
.potty.discord { background: #5865F2; }

/* ---------- Mezok ---------- */
.mezo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mezo > span, .mezo > label { font-size: 14px; font-weight: 600; }
.be { min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent; background: var(--felulet2); color: var(--szoveg); width: 100%; }
textarea.be { padding: 10px 12px; min-height: 96px; resize: vertical; line-height: 1.45; font-family: var(--mono); font-size: 14px; }
.be:hover { border-color: var(--keret); }
.be:focus { border-color: var(--sarga); outline: none; box-shadow: 0 0 0 1px var(--sarga); }
.be[aria-invalid="true"] { border-color: var(--hiba); }
.be[readonly] { color: var(--halvany); }
.be::placeholder { color: #80828C; }
.sugo { font-size: 13px; color: var(--halvany); line-height: 1.45; }
.mezo > .sugo { font-size: 13px; font-weight: 400; }
.hibaszoveg { font-size: 14px; color: var(--hiba); }
.hibaszoveg:empty { display: none; }
kbd { font: 12px var(--test); padding: 1px 6px; border: 1px solid var(--keret); border-radius: 4px; color: var(--halvany); white-space: nowrap; }

/* Kapcsolo (role=switch) */
.valto { position: relative; width: 52px; height: 30px; flex-shrink: 0; padding: 0; border-radius: 999px; border: 1px solid var(--keret); background: var(--felulet2); transition: background .2s, border-color .2s; }
.valto::before { content: ""; position: absolute; inset: -8px -4px; }
.valto::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--halvany); transition: transform .25s cubic-bezier(.3, .7, .2, 1.2), background .2s; }
.valto[aria-checked="true"] { background: var(--sarga); border-color: var(--sarga); }
.valto[aria-checked="true"]::after { transform: translateX(22px); background: var(--tinta); }
.valto[disabled] { opacity: .45; cursor: not-allowed; }
.valto-sor { display: flex; align-items: center; gap: 12px; min-height: 44px; }

/* Porgo jel */
.porgo { display: inline-block; width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--sarga); border-top-color: transparent; animation: forog .8s linear infinite; }
@keyframes forog { to { transform: rotate(360deg); } }

/* ---------- Dobozok, allapotok ---------- */
.doboz { padding: 22px; border-radius: 14px; background: var(--felulet); border: 1px solid transparent; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.doboz h2 { font-size: 18px; font-weight: 600; font-family: var(--test); line-height: 1.3; }
.doboz-fej { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.uzenet { padding: 12px 14px; border-radius: 10px; font-size: 15px; line-height: 1.45; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.uzenet.hiba { background: var(--hiba-bg); color: var(--hiba); }
.uzenet.siker { background: var(--kesz-bg); color: var(--kesz); }
.uzenet.figyel { background: var(--engedely-bg); color: #FFD49A; }
.uzenet.info { background: var(--felulet); color: var(--szoveg); }
.ures-allapot { padding: 40px 24px; border-radius: 14px; border: 1px dashed var(--keret); text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; color: var(--halvany); }
.ures-allapot b { color: var(--szoveg); font-size: 18px; }
.ures-allapot p { max-width: 460px; }
.toltes { display: flex; align-items: center; gap: 12px; color: var(--halvany); padding: 24px 0; }

/* ---------- Avatar ---------- */
.avatar { width: 36px; height: 36px; border-radius: 8px; background: var(--sarga); color: var(--tinta); font-family: var(--cim); font-weight: 700; font-size: 20px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; object-fit: cover; overflow: hidden; }
.avatar.nagy { width: 64px; height: 64px; font-size: 34px; border-radius: 12px; }

/* ---------- Klip-kep, lejatszo (9:16) ---------- */
.poszter { position: relative; margin: 0; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: repeating-linear-gradient(135deg, #1F2025 0 10px, #1A1B20 10px 20px); }
.poszter video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.poszter .proc-jel { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; font-size: 13px; color: var(--halvany); text-align: center; padding: 12px; }
.poszter .hossz { position: absolute; right: 8px; top: 8px; padding: 1px 6px; border-radius: 4px; background: rgba(16, 16, 18, .85); color: var(--szoveg); font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; }
.poszter .nemitva { position: absolute; left: 8px; top: 8px; width: 24px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 4px; background: rgba(16, 16, 18, .85); color: var(--halvany); pointer-events: none; }
.poszter .nemitva svg { width: 15px; height: 15px; }
.poszter.szol .nemitva { display: none; }

/* ---------- Toast ---------- */
.toastok { position: fixed; z-index: 60; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; max-width: calc(100vw - 40px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border-radius: 10px; background: var(--szoveg); color: var(--tinta); font-weight: 600; font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); animation: toastbe .2s ease-out; }
.toast.hiba { background: var(--hiba-bg); color: var(--hiba); }
.toast button { border: 0; background: transparent; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; padding: 0 4px; }
@keyframes toastbe { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Parbeszed (dialog) ---------- */
dialog.ablak { width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--keret); border-radius: 14px; background: var(--felulet); color: var(--szoveg); }
dialog.ablak::backdrop { background: rgba(5, 5, 7, .72); }
dialog.ablak form, dialog.ablak > div { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
dialog.ablak h2 { font-family: var(--cim); font-size: 26px; font-weight: 700; }
dialog.ablak .gombsor { justify-content: flex-end; }

/* ============ MUNKATER: KERET ============ */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; min-height: 100svh; }
.oldalsav { background: var(--oldal); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; height: 100svh; overflow-y: auto; }
.oldalsav .logo { font-size: 22px; padding: 4px 12px 18px; }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu a { min-height: 44px; padding: 0 12px; border-radius: 8px; display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 15px; color: var(--halvany); white-space: nowrap; }
.menu a:hover { color: var(--szoveg); background: var(--felulet); }
.menu a[aria-current="page"] { background: var(--felulet2); color: var(--szoveg); font-weight: 600; }
.menu a[aria-current="page"] svg { color: var(--sarga); }
.menu a svg { width: 18px; height: 18px; flex-shrink: 0; }
.menu a .badge { margin-left: auto; }
.menu-cim { margin: 18px 12px 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--halvany); }
.oldalsav .also { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 20px; }
.en { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--szoveg); text-decoration: none; min-width: 0; }
a.en:hover { color: var(--szoveg); background: var(--felulet); }
.en > span:last-child { min-width: 0; }
.en b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.en small { display: block; font-size: 12px; color: var(--halvany); }
.kilep { min-height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: none; display: flex; align-items: center; gap: 10px; color: var(--halvany); font-size: 14px; text-align: left; width: 100%; }
.kilep:hover { color: var(--szoveg); background: var(--felulet); }
.kilep svg { width: 18px; height: 18px; }
.fejsav { display: none; }
.vaszon { min-width: 0; padding: 32px 40px 72px; display: flex; flex-direction: column; gap: 24px; }
.vaszon:focus { outline: none; }
.nezet-fej { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; }
.nezet-fej > div:first-child { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nezet-fej .jobb { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bev { color: var(--halvany); max-width: 720px; }
.vaszon .karaoke:focus { outline: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .fejsav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; position: sticky; top: 0; z-index: 30; background: rgba(11, 11, 13, .94); backdrop-filter: blur(8px); }
  .fejsav .logo { font-size: 22px; }
  /* zarva a menu nem lathato es nem fokuszalhato (visibility), nyitva a tobbi resz inert */
  .oldalsav { position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); visibility: hidden; transition: transform .22s ease-out, visibility 0s linear .22s; }
  .oldalsav.nyitva { transform: none; visibility: visible; transition: transform .22s ease-out; }
  .vaszon { padding: 20px 16px 64px; gap: 20px; }
  .toastok { right: 12px; left: 12px; bottom: 12px; align-items: stretch; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  /* transition: none (nem .01ms): a .01ms minden tulajdonsagra (transition-property: all) atmenetet inditana, es a menu
     linkjei egy kepkockaig lathatatlanok (visibility) maradnanak, igy nem kapnanak fokuszt */
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
  .porgo { animation: none; border-top-color: var(--sarga); opacity: .6; }
}
