/* Base */
* { box-sizing: border-box; }
:root {
	--bg: #0f0f12;
	--bg-elev: #15151b;
	--text: #e7e7eb;
	--muted: #a9a9b3;
	--brand: #9146FF;
	--brand-2: #6b2cff;
	--accent: #22d3ee;
	--danger: #ef4444;
	--card: #1b1b22;
	--border: #2a2a35;
	--shadow: 0 10px 30px rgba(0,0,0,.35);
}

body.theme-dark {
	margin: 0;
	font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
	background: radial-gradient(1200px 800px at -20% -20%, rgba(145,70,255,.15), transparent),
		linear-gradient(180deg, #0b0b0e 0%, #0f0f12 100%);
	color: var(--text);
}

/* Topbar */
.topbar {
	position: sticky;
	top: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 16px;
	background: rgba(15, 15, 18, .75);
	backdrop-filter: saturate(120%) blur(12px);
	border-bottom: 1px solid var(--border);
}
.topbar .left { display: flex; align-items: center; gap: 16px; }
.topbar .logo { width: 32px; height: 32px; filter: drop-shadow(0 6px 14px rgba(145,70,255,.45)); animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%,100%{ transform: translateY(0)} 50%{ transform: translateY(-2px)} }
.nav { display: flex; gap: 12px; }
.nav-link { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; transition: color .2s, background .2s; }
.nav-link:hover, .nav-link.active { color: var(--text); background: #191923; }
.right { display: flex; align-items: center; gap: 12px; }
.search { position: relative; }
.search input { width: 260px; background: #191923; border: 1px solid var(--border); color: var(--text); padding: 9px 12px; border-radius: 10px; outline: none; transition: box-shadow .2s, border-color .2s; }
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(145,70,255,.2); }

/* Buttons */
.btn { border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; font-weight: 600; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: white; box-shadow: 0 8px 24px rgba(145,70,255,.35); }
.btn-primary.glow { position: relative; }
.btn-primary.glow::after { content: ""; position: absolute; inset: -2px; background: radial-gradient(120px 40px at 50% 0%, rgba(145,70,255,.6), transparent); filter: blur(12px); border-radius: 12px; z-index: -1; animation: glowpulse 2.5s ease-in-out infinite; }
@keyframes glowpulse { 0%,100%{ opacity:.7 } 50%{ opacity: .3 } }
.btn-ghost { background: #1a1a22; color: var(--text); border: 1px solid var(--border); }

/* Layout */
.sidebar { position: fixed; top: 56px; left: 0; bottom: 0; width: 280px; padding: 16px; overflow: auto; border-right: 1px solid var(--border); background: linear-gradient(180deg, #101014 0%, #0f0f12 100%); }
.content { margin-left: 280px; padding: 18px 24px 80px; }

/* Sidebar */
.sidebar-title { margin: 0 0 8px; font-size: 14px; color: var(--muted); letter-spacing: .03em; text-transform: uppercase; }
.channel-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.channel-item { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; background: transparent; transition: background .2s, transform .2s; }
.channel-item:hover { background: #16161e; transform: translateY(-1px); }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #232334; }
.meta .name { font-weight: 600; }
.meta .game { font-size: 12px; color: var(--muted); }
.viewers { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.live-dot { width: 8px; height: 8px; background: #f43; border-radius: 999px; box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.6);} 80% { box-shadow: 0 0 0 8px rgba(239,68,68,0);} 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0);} }

/* Hero */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; margin-bottom: 28px; }
.hero-media { position: relative; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.hero-thumb { width: 100%; height: 360px; object-fit: cover; transform: scale(1.02); transition: transform .6s ease; }
.hero-media:hover .hero-thumb { transform: scale(1.06); }
.play-pulse { position: absolute; inset: 0; margin: auto; width: 70px; height: 70px; border-radius: 999px; border: 0; background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.9) 0, rgba(255,255,255,.7) 40%, rgba(255,255,255,0) 41%), conic-gradient(from 0deg, rgba(145,70,255,.6), rgba(34,211,238,.6), rgba(145,70,255,.6)); mix-blend-mode: screen; animation: pulse 2.4s ease-out infinite; cursor: pointer; }
@keyframes pulse { 0%{ transform: scale(.9); opacity: .9 } 70%{ transform: scale(1.05); opacity: .8 } 100%{ transform: scale(1); opacity: .6 } }
.hero-info { background: linear-gradient(180deg, #14141b, #121219); border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.hero-badge { display: inline-block; background: #2a1013; color: #ff6b81; border: 1px solid #3a1a1f; padding: 4px 8px; border-radius: 8px; font-weight: 700; letter-spacing: .03em; margin-bottom: 8px; }
.hero-title { margin: 6px 0 8px; font-size: 28px; }
.hero-desc { margin: 0 0 12px; color: var(--muted); }
.hero-stats { display: flex; gap: 16px; margin-bottom: 14px; }
.stat { background: #16161f; border: 1px solid var(--border); padding: 10px 12px; border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.02); }
.stat span { display: block; font-size: 11px; color: var(--muted); }
.stat strong { font-size: 16px; }
.hero-actions { display: flex; gap: 10px; }

/* Shelves */
.shelf { margin-bottom: 28px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.shelf-head h2 { margin: 0; font-size: 20px; }
.link { color: var(--muted); text-decoration: none; }
.card-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.card { position: relative; display: block; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--text); transform: translateY(0); transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.35); }
.card-thumb { width: 100%; height: 160px; object-fit: cover; display: block; }
.card-overlay { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; }
.pill { background: rgba(0,0,0,.5); padding: 4px 8px; border-radius: 999px; font-size: 12px; border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(6px); }
.pill.viewers { display: inline-flex; align-items: center; gap: 6px; }
.card-meta { padding: 10px; }
.card-meta .title { font-weight: 700; margin-bottom: 4px; }
.card-meta .sub { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-block; background: #171723; border: 1px solid var(--border); padding: 3px 8px; border-radius: 999px; font-size: 12px; color: var(--muted); }

/* Categories */
.category-row { display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); gap: 12px; }
.cat { position: relative; display: block; overflow: hidden; border-radius: 12px; border: 1px solid var(--border); }
.cat img { width: 100%; height: 140px; object-fit: cover; filter: saturate(1); transition: transform .3s, filter .3s; }
.cat .label { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,.45); padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); }
.cat:hover img { transform: scale(1.06); filter: saturate(1.15); }

/* Clips */
.clip-row { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 14px; }
.clip { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--text); transition: transform .25s, box-shadow .25s; display: block; }
.clip:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.35); }
.clip-thumb { width: 100%; height: 160px; object-fit: cover; display: block; }
.clip-meta { padding: 10px; }
.clip-title { font-weight: 700; margin-bottom: 4px; }
.clip-sub { color: var(--muted); font-size: 13px; }

/* Floating Action Button */
.fab { position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border); background: radial-gradient(80px 60px at 50% 0, rgba(145,70,255,.5), rgba(34,211,238,.45) 40%, transparent 60%), #16161f; box-shadow: 0 8px 24px rgba(0,0,0,.35); cursor: pointer; }

/* Shimmer for skeleton */
.shimmer { position: relative; overflow: hidden; }
.shimmer::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.06) 20%, rgba(255,255,255,0) 40%); animation: shimmer 2s infinite; }
@keyframes shimmer { 0% { transform: translateX(-100%);} 100% { transform: translateX(100%);} }

/* Responsive */
@media (max-width: 1200px) {
	.card-row, .clip-row { grid-template-columns: repeat(4, 1fr); }
	.category-row { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 900px) {
	.sidebar { width: 76px; padding: 12px; }
	.content { margin-left: 76px; }
	.channel-item { grid-template-columns: 36px; }
	.channel-item .meta, .channel-item .viewers { display: none; }
	.hero { grid-template-columns: 1fr; }
	.hero-thumb { height: 220px; }
}
@media (max-width: 600px) {
	.card-row, .clip-row { grid-template-columns: repeat(2, 1fr); }
	.category-row { grid-template-columns: repeat(3, 1fr); }
	.search input { width: 160px; }
}
