/* =========================================================
   IJenz — estilo "YouTuber gigante": colores fuertes,
   letras gruesas con contorno y sombras duras.
   ========================================================= */
:root {
    --bg:      #1a0533;
    --bg-2:    #2b0a52;
    --ink:     #0b0014;
    --white:   #ffffff;
    --pink:    #ff0065;
    --purple:  #8900ff;
    --yellow:  #ffe600;
    --cyan:    #00e5ff;
    --twitch:  #9147ff;
    --youtube: #ff0033;
    --discord: #5865f2;
    --danger:  #ff2a2a;
    --radius:  20px;
    --hard:    6px 6px 0 var(--ink);
    --display: 'Lilita One', 'Arial Black', Impact, sans-serif;
    --body:    'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--purple) var(--bg); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 8px; border: 3px solid var(--bg); }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--body);
    font-weight: 800;
    color: var(--white);
    background:
        radial-gradient(ellipse at 50% 0%, #5a12a8 0%, transparent 60%),
        radial-gradient(ellipse at 100% 100%, rgba(255, 0, 101, .25) 0%, transparent 50%),
        var(--bg);
    overflow-x: hidden;
}

/* rayos de fondo que giran despacio */
.rays {
    position: fixed;
    inset: -50vmax;
    z-index: -1;
    background: repeating-conic-gradient(from 0deg at 50% 50%,
        rgba(255, 255, 255, .055) 0deg 9deg, transparent 9deg 18deg);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 45%);
            mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 45%);
    animation: spin 90s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

a { color: inherit; }
:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }

/* ---------------- botones ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: .5px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--white);
    background: var(--purple);
    border: 4px solid var(--ink);
    border-radius: 16px;
    padding: 12px 22px;
    box-shadow: 0 6px 0 var(--ink);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
    -webkit-text-stroke: 0;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, .35);
}
.btn:hover  { transform: translateY(-3px); box-shadow: 0 9px 0 var(--ink); filter: brightness(1.08); }
.btn:active { transform: translateY(6px);  box-shadow: 0 0 0 var(--ink); }

.btn-lg  { font-size: clamp(18px, 2.4vw, 26px); padding: 16px 30px; border-radius: 20px; }
.btn-sm  { font-size: 14px; padding: 8px 14px; border-width: 3px; border-radius: 12px; box-shadow: 0 4px 0 var(--ink); }
.btn-sm:active { transform: translateY(4px); }

.btn-white   { background: var(--white); color: var(--ink); text-shadow: none; }
.btn-yellow  { background: var(--yellow); color: var(--ink); text-shadow: none; }
.btn-pink    { background: var(--pink); }
.btn-twitch  { background: var(--twitch); }
.btn-youtube { background: var(--youtube); }
.btn-discord { background: var(--discord); }
.btn-kick    { background: #53fc18; color: #0b0014; text-shadow: none; }
.btn-danger  { background: var(--danger); }

/* ---------------- barra superior ---------------- */
.topbar {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.logo {
    font-family: var(--display);
    font-size: 30px;
    text-decoration: none;
    color: var(--white);
    -webkit-text-stroke: 6px var(--ink);
    paint-order: stroke fill;
    text-shadow: 3px 4px 0 var(--pink);
}
.topbar nav { display: flex; align-items: center; gap: 12px; }
.topbar nav form { margin: 0; }
.hello { font-size: 15px; opacity: .9; }

/* ---------------- hero ---------------- */
.hero {
    text-align: center;
    padding: 30px 20px 50px;
    position: relative;
}
.mega {
    margin: 0;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(88px, 21vw, 240px);
    line-height: .9;
    letter-spacing: 2px;
    color: var(--white);
    -webkit-text-stroke: clamp(10px, 1.6vw, 18px) var(--ink);
    paint-order: stroke fill;
    text-shadow:
        clamp(5px, 1vw, 10px) clamp(7px, 1.3vw, 14px) 0 var(--pink),
        clamp(9px, 1.7vw, 18px) clamp(12px, 2.2vw, 24px) 0 var(--ink);
    transform: rotate(-3deg);
    animation: pop .7s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes pop {
    0%   { transform: rotate(-3deg) scale(.4); opacity: 0; }
    100% { transform: rotate(-3deg) scale(1);  opacity: 1; }
}

.sticker {
    display: inline-block;
    font-family: var(--display);
    font-size: clamp(20px, 3vw, 30px);
    color: var(--ink);
    background: var(--yellow);
    border: 4px solid var(--ink);
    border-radius: 14px;
    padding: 6px 18px;
    box-shadow: var(--hard);
    transform: rotate(5deg);
    margin-bottom: 10px;
    animation: wobble 3s ease-in-out infinite;
}
@keyframes wobble { 0%, 100% { transform: rotate(5deg); } 50% { transform: rotate(-2deg) scale(1.05); } }

.tagline {
    font-size: clamp(20px, 3vw, 32px);
    font-weight: 900;
    margin: 34px 0 28px;
    text-shadow: 3px 3px 0 var(--ink);
}
.tagline span { color: var(--cyan); }

.cta { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }

.stats {
    list-style: none;
    margin: 40px auto 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}
.stats li {
    min-width: 130px;
    background: var(--white);
    color: var(--ink);
    border: 4px solid var(--ink);
    border-radius: 18px;
    padding: 10px 18px;
    box-shadow: var(--hard);
}
.stats li:nth-child(1) { transform: rotate(-3deg); }
.stats li:nth-child(2) { transform: rotate(2deg); background: var(--cyan); }
.stats li:nth-child(3) { transform: rotate(-1deg); background: var(--yellow); }
.stats strong { display: block; font-family: var(--display); font-size: 34px; line-height: 1; }
.stats span   { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }

/* ---------------- cinta que corre ---------------- */
.ticker {
    width: 110vw;
    margin: 10px 0 50px -5vw;
    background: var(--yellow);
    border-block: 5px solid var(--ink);
    transform: rotate(-2deg);
    overflow: hidden;
    box-shadow: 0 8px 0 var(--ink);
}
.ticker-track {
    display: flex;
    width: max-content;
    gap: 28px;
    padding: 12px 0;
    font-family: var(--display);
    font-size: clamp(22px, 3vw, 34px);
    color: var(--ink);
    animation: marquee 22s linear infinite;
}
.ticker-track span:nth-child(4n+3) { color: var(--pink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------- títulos de sección ---------------- */
.section-title {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(36px, 6vw, 60px);
    text-transform: uppercase;
    margin: 0 0 28px;
    -webkit-text-stroke: 8px var(--ink);
    paint-order: stroke fill;
    text-shadow: 4px 5px 0 var(--purple);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.count {
    font-size: .5em;
    -webkit-text-stroke: 0;
    text-shadow: none;
    color: var(--ink);
    background: var(--yellow);
    border: 4px solid var(--ink);
    border-radius: 999px;
    padding: 2px 16px;
    box-shadow: 0 4px 0 var(--ink);
    transform: rotate(6deg);
}

/* ---------------- panel de administración ---------------- */
.panel, .videos {
    max-width: 1240px;
    margin: 0 auto 60px;
    padding: 0 20px;
}
.panel {
    padding: 26px;
    max-width: 900px;
    background: var(--bg-2);
    border: 4px solid var(--ink);
    border-radius: 26px;
    box-shadow: 10px 10px 0 var(--ink);
}
.add-form label { display: block; font-size: 16px; margin-bottom: 10px; opacity: .9; }
.add-form textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
    font: 700 15px/1.5 ui-monospace, Menlo, Consolas, monospace;
    color: var(--ink);
    background: var(--white);
    border: 4px solid var(--ink);
    border-radius: 16px;
    padding: 14px;
}
.add-form textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--yellow); }
.panel-actions { margin-top: 16px; text-align: right; }
.danger-zone { margin-top: 22px; padding-top: 18px; border-top: 3px dashed rgba(255, 255, 255, .25); }

/* ---------------- grid de videos ---------------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 34px 28px;
    align-items: start;
}
.card {
    position: relative;
    background: var(--white);
    border: 4px solid var(--ink);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: 8px 8px 0 var(--ink);
    transition: transform .18s ease, box-shadow .18s ease;
}
.card:nth-child(3n+1):hover { transform: translate(-4px, -4px) rotate(-1.2deg); box-shadow: 12px 12px 0 var(--pink); }
.card:nth-child(3n+2):hover { transform: translate(-4px, -4px) rotate(1deg);    box-shadow: 12px 12px 0 var(--cyan); }
.card:nth-child(3n):hover   { transform: translate(-4px, -4px) rotate(-.6deg);  box-shadow: 12px 12px 0 var(--yellow); }

.media {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    border: 3px solid var(--ink);
}
.media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.facade {
    all: unset;
    position: absolute;
    inset: 0;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.facade:hover img { transform: scale(1.06); }
.facade:focus-visible { outline: 4px solid var(--yellow); outline-offset: -6px; }
.play {
    position: relative;
    width: 78px;
    height: 56px;
    background: var(--youtube);
    border: 4px solid var(--ink);
    border-radius: 16px;
    box-shadow: 0 5px 0 var(--ink);
    transition: transform .15s ease;
}
.play::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-35%, -50%);
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent var(--white);
}
.facade:hover .play { transform: scale(1.15) rotate(-4deg); }

.badge-new {
    position: absolute;
    z-index: 2;
    top: -16px;
    left: -12px;
    font-family: var(--display);
    font-size: 20px;
    color: var(--ink);
    background: var(--yellow);
    border: 4px solid var(--ink);
    border-radius: 12px;
    padding: 2px 12px;
    box-shadow: 0 4px 0 var(--ink);
    transform: rotate(-8deg);
    animation: wobble 2.2s ease-in-out infinite;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 4px 2px;
}
.card-foot form { margin: 0; }
.pill {
    font-family: var(--display);
    font-size: 14px;
    text-transform: uppercase;
    color: var(--white);
    border: 3px solid var(--ink);
    border-radius: 999px;
    padding: 3px 12px;
}
.pill-youtube { background: var(--youtube); }
.pill-twitch  { background: var(--twitch); }
.pill-vimeo   { background: #1ab7ea; }
.pill-tiktok  { background: var(--ink); }

.empty { font-size: 22px; grid-column: 1 / -1; text-align: center; opacity: .8; }

/* ---------------- footer ---------------- */
.footer { text-align: center; padding: 40px 20px 60px; }
.socials { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 24px; }
.footer p { font-size: 14px; opacity: .75; }

/* ---------------- avisos ---------------- */
.toasts {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: min(420px, calc(100vw - 32px));
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    color: var(--ink);
    background: var(--white);
    border: 4px solid var(--ink);
    border-radius: 16px;
    box-shadow: var(--hard);
    animation: slide-in .4s cubic-bezier(.2, 1.4, .4, 1) both;
}
.toast-ok    { background: #6cff8a; }
.toast-error { background: #ffb3c9; }
.toast span  { flex: 1; }
.toast-x {
    all: unset;
    cursor: pointer;
    font-family: var(--display);
    font-size: 22px;
    line-height: 1;
}
.toast.hide { animation: slide-out .3s ease forwards; }
@keyframes slide-in  { from { transform: translateX(120%) rotate(6deg); } }
@keyframes slide-out { to   { transform: translateX(120%); opacity: 0; } }

/* ---------------- móvil ---------------- */
@media (max-width: 600px) {
    .hello { display: none; }
    .cta .btn { width: 100%; }
    .panel { margin-inline: 16px; padding: 18px; box-shadow: 6px 6px 0 var(--ink); }
    .grid { gap: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
