/*
Theme Name: MusicVideo
Description: Plataforma privada de videos y reels, estilo YouTube, con la identidad neón de MusicVideo.
Version: 1.0.0
Author: MusicVideo
Text Domain: musicvideo
Requires PHP: 7.4
*/

/* ============ Tokens ============ */
:root {
	--bg: #07070c;
	--surface: #0f0f17;
	--surface-2: #161622;
	--surface-3: #1e1e2d;
	--border: rgba(255, 255, 255, .08);
	--border-strong: rgba(255, 255, 255, .16);
	--text: #f2f3f8;
	--muted: #9a9cb3;
	--cyan: #00d4ff;
	--blue: #2f6bff;
	--violet: #8b3dff;
	--magenta: #ff2bd6;
	--danger: #ff4d6d;
	--grad: linear-gradient(120deg, var(--cyan) 0%, var(--blue) 35%, var(--violet) 68%, var(--magenta) 100%);
	--grad-soft: linear-gradient(120deg, rgba(0, 212, 255, .16), rgba(139, 61, 255, .16) 60%, rgba(255, 43, 214, .16));
	--glow: 0 0 24px rgba(139, 61, 255, .45), 0 0 48px rgba(0, 212, 255, .18);
	--radius: 14px;
	--topbar: 64px;
	--side: 240px;
	--side-mini: 76px;
	--font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--display: 'Montserrat', var(--font);
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 15px/1.5 var(--font);
	-webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
.muted { color: var(--muted); }
.icon { width: 22px; height: 22px; flex: none; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
[hidden] { display: none !important; }
::selection { background: rgba(139, 61, 255, .5); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ============ Botones / chips ============ */
.btn-primary {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 22px; border-radius: 999px;
	background: var(--grad); background-size: 160% 100%; background-position: 0 0;
	color: #fff; font-weight: 700; letter-spacing: .2px;
	box-shadow: 0 6px 24px rgba(139, 61, 255, .35);
	transition: background-position .4s, transform .15s, box-shadow .3s;
}
.btn-primary:hover { background-position: 100% 0; box-shadow: var(--glow); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-primary .icon { width: 18px; height: 18px; }
.btn-block { width: 100%; }

.chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 8px 14px; border-radius: 999px;
	background: var(--surface-2); border: 1px solid var(--border);
	font-size: 14px; font-weight: 600;
	transition: background .2s, border-color .2s;
}
.chip:hover { background: var(--surface-3); border-color: var(--border-strong); }
.chip .icon { width: 17px; height: 17px; }
.chip-danger:hover { color: var(--danger); border-color: rgba(255, 77, 109, .4); }
.admin-actions { display: flex; gap: 8px; }

.icon-btn {
	display: grid; place-items: center;
	width: 42px; height: 42px; border-radius: 50%;
	transition: background .2s;
}
.icon-btn:hover { background: var(--surface-2); }

/* ============ Formularios ============ */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: #d4d5e2; }
input[type=text], input[type=password], input[type=search], input[type=email], input[type=url], input[type=date], select, textarea {
	width: 100%; padding: 12px 14px;
	background: var(--bg); color: var(--text);
	border: 1px solid var(--border-strong); border-radius: 12px;
	font: inherit; transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus { outline: 0; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 61, 255, .2); }
input[type=file] { width: 100%; color: var(--muted); font-size: 14px; }
input[type=file]::file-selector-button {
	margin-right: 12px; padding: 9px 16px; border-radius: 999px; cursor: pointer;
	background: var(--surface-3); color: var(--text); border: 1px solid var(--border-strong); font: inherit; font-weight: 600;
}
textarea { resize: vertical; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin: 0 0 20px; cursor: pointer; }
.check input { accent-color: var(--violet); width: 16px; height: 16px; }
.notice { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; }
.notice-error { background: rgba(255, 77, 109, .1); border: 1px solid rgba(255, 77, 109, .35); color: #ffb3c1; }

/* ============ Topbar ============ */
.topbar {
	position: fixed; inset: 0 0 auto 0; z-index: 50;
	height: var(--topbar);
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 0 16px;
	background: rgba(7, 7, 12, .85);
	backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--border);
}
.topbar::after {
	content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
	background: var(--grad); opacity: .45;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 14px rgba(139, 61, 255, .45); }
.brand-text { font-family: var(--display); font-weight: 900; font-size: 18px; letter-spacing: .5px; }
.brand-text span { margin-left: 4px; font-weight: 600; letter-spacing: 3px; font-size: 12px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.search { flex: 0 1 600px; display: flex; }
.search input {
	border-radius: 999px 0 0 999px; padding: 10px 18px;
	background: var(--surface); border-right: 0;
}
.search button {
	display: grid; place-items: center;
	width: 64px; border-radius: 0 999px 999px 0;
	background: var(--surface-2); border: 1px solid var(--border-strong);
}
.search button:hover { background: var(--surface-3); }
.search .icon { width: 20px; height: 20px; }

.btn-upload {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 14px;
	background: var(--surface-2); border: 1px solid var(--border-strong);
	position: relative;
}
.btn-upload::before {
	content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
	background: var(--grad);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.btn-upload:hover { box-shadow: var(--glow); }
.btn-upload .icon { width: 18px; height: 18px; }

.avatar {
	display: grid; place-items: center;
	width: 38px; height: 38px; border-radius: 50%;
	background: var(--grad); color: #fff;
	font-family: var(--display); font-weight: 800; font-size: 15px;
}
.avatar-lg { width: 44px; height: 44px; font-size: 18px; }
.user-menu { position: relative; }
.dropdown {
	position: absolute; right: 0; top: calc(100% + 10px);
	width: 270px; padding: 8px;
	background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius);
	box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
	opacity: 0; visibility: hidden; transform: translateY(-6px);
	transition: opacity .18s, transform .18s, visibility .18s;
}
.user-menu.open .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown-head strong { display: block; }
.dropdown-head small { color: var(--muted); }
.dropdown a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; font-size: 14px; }
.dropdown a:hover { background: var(--surface-3); }
.dropdown .icon { width: 20px; height: 20px; color: var(--muted); }

/* ============ Sidebar ============ */
.sidebar {
	position: fixed; z-index: 40; top: var(--topbar); bottom: 0; left: 0;
	width: var(--side); padding: 12px;
	display: flex; flex-direction: column; justify-content: space-between;
	background: var(--bg); overflow-y: auto;
	transition: width .2s, transform .25s;
}
.nav-item {
	display: flex; align-items: center; gap: 18px;
	padding: 10px 14px; margin-bottom: 2px; border-radius: 12px;
	font-size: 14px; font-weight: 500; white-space: nowrap;
	position: relative; transition: background .15s;
}
.nav-item:hover { background: var(--surface-2); }
.nav-item.is-active { background: var(--grad-soft); font-weight: 700; }
.nav-item.is-active::before {
	content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px;
	background: var(--grad);
}
.nav-item.is-active .icon { color: var(--cyan); }
.nav-label { margin: 6px 14px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.sidebar-foot { font-size: 12px; color: var(--muted); padding: 0 14px; }
.sidebar-overlay { display: none; }

.app-main {
	margin-left: var(--side);
	padding: calc(var(--topbar) + 24px) 32px 48px;
	min-height: 100vh;
	transition: margin-left .2s;
}

/* Sidebar mini (escritorio) */
.sidebar-mini .sidebar { width: var(--side-mini); }
.sidebar-mini .app-main { margin-left: var(--side-mini); }
.sidebar-mini .nav-item { flex-direction: column; gap: 4px; padding: 14px 4px; font-size: 10px; }
.sidebar-mini .nav-item.is-active::before { display: none; }
.sidebar-mini .nav-label, .sidebar-mini .sidebar-foot, .sidebar-mini hr { display: none; }

/* ============ Inicio ============ */
.hello { margin-bottom: 28px; }
.hello h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.hello p { color: var(--muted); margin: 6px 0 0; }

.block { margin-bottom: 44px; }
.block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.block-head h1, .block-head h2 { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 800; }
.block-icon {
	display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
	background: var(--grad); box-shadow: 0 4px 18px rgba(139, 61, 255, .4);
}
.block-icon .icon { width: 20px; height: 20px; color: #fff; }
.see-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--muted); padding: 8px 14px; border-radius: 999px; transition: color .2s, background .2s; }
.see-all:hover { color: var(--text); background: var(--surface-2); }
.see-all .icon { width: 16px; height: 16px; }

/* ============ Tarjetas de video ============ */
.video-grid {
	display: grid; gap: 36px 18px;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.vcard-thumb, .mini-thumb {
	position: relative; display: block; overflow: hidden;
	aspect-ratio: 16 / 9; border-radius: var(--radius);
	background: var(--surface-2);
}
.thumb-img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.thumb-empty { background: var(--grad-soft); }
.vcard-thumb:hover .thumb-img { transform: scale(1.03); }
.thumb-preview {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
	opacity: 0; transition: opacity .25s; z-index: 1;
}
.thumb-preview.on { opacity: 1; }
.duration {
	position: absolute; right: 8px; bottom: 8px; z-index: 2;
	padding: 2px 6px; border-radius: 6px;
	background: rgba(0, 0, 0, .8); font-size: 12px; font-weight: 600;
}
.vcard-body { display: flex; gap: 12px; padding-top: 12px; }
.channel-avatar {
	flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
	box-shadow: 0 0 0 2px rgba(139, 61, 255, .4);
}
.channel-avatar img { width: 100%; height: 100%; object-fit: cover; }
.channel-avatar-lg { width: 44px; height: 44px; }
.vcard-title {
	font-family: var(--font); font-size: 16px; font-weight: 600; line-height: 1.35; margin-bottom: 4px;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vcard-meta { display: block; margin: 0; color: var(--muted); font-size: 13px; }

/* ============ Tarjetas de reel ============ */
.reel-shelf {
	display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 210px); gap: 14px;
	overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory;
}
.rcard {
	position: relative; display: block; overflow: hidden; scroll-snap-align: start;
	aspect-ratio: 9 / 16; border-radius: var(--radius);
	background: var(--surface-2);
	transition: transform .2s, box-shadow .25s;
}
.rcard:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.rcard-overlay {
	position: absolute; inset: auto 0 0 0; z-index: 2;
	display: flex; flex-direction: column; gap: 4px;
	padding: 40px 12px 12px;
	background: linear-gradient(transparent, rgba(0, 0, 0, .85));
}
.rcard-title { font-weight: 700; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rcard-meta { font-size: 12px; color: #d0d1dd; }
.grid-reel .rcard { max-width: 220px; }

/* ============ Vacío ============ */
.empty {
	display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
	padding: 48px 20px; border: 1px dashed var(--border-strong); border-radius: 20px;
	background: var(--surface); color: var(--muted);
}
.empty p { margin: 0; }
.empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--grad-soft); color: var(--cyan); }

/* ============ Ver video ============ */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; max-width: 1760px; margin: 0 auto; }
.player-wrap {
	position: relative; border-radius: 18px; overflow: hidden; background: #000;
	box-shadow: 0 0 0 1px var(--border), 0 30px 80px rgba(139, 61, 255, .18);
}
.player { width: 100%; aspect-ratio: 16 / 9; max-height: 78vh; background: #000; }
.watch-title { font-family: var(--font); font-size: 21px; font-weight: 700; margin: 16px 0 12px; }
.watch-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.channel { display: flex; align-items: center; gap: 12px; }
.channel strong { display: block; }
.channel small { color: var(--muted); font-size: 12px; }
.watch-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.description { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); font-size: 14px; }
.description-meta { margin: 0 0 6px; font-weight: 700; }
.description-body { max-height: 66px; overflow: hidden; white-space: pre-line; }
.description-body p { margin: 0 0 8px; }
.description.open .description-body { max-height: none; }
.description-more { margin-top: 6px; font-weight: 700; font-size: 14px; }
.side-title { font-size: 16px; margin-bottom: 14px; }
.mini { display: flex; gap: 10px; margin-bottom: 12px; padding: 4px; border-radius: 12px; transition: background .15s; }
.mini:hover { background: var(--surface); }
.mini-thumb { flex: none; width: 168px; border-radius: 10px; }
.mini-body { display: flex; flex-direction: column; min-width: 0; }
.mini-title { font-weight: 600; font-size: 14px; line-height: 1.35; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini .vcard-meta { font-size: 12px; }

/* ============ Feed de reels ============ */
.single-mv_reel .app-main, .post-type-archive-mv_reel .app-main { padding: var(--topbar) 0 0; }
.reels-feed {
	height: calc(100vh - var(--topbar)); height: calc(100dvh - var(--topbar));
	overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none;
}
.reels-feed::-webkit-scrollbar { display: none; }
.reels-feed > .empty { margin: 40px auto; max-width: 520px; }
.reel {
	height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
	display: flex; align-items: center; justify-content: center; gap: 16px;
	padding: 16px 0;
}
.reel-frame {
	position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: calc(100vw - 100px);
	border-radius: 18px; overflow: hidden; background: #000;
	box-shadow: 0 0 0 1px var(--border), 0 20px 60px rgba(139, 61, 255, .25);
}
.reel-video { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.reel-paused {
	position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; z-index: 2;
	display: grid; place-items: center; border-radius: 50%;
	background: rgba(0, 0, 0, .5); pointer-events: none;
	opacity: 0; transform: scale(.8); transition: opacity .2s, transform .2s;
}
.reel-paused .icon { width: 34px; height: 34px; margin-left: 4px; }
.reel.paused .reel-paused { opacity: 1; transform: none; }
.reel-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .2); z-index: 3; }
.reel-progress span { display: block; height: 100%; width: 0; background: var(--grad); }
.reel-info {
	position: absolute; inset: auto 0 0 0; z-index: 2; pointer-events: none;
	padding: 60px 16px 20px;
	background: linear-gradient(transparent, rgba(0, 0, 0, .85));
}
.reel-author { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.reel-author img { width: 32px; height: 32px; border-radius: 50%; }
.reel-info h2 { font-family: var(--font); font-size: 16px; font-weight: 600; }
.reel-info p { margin: 6px 0 0; font-size: 13px; color: #d6d7e3; }
.reel-actions { display: flex; flex-direction: column; gap: 18px; align-self: flex-end; padding-bottom: 12px; }
.reel-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.reel-btn small { font-size: 12px; }
.reel-btn-icon {
	display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%;
	background: var(--surface-2); border: 1px solid var(--border); transition: background .2s, box-shadow .2s;
}
.reel-btn:hover .reel-btn-icon { background: var(--surface-3); box-shadow: var(--glow); }
.reel .icon-sound { display: none; }
.reel.sound-on .icon-mute { display: none; }
.reel.sound-on .icon-sound { display: block; }
.reel.sound-on .js-mute .reel-btn-icon { background: var(--grad); border-color: transparent; }

/* ============ Subir ============ */
.upload { max-width: 760px; margin: 0 auto; }
.upload-head { margin-bottom: 24px; }
.upload-head h1 { font-size: 30px; font-weight: 800; margin-bottom: 6px; }
.upload-form {
	padding: 28px; border-radius: 22px;
	background: var(--surface); border: 1px solid var(--border);
}
.type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-card {
	display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
	padding: 18px; border-radius: 16px; cursor: pointer;
	background: var(--surface-2); border: 1px solid var(--border-strong);
	transition: border-color .2s, box-shadow .2s, background .2s;
}
.type-card small { color: var(--muted); }
.type-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-3); margin-bottom: 4px; }
.type-option input:checked + .type-card { background: var(--grad-soft); border-color: var(--violet); box-shadow: var(--glow); }
.type-option input:checked + .type-card .type-icon { background: var(--grad); }
.type-option input:focus-visible + .type-card { outline: 2px solid var(--cyan); }

.dropzone {
	position: relative; display: grid; place-items: center; min-height: 240px; margin-bottom: 22px;
	padding: 20px; border-radius: 18px; cursor: pointer; text-align: center;
	border: 2px dashed var(--border-strong); background: var(--bg);
	transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--cyan); background: rgba(0, 212, 255, .05); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dz-empty small { color: var(--muted); }
.dz-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--grad); box-shadow: var(--glow); margin-bottom: 8px; }
.dz-icon .icon { width: 28px; height: 28px; }
.dz-file { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dz-preview { max-height: 320px; border-radius: 12px; background: #000; }
.dz-name { color: var(--muted); }

.progress { margin-bottom: 18px; }
.progress-track { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress-bar { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.progress-text { display: block; margin-top: 6px; color: var(--muted); }

/* ============ Paginación ============ */
.pagination { margin-top: 36px; }
.nav-links { display: flex; justify-content: center; gap: 6px; }
.page-numbers { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); font-weight: 600; }
.page-numbers.current { background: var(--grad); }
.screen-reader-text { position: absolute; clip: rect(0 0 0 0); width: 1px; height: 1px; overflow: hidden; }

/* ============ Portada para visitantes ============ */
.guest { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 40px 20px; overflow: hidden; }
.guest-bg { position: absolute; inset: 0; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: float 14s ease-in-out infinite alternate; }
.orb-1 { width: 520px; height: 520px; background: var(--cyan); top: -160px; left: -140px; opacity: .28; }
.orb-2 { width: 560px; height: 560px; background: var(--magenta); bottom: -200px; right: -160px; opacity: .3; animation-delay: -5s; }
.orb-3 { width: 380px; height: 380px; background: var(--violet); top: 40%; left: 45%; opacity: .25; animation-delay: -9s; }
@keyframes float { to { transform: translate(60px, -40px) scale(1.1); } }

.guest-grid {
	position: relative; z-index: 1; width: 100%; max-width: 1120px;
	display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center;
}
.guest-logo {
	width: 150px; height: 150px; border-radius: 50%; margin-bottom: 26px;
	box-shadow: 0 0 40px rgba(139, 61, 255, .55), 0 0 80px rgba(0, 212, 255, .25);
	animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 60px rgba(255, 43, 214, .55), 0 0 100px rgba(0, 212, 255, .3); } }
.guest-copy h1 { font-size: clamp(40px, 5.5vw, 68px); font-weight: 900; letter-spacing: -1px; }
.lead { font-size: 18px; color: var(--muted); max-width: 480px; margin: 18px 0 28px; }
.guest-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.guest-features li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.guest-features span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--grad-soft); border: 1px solid var(--border); color: var(--cyan); }
.guest-features .icon { width: 19px; height: 19px; }

.login-card {
	position: relative; padding: 34px; border-radius: 24px;
	background: rgba(15, 15, 23, .82); border: 1px solid var(--border);
	backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
	box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.login-card::before {
	content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
	background: var(--grad); opacity: .7;
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.login-card h2 { font-size: 26px; font-weight: 800; }
.login-card > .muted { margin: 6px 0 24px; font-size: 14px; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 48px; }
.pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; color: var(--muted); border-radius: 50%; }
.pass-toggle:hover { color: var(--text); }
.pass-toggle .icon { width: 19px; height: 19px; }
.forgot { display: block; text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.forgot:hover { color: var(--cyan); }
.invite-note {
	display: flex; gap: 10px; align-items: flex-start;
	margin: 22px 0 0; padding: 14px; border-radius: 12px;
	background: var(--surface-2); font-size: 13px; color: var(--muted);
}
.invite-note .icon { width: 18px; height: 18px; color: var(--magenta); margin-top: 1px; }

/* ============ Toast ============ */
.toast {
	position: fixed; left: 50%; bottom: 28px; z-index: 100;
	padding: 12px 20px; border-radius: 999px;
	background: var(--surface-3); border: 1px solid var(--border-strong); font-weight: 600; font-size: 14px;
	transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
	transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ Fechas y orden ============ */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sort {
	display: inline-flex; align-items: center; gap: 4px; padding: 4px;
	background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.sort > .icon { width: 18px; height: 18px; margin: 0 6px 0 8px; color: var(--muted); }
.sort-btn {
	padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted);
	transition: color .2s, background .2s;
}
.sort-btn:hover { color: var(--text); background: var(--surface-2); }
.sort-btn.is-active { color: #fff; background: var(--grad); box-shadow: 0 4px 14px rgba(139, 61, 255, .35); }
.block-head { gap: 12px; flex-wrap: wrap; }

.date-badge {
	position: absolute; left: 8px; top: 8px; z-index: 2;
	display: inline-flex; align-items: center; gap: 5px;
	padding: 3px 8px; border-radius: 999px;
	background: rgba(7, 7, 12, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
	border: 1px solid rgba(255, 255, 255, .12);
	font-size: 11px; font-weight: 700; letter-spacing: .2px;
}
.date-badge .icon { width: 12px; height: 12px; color: var(--cyan); }
.date-pill {
	display: inline-flex; align-items: center; gap: 6px; margin: 0 8px;
	padding: 3px 10px; border-radius: 999px; background: var(--grad-soft); border: 1px solid var(--border);
}
.date-pill .icon { width: 15px; height: 15px; color: var(--cyan); }
.description-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.month-head {
	grid-column: 1 / -1; display: flex; align-items: center; gap: 12px;
	font-size: 18px; font-weight: 800; margin-top: 4px; color: var(--muted);
}
.month-head span { color: var(--text); }
.month-head::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); }
.month-head:not(:first-child) { margin-top: 18px; }
.reels-toolbar { position: fixed; z-index: 30; top: calc(var(--topbar) + 14px); right: 24px; }
.reels-toolbar .sort { background: rgba(15, 15, 23, .85); backdrop-filter: blur(10px); }
.reel-date { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 600; color: #e6e7f2; }
.reel-date .icon { width: 14px; height: 14px; color: var(--cyan); }
.hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.date-input { max-width: 240px; }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .7; cursor: pointer; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
select option { background: var(--surface-2); color: var(--text); }
.notice-success { background: rgba(0, 212, 255, .08); border: 1px solid rgba(0, 212, 255, .35); color: #b5f1ff; }

/* ============ Panel ============ */
.panel { max-width: 1200px; margin: 0 auto; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.panel-head h1 { font-size: 30px; font-weight: 800; margin-bottom: 4px; }
.panel-head p { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat {
	display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px;
	background: var(--surface); border: 1px solid var(--border);
}
.stat strong { display: block; font-family: var(--display); font-size: 22px; font-weight: 800; line-height: 1.1; }
.stat small { color: var(--muted); }
.stat-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--grad-soft); color: var(--cyan); flex: none; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab {
	display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; margin-bottom: -1px;
	font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent;
}
.tab .icon { width: 18px; height: 18px; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-image: var(--grad) 1; border-bottom: 2px solid; }
.tab.is-active .icon { color: var(--cyan); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filters { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }

.items { display: grid; gap: 10px; }
.item {
	display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; align-items: center; gap: 16px;
	padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
	transition: border-color .2s;
}
.item:hover { border-color: var(--border-strong); }
.item-thumb { display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.item-thumb.is-reel { width: 60px; aspect-ratio: 9 / 16; margin: 0 auto; }
.item-body h3 { font-family: var(--font); font-size: 16px; font-weight: 600; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-body h3 a:hover { color: var(--cyan); }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13px; color: var(--muted); }
.item-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.item-meta .icon { width: 15px; height: 15px; }
.item-actions { display: flex; gap: 8px; }
.inline-form { display: inline; margin: 0; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(0, 212, 255, .12); color: var(--cyan); }
.badge-reel, .badge-mv_admin { background: rgba(255, 43, 214, .12); color: var(--magenta); }
.badge-administrator { background: var(--grad); color: #fff; }
.badge-subscriber { background: var(--surface-3); color: var(--muted); }

.back-link { display: inline-block; margin-bottom: 14px; color: var(--muted); font-weight: 600; }
.back-link:hover { color: var(--cyan); }
.form-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; margin-bottom: 20px; }
.form-title .icon { color: var(--cyan); }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.current-thumb img { width: 200px; border-radius: 10px; margin-bottom: 10px; }
.upload-form + .upload-form { margin-top: 20px; }
.panel .upload-form { max-width: 760px; }

.users-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; align-items: start; }
.card { padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.user-form { position: sticky; top: calc(var(--topbar) + 20px); }
.user-list { display: grid; gap: 10px; }
.user-row {
	display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
	padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
}
.user-info { flex: 1; min-width: 160px; }
.user-info strong { display: block; }
.user-info small { color: var(--muted); }
.user-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.pass-change summary { list-style: none; cursor: pointer; }
.pass-change summary::-webkit-details-marker { display: none; }
.pass-change[open] summary { border-color: var(--violet); }
.pass-change form { display: flex; gap: 8px; margin-top: 10px; }
.pass-change .pass-wrap { flex: 1; min-width: 180px; }
.pass-change .btn-primary { padding: 10px 18px; }

.badge-suspended { background: rgba(255, 77, 109, .14); color: var(--danger); }
.user-row.is-suspended { border-color: rgba(255, 77, 109, .3); }
.user-row.is-suspended .avatar { filter: grayscale(1); opacity: .6; }
.chip-warn:hover { color: #ffb020; border-color: rgba(255, 176, 32, .45); }
.chip-ok { color: var(--cyan); border-color: rgba(0, 212, 255, .35); }
.chip .icon-play { width: 14px; height: 14px; }
.edit-user { flex-wrap: wrap; }
.edit-user input { flex: 1 1 160px; }
.upload-status { margin: 0 0 16px; }

/* ============ Me gusta, publicado por, comentarios ============ */
.avatar-sm { width: 32px; height: 32px; font-size: 13px; flex: none; }
.publisher { display: inline-flex; align-items: center; gap: 10px; }
.publisher .avatar-sm { width: 40px; height: 40px; font-size: 16px; }
.publisher small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }
.publisher strong { display: block; font-size: 15px; }
.reel-author .publisher .avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.reel-author .publisher small { color: #d6d7e3; }

.chip-like .icon, .reel .js-like .icon { transition: transform .2s, fill .2s, color .2s; }
.chip-like.is-liked { color: var(--magenta); border-color: rgba(255, 43, 214, .45); background: rgba(255, 43, 214, .1); }
.js-like.is-liked .icon { fill: currentColor; color: var(--magenta); animation: pop .3s; }
.reel .js-like.is-liked .reel-btn-icon { background: rgba(255, 43, 214, .18); border-color: rgba(255, 43, 214, .5); }
@keyframes pop { 50% { transform: scale(1.3); } }

.comments { margin-top: 24px; }
.comments-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.comments-title .icon { color: var(--cyan); }
.comments-count { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--surface-3); font-family: var(--font); font-size: 13px; color: var(--muted); }
.comment-form { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.comment-form textarea { flex: 1; min-height: 44px; resize: none; padding: 11px 14px; border-radius: 14px; line-height: 1.4; }
.comment-form .btn-primary { padding: 11px 18px; }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.comment { display: flex; gap: 12px; padding: 10px; border-radius: 14px; transition: background .15s; }
.comment:hover { background: var(--surface); }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.comment-head time { color: var(--muted); font-size: 12px; }
.comment-head .badge { padding: 1px 8px; font-size: 10px; }
.comment-body p { margin: 4px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.comment-del { align-self: flex-start; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); opacity: 0; transition: opacity .15s, color .15s, background .15s; }
.comment:hover .comment-del, .comment-del:focus-visible { opacity: 1; }
.comment-del:hover { color: var(--danger); background: rgba(255, 77, 109, .1); }
.comment-del .icon { width: 16px; height: 16px; }
@media (hover: none) { .comment-del { opacity: .7; } }
.comments-empty { color: var(--muted); text-align: center; padding: 18px; margin: 0; }

/* Panel lateral (escritorio) / hoja inferior (celular) de comentarios de reels */
.sheet { position: fixed; inset: 0; z-index: 80; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.sheet-panel {
	position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%);
	display: flex; flex-direction: column;
	background: var(--surface); border-left: 1px solid var(--border);
	box-shadow: -30px 0 60px rgba(0, 0, 0, .5); animation: sheet-in .22s ease-out;
}
@keyframes sheet-in { from { transform: translateX(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--border); }
.sheet-head strong { font-family: var(--display); font-size: 17px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 16px 16px; }
.sheet-body .comments { margin-top: 12px; }
.sheet-body .comments-title { display: none; }
.sheet-loading { text-align: center; padding: 30px 0; }

.badge-uploader { background: rgba(0, 212, 255, .12); color: var(--cyan); }

/* Interruptor activar/desactivar */
.switch {
	position: relative; flex: none; width: 44px; height: 24px; border-radius: 999px;
	background: var(--surface-3); border: 1px solid var(--border-strong);
	transition: background .2s, border-color .2s, box-shadow .2s;
}
.switch::after {
	content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
	background: #c9cad6; transition: transform .2s, background .2s;
}
.switch-input:checked + .switch, .switch-btn.is-on .switch { background: var(--grad); border-color: transparent; box-shadow: 0 0 14px rgba(139, 61, 255, .45); }
.switch-input:checked + .switch::after, .switch-btn.is-on .switch::after { transform: translateX(20px); background: #fff; }
.switch-input { position: absolute; opacity: 0; pointer-events: none; }
.switch-input:focus-visible + .switch { outline: 2px solid var(--cyan); outline-offset: 2px; }
.switch-row {
	display: flex; align-items: center; justify-content: space-between; gap: 14px;
	margin-bottom: 18px; padding: 12px 14px; border-radius: 14px; cursor: pointer;
	background: var(--surface-2); border: 1px solid var(--border);
}
.switch-row strong { display: block; font-size: 14px; }
.switch-row small { color: var(--muted); font-size: 12px; }
.switch-btn {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 6px 14px 6px 8px; border-radius: 999px; font-size: 13px;
	background: var(--surface-2); border: 1px solid var(--border);
	transition: border-color .2s;
}
.switch-btn:hover { border-color: var(--border-strong); }
.switch-btn strong { color: var(--muted); }
.switch-btn.is-on strong { color: var(--cyan); }
.my-posts { margin-top: 28px; }
.upload-date-note { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.upload-date-note .icon { width: 17px; height: 17px; color: var(--cyan); }

/* ============ Perfil ============ */
.profile { max-width: 980px; margin: 0 auto; }
.profile-hero {
	position: relative; overflow: hidden;
	display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
	padding: 28px; margin-bottom: 22px; border-radius: 24px;
	background: var(--surface); border: 1px solid var(--border);
}
.profile-hero::before {
	content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
	background: radial-gradient(circle at 0% 0%, rgba(0, 212, 255, .16), transparent 50%), radial-gradient(circle at 100% 100%, rgba(255, 43, 214, .16), transparent 50%);
}
.profile-hero > * { position: relative; }
.profile-hero h1 { font-size: 28px; font-weight: 800; }
.profile-hero p { margin: 4px 0 10px; }
.avatar-xl { width: 88px; height: 88px; font-size: 36px; box-shadow: var(--glow); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
input:disabled { opacity: .55; cursor: not-allowed; }

/* ============ Responsive ============ */
@media (max-width: 1300px) {
	.watch { grid-template-columns: 1fr; }
	.users-layout, .profile-grid { grid-template-columns: 1fr; }
	.user-form { position: static; }
}
@media (max-width: 900px) {
	.stats { grid-template-columns: repeat(2, 1fr); }
	.item { grid-template-columns: 110px minmax(0, 1fr); }
	.item-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 1000px) {
	.sidebar { transform: translateX(-100%); width: var(--side); box-shadow: 20px 0 50px rgba(0, 0, 0, .5); z-index: 60; }
	.sidebar-open .sidebar { transform: none; }
	.sidebar-open .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .55); }
	.app-main, .sidebar-mini .app-main { margin-left: 0; padding-left: 20px; padding-right: 20px; }
	.sidebar-mini .sidebar { width: var(--side); }
	.sidebar-mini .nav-item { flex-direction: row; gap: 18px; padding: 10px 14px; font-size: 14px; }
	.guest-grid { grid-template-columns: 1fr; gap: 36px; max-width: 480px; }
	.guest-copy { text-align: center; }
	.guest-logo { margin-left: auto; margin-right: auto; width: 120px; height: 120px; }
	.lead { margin-left: auto; margin-right: auto; }
	.guest-features { justify-items: center; }
}
@media (max-width: 720px) {
	.brand-text, .btn-upload span { display: none; }
	.search { flex: 1; }
	.search input { padding: 9px 14px; }
	.search button { width: 48px; }
	.topbar { padding: 0 10px; gap: 8px; }
	.app-main { padding: calc(var(--topbar) + 16px) 16px 40px; }
	.video-grid { grid-template-columns: 1fr; gap: 26px; }
	.reel-shelf { grid-auto-columns: 46%; }
	.reel { padding: 0; gap: 0; position: relative; }
	.reel-frame { height: 100%; width: 100%; max-width: none; aspect-ratio: auto; border-radius: 0; }
	.reel-actions { position: absolute; right: 10px; bottom: 90px; z-index: 4; }
	.reel-info { padding-right: 80px; }
	.reel-btn-icon { background: rgba(0, 0, 0, .45); }
	.mini-thumb { width: 140px; }
	.upload-form { padding: 20px; }
	.login-card { padding: 26px 20px; }
	.guest-copy h1 { font-size: 40px; }
	.reels-toolbar { top: calc(var(--topbar) + 10px); right: 10px; }
	.reels-toolbar .sort > .icon { display: none; }
	.stat { padding: 12px; gap: 10px; }
	.stat-icon { width: 36px; height: 36px; }
	.pass-change form { flex-direction: column; }
	.sheet-panel { top: auto; left: 0; width: 100%; height: 75vh; height: 75dvh; border-left: 0; border-top: 1px solid var(--border); border-radius: 20px 20px 0 0; animation-name: sheet-up; }
	.comment-form .avatar-sm { display: none; }
	.reel-actions { gap: 12px; bottom: 70px; }
	.reel-btn-icon { width: 44px; height: 44px; }
}
@keyframes sheet-up { from { transform: translateY(60px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
