:root{
  --bg:#0b0d12;
  --bg-soft:#111522;
  --card:#141a2a;
  --muted:#7f8aa3;
  --text:#e8ecf8;
  --acc1:#7c4dff;     /* gradient 1 */
  --acc2:#00d4ff;     /* gradient 2 */
  --acc3:#2af598;     /* gradient 3 */
  --glass:rgba(255,255,255,.06);
  --blur:12px;
  --radius:18px;
  --shadow:0 10px 30px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background: radial-gradient(1200px 800px at 10% -10%, rgba(124,77,255,.25), transparent 60%),
                        radial-gradient(1000px 900px at 100% 10%, rgba(0,212,255,.18), transparent 55%),
                        var(--bg);
  color:var(--text); font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing:.1px;
}

/* Header */
.ps-header{
  position:sticky; top:0; z-index:5;
  display:flex; align-items:center; gap:18px;
  padding:14px 22px; backdrop-filter:saturate(1.2) blur(10px);
  background:linear-gradient(180deg, rgba(10,12,18,.85), rgba(10,12,18,.6));
  border-bottom:1px solid rgba(255,255,255,.06);
}
.brand{display:flex; align-items:center; gap:12px}
.logo-spark{
  width:36px; height:36px; border-radius:12px;
  background:conic-gradient(from 200deg, var(--acc2), var(--acc1), var(--acc3), var(--acc2));
  box-shadow: inset 0 0 14px rgba(255,255,255,.25), 0 0 22px rgba(124,77,255,.35);
  animation:spin 6s linear infinite paused;
}
.brand:hover .logo-spark{animation-play-state:running}
@keyframes spin {to{transform:rotate(360deg)}}
.brand-text{font-weight:800; font-size:18px; letter-spacing:.4px}
.brand-text b{background:linear-gradient(90deg, var(--acc1), var(--acc2), var(--acc3));
  -webkit-background-clip:text; background-clip:text; color:transparent}

.search{flex:1; display:flex}
.search input{
  width:100%; padding:12px 14px; border-radius:12px; border:1px solid rgba(255,255,255,.08);
  background:var(--bg-soft); color:var(--text); outline:none;
  transition:.25s border, .25s box-shadow;
}
.search input:focus{border-color:rgba(124,77,255,.6); box-shadow:0 0 0 4px rgba(124,77,255,.15)}

.actions .btn{white-space:nowrap}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 14px; border-radius:12px; border:1px solid rgba(255,255,255,.08);
  background:var(--card); color:var(--text); cursor:pointer; transition:.25s transform, .25s box-shadow, .25s background, .25s border;
  box-shadow:var(--shadow);
  text-decoration:none;
}
.btn:hover{transform:translateY(-1px)}
.btn:active{transform:translateY(0)}
.btn.grad{
  background:linear-gradient(135deg, rgba(124,77,255,.12), rgba(0,212,255,.12));
  border-color:rgba(124,77,255,.35);
  text-decoration:none;
  transition: box-shadow .3s ease, transform .2s ease;
}
.btn.grad:hover{
  box-shadow:0 0 12px rgba(124,77,255,.35), 0 0 20px rgba(0,212,255,.25);
}
.btn.primary{
  background:linear-gradient(135deg, var(--acc1), var(--acc2));
  border:none; color:#0b0d12; font-weight:700;
}
.btn.ghost{
  background:transparent; border-color:rgba(255,255,255,.15)
}
.btn.glass-btn{
  background:rgba(255,255,255,.15); border:1px solid rgba(255,255,255,.25); color:#fff
}

main{padding:22px}

/* Grid */
.grid{
  display:grid; grid-template-columns:repeat( auto-fill, minmax(240px, 1fr) ); gap:18px;
}
.card{
  position:relative; overflow:hidden; border-radius:16px; background:var(--card);
  border:1px solid rgba(255,255,255,.06); box-shadow:var(--shadow);
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s;
  text-decoration:none;
  color:inherit;
}
.card:hover{transform:translateY(-4px); border-color:rgba(124,77,255,.35)}
.thumb{
  position:relative; aspect-ratio:16/9; overflow:hidden;
  background:#0f1422;
}
.thumb img{width:100%; height:100%; object-fit:cover; display:block; filter:saturate(1.05) contrast(1.02)}
.thumb::after{
  content:""; position:absolute; inset:auto 0 0 0; height:50%;
  background:linear-gradient(180deg, transparent, rgba(0,0,0,.5));
}
.badge{
  position:absolute; top:10px; left:10px; padding:6px 10px; border-radius:999px;
  background:linear-gradient(135deg, rgba(124,77,255,.9), rgba(0,212,255,.9));
  color:#0b0d12; font-weight:800; font-size:12px; letter-spacing:.3px;
  box-shadow:0 6px 16px rgba(0,0,0,.35)
}
.title{
  padding:12px 14px; font-weight:600; line-height:1.35;
  color:#fff;
  text-decoration:none;
}

/* Player */
.player-shell{max-width:1100px; margin:0 auto}
.player-video{position:relative; border-radius:18px; overflow:hidden; border:1px solid rgba(255,255,255,.08); background:#000; box-shadow:var(--shadow)}
.yt-frame{aspect-ratio:16/9; width:100%}
.video-overlay{
  position:absolute; inset:0; display:grid; place-items:center; background:linear-gradient(180deg, rgba(10,12,18,.65), rgba(10,12,18,.35));
  opacity:1; transition:opacity .35s ease;
}
.video-overlay.hidden{opacity:0; pointer-events:none}
.video-overlay .glass{
  backdrop-filter: blur(var(--blur)) saturate(1.2);
  background: var(--glass);
  border:1px solid rgba(255,255,255,.2);
  border-radius:20px; padding:26px; text-align:center; max-width:520px;
  box-shadow: var(--shadow);
}
.pulse{
  width:56px; height:56px; border-radius:16px; margin:0 auto 12px;
  background:conic-gradient(from 0deg, var(--acc1), var(--acc2), var(--acc3), var(--acc1));
  animation:pulse 1.8s ease-in-out infinite;
}
@keyframes pulse{
  0%{filter:blur(0); transform:scale(.96)}
  50%{filter:blur(2px); transform:scale(1.04)}
  100%{filter:blur(0); transform:scale(.96)}
}

/* Controls */
.controls{
  display:grid; grid-template-columns: 1fr minmax(0, 2fr) 1fr; gap:14px;
  align-items:center; margin-top:14px; padding:12px; background:linear-gradient(180deg, rgba(20,26,42,.9), rgba(17,21,34,.85));
  border:1px solid rgba(255,255,255,.06); border-radius:16px; box-shadow:var(--shadow)
}
.controls .left, .controls .right{display:flex; align-items:center; gap:10px}
.controls .center{min-width:0}
.timeline{display:grid; gap:6px}
.timeline input[type=range]{width:100%}
.time{display:flex; justify-content:space-between; font-size:12px; color:var(--muted)}
.vol input[type=range]{width:110px}
.speed select{
  background:var(--bg-soft); border:1px solid rgba(255,255,255,.12); color:var(--text);
  padding:8px 10px; border-radius:10px
}

/* Empty */
.empty{display:grid; place-items:center; padding:60px 20px; text-align:center; color:var(--muted)}
.empty.hide{display:none}

/* Footer */
.ps-footer{padding:18px 22px; color:var(--muted); border-top:1px solid rgba(255,255,255,.06)}

/* Helpers */
.view{display:none}
.view.active{display:block}
.sr-only{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0)}

/* --- fixes --- */
.card,
.card:visited,
.card:hover,
.card:active {
  text-decoration: none;
  color: inherit;
}

.card .title {
  color: #fff;
  text-decoration: none;
}

/* remove underline + Metro glow on Create button */
.actions a.btn {
  text-decoration: none;
  transition: box-shadow .3s ease, transform .2s ease;
}
.actions a.btn:hover {
  box-shadow:0 0 10px rgba(124,77,255,.4), 0 0 20px rgba(0,212,255,.25);
  transform:translateY(-1px);
}
