/* style.css v3 — Dark/Light theme + modern video cards */

:root{
  --radius: 18px;
  --max: 1120px;
  --shadow: 0 18px 50px rgba(0,0,0,.18);

  /* default (dark) tokens */
  --bg: #0b1220;
  --bg2: rgba(255,255,255,.06);
  --bg3: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.66);
  --line: rgba(255,255,255,.12);
  --btn: rgba(0,0,0,.18);
  --btnHover: rgba(255,255,255,.12);
  --inputBg: rgba(0,0,0,.22);
}

html[data-theme="light"]{
  --bg: #f6f7fb;
  --bg2: rgba(17,24,39,.05);
  --bg3: rgba(17,24,39,.09);
  --text: rgba(17,24,39,.92);
  --muted: rgba(17,24,39,.62);
  --line: rgba(17,24,39,.14);
  --btn: rgba(17,24,39,.06);
  --btnHover: rgba(17,24,39,.10);
  --inputBg: rgba(17,24,39,.06);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  line-height:1.55;
  background:
    radial-gradient(1000px 600px at 10% 10%, rgba(255,255,255,.14), transparent 55%),
    radial-gradient(1000px 600px at 90% 20%, rgba(255,255,255,.10), transparent 55%),
    var(--bg);
  transition: background .2s ease, color .2s ease;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{ width:min(var(--max), calc(100% - 32px)); margin:0 auto; }

.skip{
  position:absolute; left:-9999px; top:8px;
  padding:10px 12px; background:#fff; color:#111;
  border-radius:10px; z-index:1000;
}
.skip:focus{ left:12px; }

.header{
  position:sticky; top:0; z-index:30;
  backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  border-bottom:1px solid var(--line);
}
.header__inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0; gap:12px;
}

.brand{ display:flex; align-items:center; gap:12px; min-width:0; }
.brand__logo{
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
}

.brand__logo img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand__text{ min-width:0; }
.brand__name{ font-weight:900; letter-spacing:.2px; }
.brand__headline{
  color:var(--muted); font-size:13px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  max-width:52vw;
}

.header__actions{ display:flex; gap:10px; align-items:center; }

/* Theme toggle button */
.tbtn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: var(--btn);
  color: var(--text);
  font-weight: 900;
  font-size: 13px;
  cursor:pointer;
  transition: background .15s ease, transform .08s ease;
}
.tbtn:hover{ background: var(--btnHover); }
.tbtn:active{ transform: translateY(1px); }
.tbtn__icon{
  width: 22px; height: 22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 10px;
  background: color-mix(in oklab, var(--text) 10%, transparent);
  border: 1px solid var(--line);
}
.tbtn__text{ opacity: .9; }

.main{ padding:28px 0 42px; }

.hero{ padding:18px 0; }
.hero__title{
  margin:0 0 8px;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing:-.4px;
}
.hero__bio{
  margin:0 0 16px;
  color:var(--muted);
  max-width: 70ch;
}

.controls{
  display:flex; flex-direction:column; gap:12px;
  padding:14px;
  border:1px solid var(--line);
  background: var(--bg2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: var(--inputBg);
  color: var(--text);
  outline:none;
  transition: background .2s ease, border-color .2s ease;
}
.input::placeholder{ color: color-mix(in oklab, var(--muted) 85%, transparent); }
.input:focus{
  border-color: color-mix(in oklab, var(--text) 22%, transparent);
}

.chips{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{
  cursor:pointer;
  border:1px solid var(--line);
  background: var(--btn);
  color: var(--text);
  padding:8px 10px;
  border-radius:999px;
  font-size:13px;
  font-weight: 800;
  transition: transform .08s ease, background .15s ease;
}
.chip:hover{ transform: translateY(-1px); }
.chip.is-active{
  background: color-mix(in oklab, var(--text) 10%, transparent);
  border-color: color-mix(in oklab, var(--text) 22%, transparent);
}

/* Grid */
.grid{
  display:grid;
  gap:14px;
  margin-top:14px;
  grid-template-columns: 1fr;
}
@media (min-width: 860px){
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1180px){
  .grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Video Card */
.vcard{
  border:1px solid var(--line);
  background: var(--bg2);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  min-height: 100%;
  transition: transform .12s ease, background .2s ease, border-color .2s ease;
}
.vcard:hover{
  transform: translateY(-2px);
  background: var(--bg3);
  border-color: color-mix(in oklab, var(--text) 16%, transparent);
}

.vcard__media{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio: 16 / 9;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  overflow:hidden;
}

.vcard__placeholder{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:8px;
  background:
    radial-gradient(700px 220px at 20% 20%, color-mix(in oklab, var(--text) 10%, transparent), transparent 55%),
    linear-gradient(135deg, color-mix(in oklab, var(--text) 6%, transparent), color-mix(in oklab, var(--bg) 92%, transparent));
}
.vcard__play{
  width:56px; height:56px;
  border-radius: 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: color-mix(in oklab, var(--bg) 75%, transparent);
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(0,0,0,.20);
  font-size: 20px;
}
.vcard__phtext{
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
}

.vimg{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transform: scale(1.02);
  transition: transform .25s ease;
}
.vcard:hover .vimg{ transform: scale(1.06); }

.vcard__overlay{
  position:absolute;
  inset:0;
  pointer-events:none;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 62%);
  mix-blend-mode: normal;
}
html[data-theme="light"] .vcard__overlay{
  background: linear-gradient(to top, rgba(0,0,0,.42), rgba(0,0,0,0) 62%);
}

.vcard__badge{
  position:absolute;
  left:12px;
  bottom:12px;
  font-size:12px;
  font-weight:900;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,.92);
}

.vcard__body{
  padding: 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.vcard__head{
  display:flex;
  gap:10px;
  align-items:flex-start;
  justify-content:space-between;
}
.vcard__title{
  margin:0;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -.2px;
  font-weight: 900;
}
.vcard__date{
  font-size: 12px;
  color: var(--muted);
  white-space:nowrap;
  font-weight: 800;
}

.vcard__desc{
  margin:0;
  color: var(--muted);
  font-size: 13.5px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow:hidden;
  min-height: 3.6em;
}

.vcard__tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.tag{
  font-size: 12px;
  color: color-mix(in oklab, var(--text) 92%, transparent);
  border:1px solid var(--line);
  background: var(--btn);
  padding:6px 10px;
  border-radius: 999px;
  font-weight: 800;
}
.tag--click{
  cursor:pointer;
  transition: transform .08s ease, background .15s ease;
}
.tag--click:hover{
  transform: translateY(-1px);
  background: var(--btnHover);
}

.vcard__actions{
  margin-top:auto;
  display:flex;
  gap:10px;
}
@media (max-width: 420px){
  .vcard__actions{ flex-direction:column; }
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: var(--btn);
  color: var(--text);
  font-weight: 900;
  font-size: 13px;
  cursor:pointer;
  text-decoration:none;
  transition: background .15s ease, transform .08s ease;
}
.btn:hover{ background: var(--btnHover); text-decoration:none; }
.btn:active{ transform: translateY(1px); }
.btn--primary{
  background: color-mix(in oklab, var(--text) 12%, transparent);
  border-color: color-mix(in oklab, var(--text) 22%, transparent);
}
.btn--ghost{ background: var(--btn); }
.btn--sm{ padding: 9px 11px; border-radius: 13px; }

.footer{
  display:flex;
  gap: 12px;
  align-items:center;
  justify-content: space-between;
  padding: 22px 0 8px;
  color: var(--muted);
  flex-wrap: wrap;
}
.footer__left{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; font-weight: 800; }
.footer__right{ display:flex; gap:10px; flex-wrap:wrap; }
.footer__link{
  color: var(--muted);
  border-bottom: 1px dashed color-mix(in oklab, var(--muted) 55%, transparent);
  font-weight: 900;
}
.footer__link:hover{
  color: var(--text);
  border-bottom-color: color-mix(in oklab, var(--text) 45%, transparent);
  text-decoration:none;
}
.dot{ opacity:.6; }

.empty{
  border:1px solid var(--line);
  background: var(--bg2);
  border-radius: var(--radius);
  padding:18px;
  box-shadow: var(--shadow);
}
.empty__title{ font-weight: 1000; margin-bottom:4px; }
.empty__desc{ color: var(--muted); font-weight: 800; }

.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.92);
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
html[data-theme="light"] .toast{
  background: rgba(17,24,39,.78);
  border-color: rgba(17,24,39,.18);
}
.toast.is-show{
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  border:0;
}
.muted{ color: var(--muted); }
