:root{
    --bg: #0b0b0f;
    --card: rgba(255,255,255,.06);
    --card2: rgba(255,255,255,.10);
    --text: #e9e9ee;
    --muted: rgba(255,255,255,.70);
    --accent: #ff2b2b;
    --accent2: #ff9a2b;
    --line: rgba(255,255,255,.10);
    --shadow: 0 20px 60px rgba(0,0,0,.55);
    --radius: 18px;
}

/* Reset básico */
*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
    margin:0;
    font-family: Arial, sans-serif;
    color: var(--text);
    background:
            radial-gradient(900px 500px at 20% 10%, rgba(255,43,43,.22), transparent 60%),
            radial-gradient(900px 500px at 80% 20%, rgba(255,154,43,.18), transparent 55%),
            radial-gradient(900px 500px at 60% 90%, rgba(255,43,43,.12), transparent 60%),
            var(--bg);
}

a{ color: inherit; text-decoration: none; }
a:hover{ opacity:.9; }

/* Layout */
.container{
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px;
}

/* Topbar */
.topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.brand{
    display:flex;
    align-items:center;
    gap:12px;
}

.brand img{
    height: 44px;
    filter: drop-shadow(0 10px 25px rgba(0,0,0,.6));
}

.brand .title{
    display:flex;
    flex-direction:column;
    line-height: 1.1;
}

.brand .title b{
    font-size: 16px;
    letter-spacing: .6px;
}

.brand .title span{
    font-size: 12px;
    color: var(--muted);
}

.userbox{
    display:flex;
    gap:10px;
    align-items:center;
    font-size: 14px;
    color: var(--muted);
}

/* Botones */
.btn{
    border: 1px solid var(--line);
    background: rgba(255,255,255,.06);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
}
.btn:hover{ background: rgba(255,255,255,.10); }

.btn-primary{
    border: none;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: #0b0b0f;
    font-weight: 800;
}
.btn-primary:hover{ filter: brightness(1.05); }

/* Grid de canales */
.grid{
    margin-top: 16px;
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.card{
    border: 1px solid var(--line);
    background: rgba(255,255,255,.05);
    border-radius: var(--radius);
    overflow:hidden;
    box-shadow: var(--shadow);
    transition: transform .15s ease, background .15s ease;
}

.card:hover{
    transform: translateY(-2px);
    background: rgba(255,255,255,.08);
}

.card a{
    display:block;
    padding: 14px;
}

.card .name{
    font-weight: 800;
    letter-spacing: .3px;
}

.card .meta{
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

.page-title{
    margin-top: 18px;
    font-size: 18px;
    color: var(--muted);
}

/* Player */
.player-wrap{
    margin-top: 16px;
    width: 100%;
    height: calc(100vh - 160px);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background:#000;
}

.player-wrap iframe,
.player-wrap video{
    width:100%;
    height:100%;
    border:0;
    background:#000;
}

/* ================= LOGIN ================= */

.auth{
    min-height: 100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding: 24px;
}

.auth-card{
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--line);
    background: linear-gradient(
            180deg,
            rgba(255,255,255,.10),
            rgba(255,255,255,.05)
    );
    border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(0,0,0,.65);
    padding: 22px;
}

.auth-head{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:10px;
    margin-bottom: 18px;
    text-align:center;
}

.auth-head img{
    height: 90px;
    filter: drop-shadow(0 15px 35px rgba(0,0,0,.85));
}

.auth-head .brand-name{
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 1.2px;
}

.auth-head .brand-sub{
    font-size: 13px;
    color: var(--muted);
}

/* Inputs (login) */
.input{
    width: 100%;
    padding: 14px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.45);
    color: var(--text);
    outline: none;
    margin: 10px 0;

    box-shadow:
            inset 0 1px 0 rgba(255,255,255,.06),
            0 10px 25px rgba(0,0,0,.35);

    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.input::placeholder{
    color: rgba(255,255,255,.45);
}

.input:focus{
    border-color: rgba(255,43,43,.55);
    background: rgba(0,0,0,.55);
    box-shadow:
            inset 0 1px 0 rgba(255,255,255,.06),
            0 0 0 4px rgba(255,43,43,.18),
            0 14px 35px rgba(0,0,0,.45);
}

/* Errores */
.error{
    color: #ffb4b4;
    background: rgba(255,43,43,.12);
    border: 1px solid rgba(255,43,43,.25);
    padding: 10px 12px;
    border-radius: 12px;
    margin: 10px 0;
    font-size: 14px;
}

.small{
    font-size: 12px;
    color: var(--muted);
}
.group-title{
    grid-column: 1 / -1;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.78);
    font-weight: 900;
    letter-spacing: .9px;
}

