:root{
  --bg: #0b0c10;
  --card: rgba(255,255,255,.06);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --line: rgba(255,255,255,.12);
  --accent: #7aa2ff;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 18px;
  --max: 1120px;
  --focus: 0 0 0 3px rgba(122,162,255,.45);
}

html[data-theme="light"]{
  /* Smoked light background (not white) */
  --bg: #eef1f6;

  /* Cards a touch darker to pop */
  --card: rgba(10, 15, 25, .055);

  /* Text: strong but not pure black */
  --text: rgba(10, 12, 18, .90);
  --muted: rgba(10, 12, 18, .62);

  /* Lines: subtle but visible */
  --line: rgba(10, 12, 18, .10);

  /* Accent: slightly deeper blue */
  --accent: #2d5bff;

  /* Shadow: softer + cleaner */
  --shadow: 0 12px 34px rgba(0,0,0,.12);

  /* Focus ring: calm */
  --focus: 0 0 0 3px rgba(45,91,255,.22);
}


*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
}

a{ color: inherit; }
button{ font: inherit; color: inherit; }

.container{ width: min(var(--max), calc(100% - 28px)); margin: 0 auto; }

/* Header */
header{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.hdr{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 10px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  user-select:none;
}
.logo{
  width:34px;height:34px;border-radius:12px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #fff));
  box-shadow: var(--shadow);
}
.brand b{ letter-spacing:.2px; }
.brand small{ display:block; color: var(--muted); margin-top:2px; font-size:12px; }

.hdr-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

/* Control shell */
.ctl{
  position: relative;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.55);
  box-shadow: 0 8px 18px rgba(0,0,0,.05);
}
.ctl:focus-within{ box-shadow: var(--focus); }

.ctl-label{ font-size:12px; color: var(--muted); }

/* Custom dropdown */
.dd-btn{
  border:0;
  background: transparent;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 2px 2px;
  border-radius: 12px;
}
.dd-btn:focus{ outline:none; box-shadow: var(--focus); }
.dd-caret{ color: var(--muted); }

.dd-menu{
  position:absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  box-shadow: var(--shadow);
  overflow:hidden;
  display:none;
  z-index: 20;
}
.dd-menu[aria-hidden="false"]{ display:block; }

.dd-item{
  width:100%;
  text-align:left;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor:pointer;
  color: var(--text);
  font-size: 13px;
}
.dd-item:last-child{ border-bottom:0; }
.dd-item:hover{ background: color-mix(in srgb, var(--card) 70%, transparent); }
.dd-item[aria-selected="true"]{
  background: color-mix(in srgb, var(--accent) 14%, var(--card));
}

/* Main */
main{ padding: 18px 0 60px; }

/* Grid */
.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 980px){ .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px){ .grid{ grid-template-columns: 1fr; } }

.card{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.55);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  overflow:hidden;
}
.cardbtn{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  cursor:pointer;
  width:100%;
  text-align:left;
  color: inherit;
}
.cardbtn:focus{ outline:none; box-shadow: var(--focus); }

.thumb{
  aspect-ratio: 16 / 9;
  width:100%;
  background: radial-gradient(1000px 400px at 30% 30%, rgba(122,162,255,.35), transparent 60%),
              radial-gradient(900px 380px at 70% 55%, rgba(255,255,255,.10), transparent 60%),
              color-mix(in srgb, var(--bg) 70%, #000);
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}
.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  filter: saturate(1.05) contrast(1.02);
}
.play{
  position:absolute;
  width:64px;height:44px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  background: color-mix(in srgb, var(--bg) 45%, transparent);
  backdrop-filter: blur(10px);
  display:grid;
  place-items:center;
  box-shadow: var(--shadow);
}
.play:before{
  content:"";
  width:0;height:0;
  border-left: 12px solid var(--text);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left:2px;
  opacity:.9;
}

.meta{
  padding: 12px 12px 14px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.title{
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: .1px;
  margin: 0;
  font-size: 15px;

  /* 🔽 2 soros vágás */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  overflow: hidden;
}

.sub{
  padding: 5px 0 0;
  margin:0;
  color: var(--muted);
  font-size: 12px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.tag{
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--card) 88%, transparent);
}

/* Load more */
.loadmore-wrap{
  display:flex;
  justify-content:center;
  margin: 20px 0 0;
}
.loadmore{
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--card) 86%, transparent);
  padding: 12px 16px;
  border-radius: 16px;
  cursor:pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset;
}
.loadmore:focus{ outline:none; box-shadow: var(--focus); }

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  z-index: 50;
  display:none;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(10px);
}
.modal[aria-hidden="false"]{ display:flex; }

.modal-inner{
  width: min(1100px, calc(100% - 20px));
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.modal-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
}
.mtitle{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width: 0;
}
.mtitle b{
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mtitle span{
  font-size: 12px;
  color: var(--muted);
}
.close{
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--card) 86%, transparent);
  border-radius: 14px;
  padding: 10px 12px;
  cursor:pointer;
}
.close:focus{ outline:none; box-shadow: var(--focus); }

.player{
  width:100%;
  aspect-ratio: 16 / 9;
  background:#000;
}
.player iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
}

/* Legal body */
.legal-body{
  padding: 14px 14px 18px;
  line-height: 1.45;
  color: var(--muted);
}
.legal-body b{ color: var(--text); }
.legal-body code{
  background: color-mix(in srgb, var(--card) 80%, transparent);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

/* Footer + dropup */
footer{
  border-top: 1px solid var(--line);
  padding: 14px 0 18px;
  color: var(--muted);
}
.ftr{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:wrap;
}
.dropup{ position:relative; }
.dropup > button{
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--card) 86%, transparent);
  border-radius: 14px;
  padding: 10px 12px;
  cursor:pointer;
  color: var(--text);
}
.dropup > button:focus{ outline:none; box-shadow: var(--focus); }

.menu{
  position:absolute;
  right:0;
  bottom: calc(100% + 10px);
  min-width: 190px;
  border-radius: 16px;
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  box-shadow: var(--shadow);
  overflow:hidden;
  display:none;
}
.menu[aria-hidden="false"]{ display:block; }

.legal-item{
  width:100%;
  text-align:left;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor:pointer;
  color: var(--text);
  font-size: 13px;
}
.legal-item:last-child{ border-bottom:0; }
.legal-item:hover{ background: color-mix(in srgb, var(--card) 70%, transparent); }

/* Cookie toast */
.toast{
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 60;
  display:none;
  justify-content:center;
}
.toast[aria-hidden="false"]{ display:flex; }
.toast-inner{
  width: min(980px, 100%);
  border-radius: 18px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  box-shadow: var(--shadow);
  padding: 12px 12px;
  display:flex;
  gap: 12px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
  backdrop-filter: blur(14px);
}
.toast p{
  margin:0;
  color: var(--muted);
  font-size: 13px;
  max-width: 760px;
  line-height: 1.35;
}
.toast-actions{
  display:flex;
  gap: 8px;
  align-items:center;
  flex-wrap:wrap;
}
.btn{
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--card) 86%, transparent);
  padding: 10px 12px;
  border-radius: 14px;
  cursor:pointer;
  color: var(--text);
}
.btn.primary{
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 18%, var(--card));
}
.btn:focus{ outline:none; box-shadow: var(--focus); }

/* Accessibility */
.sr-only{
  position:absolute !important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

noscript{
  display:block;
  margin: 14px auto 0;
  width: min(var(--max), calc(100% - 28px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  color: var(--muted);
}

html[data-theme="light"] header{
  background: rgba(238,241,246,.88);
  backdrop-filter: blur(10px);
}

html[data-theme="light"] .dd-menu,
html[data-theme="light"] .menu{
  background: rgba(255,255,255,.78);
  border-color: rgba(10,12,18,.10);
  box-shadow: 0 16px 44px rgba(0,0,0,.10);
}

html[data-theme="light"] .modal{
  background: rgba(10,12,18,.42);
}

html[data-theme="light"] .thumb img{
  filter: saturate(1.02) contrast(1.00);
}
