/* ==========================================================================
   ESTILOS DE LA PÁGINA EN DIRECTO - GLZCRAFT
   ========================================================================== */

:root {
    --bg-main: #020308;
    --bg-card: rgba(15, 10, 30, 0.65);
    --bg-card-hover: rgba(25, 16, 48, 0.85);
    --surface-border: rgba(179, 60, 255, 0.22);
    --surface-border-hover: rgba(179, 60, 255, 0.55);

    --primary: #b33cff;
    --primary-glow: rgba(179, 60, 255, 0.6);
    --cyan: #00f2fe;
    --cyan-glow: rgba(0, 242, 254, 0.5);
    --danger: #ff4757;
    --danger-glow: rgba(255, 71, 87, 0.6);

    --text-main: #ffffff;
    --text-muted: #a0aabf;
    --text-dim: #6b7280;

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;

    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    background: radial-gradient(circle at 50% 0%, #150826 0%, #020308 100%);
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: 0;
    opacity: 0.35;
    pointer-events: none;
    animation: pulseGlow 10s ease-in-out infinite alternate;
}
.glow-1 { width: clamp(300px, 40vw, 600px); height: clamp(300px, 40vw, 600px); background: var(--primary); top: -10%; left: -10%; }
.glow-2 { width: clamp(250px, 35vw, 500px); height: clamp(250px, 35vw, 500px); background: var(--cyan); bottom: 10%; right: -5%; animation-delay: -5s; }

        .page-container {
            position: relative;
            z-index: 10;
            max-width: 1600px;
            margin: 0 auto;
            /* Cambiamos el primer valor (top) de 6rem a 11rem */
            padding: clamp(11rem, 12vw, 14rem) clamp(1rem, 3vw, 2.5rem) clamp(2rem, 4vw, 3.5rem);
        }

/* Header de Sección */
.stream-header {
    text-align: center;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    animation: fadeInDown 0.8s ease-out forwards;
}
.header-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(179, 60, 255, 0.1);
    border: 1px solid var(--surface-border);
    border-radius: 30px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
    box-shadow: 0 0 20px rgba(179, 60, 255, 0.15);
}
.header-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, #ffffff 40%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.header-subtitle {
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Stream Oficial (Destacado) */
.official-stream-container {
    display: flex;
    justify-content: center;
    margin-bottom: clamp(2rem, 4vw, 4rem);
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}
.official-card {
    flex-direction: row !important;
    width: 100%;
    max-width: 1000px;
    background: rgba(15, 10, 30, 0.85) !important;
    border: 2px solid var(--primary) !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 40px rgba(179, 60, 255, 0.2) !important;
}
.official-card .card-media { width: 60%; height: auto; min-height: 320px; border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.official-card .card-body { width: 40%; justify-content: center; padding: 2.5rem; }
.official-card .streamer-name { font-size: 2rem; color: var(--primary); text-shadow: 0 0 15px var(--primary-glow); margin-bottom: 0.8rem; }
.official-card .stream-title { font-size: 1.05rem; -webkit-line-clamp: 3; }

.official-badge-star {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    margin-bottom: 15px;
    width: fit-content;
}

@media (max-width: 900px) {
    .official-card { flex-direction: column !important; }
    .official-card .card-media { width: 100%; height: 250px; min-height: 250px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
    .official-card .card-body { width: 100%; padding: 1.5rem; }
    .official-card .streamer-name { font-size: 1.5rem; }
}

/* Grilla Normal */
.streams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(280px, 30vw, 360px), 1fr));
    gap: clamp(1.2rem, 2.5vw, 2rem);
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
    opacity: 0;
}
.stream-card {
    background: var(--bg-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    position: relative;
}
.stream-card:hover {
    transform: translateY(-8px) scale(1.015);
    background: var(--bg-card-hover);
    border-color: var(--surface-border-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 30px var(--primary-glow);
}
.card-media { position: relative; width: 100%; height: 200px; overflow: hidden; background: #090414; }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.6s ease; }
.stream-card:hover .card-media img { transform: scale(1.08); }
.card-media-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15, 10, 30, 0.95) 0%, rgba(15, 10, 30, 0.2) 60%, transparent 100%); }

.badge-container { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; z-index: 5; }
.live-badge { background: rgba(255, 71, 87, 0.2); border: 1px solid rgba(255, 71, 87, 0.5); color: #ffffff; padding: 5px 12px; border-radius: 20px; font-size: 0.72rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; display: flex; align-items: center; gap: 7px; backdrop-filter: blur(8px); box-shadow: 0 0 15px var(--danger-glow); }
.pulse-dot { width: 8px; height: 8px; background-color: var(--danger); border-radius: 50%; box-shadow: 0 0 8px var(--danger); animation: livePulse 1.4s infinite; }

.platform-badge { padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 800; display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: 0.5px; backdrop-filter: blur(8px); color: #ffffff; }
.platform-badge.twitch { background: rgba(145, 70, 255, 0.25); border: 1px solid rgba(145, 70, 255, 0.6); color: #d1b3ff; }
.platform-badge.kick { background: rgba(83, 252, 24, 0.15); border: 1px solid rgba(83, 252, 24, 0.5); color: #53FC18; }
.platform-badge.youtube { background: rgba(255, 0, 0, 0.2); border: 1px solid rgba(255, 0, 0, 0.5); color: #ff8080; }
.platform-badge.tiktok { background: rgba(254, 44, 85, 0.2); border: 1px solid rgba(254, 44, 85, 0.5); color: #ff8fa3; }


.viewers-badge { position: absolute; bottom: 12px; right: 14px; z-index: 5; background: rgba(0, 0, 0, 0.65); border: 1px solid rgba(255, 255, 255, 0.15); color: #ffffff; padding: 4px 10px; border-radius: 12px; font-size: 0.78rem; font-weight: 700; display: flex; align-items: center; gap: 5px; backdrop-filter: blur(6px); }

.card-body { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.streamer-name { font-size: 1.35rem; font-weight: 800; color: #ffffff; margin-bottom: 0.4rem; letter-spacing: -0.3px; }
.stream-title { font-size: 0.92rem; color: var(--text-muted); line-height: 1.45; margin-bottom: 1.2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; min-height: 2.7em; }
.card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.uptime { font-size: 0.8rem; color: var(--text-dim); font-weight: 600; display: flex; align-items: center; gap: 5px; }

.btn-watch {
    padding: 0.65rem 1.3rem; border-radius: 30px; font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: #ffffff;
    background: linear-gradient(135deg, var(--secondary), var(--primary)); border: 1px solid rgba(255, 255, 255, 0.2); text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px; transition: var(--transition-smooth); box-shadow: 0 4px 15px rgba(179, 60, 255, 0.3);
}
.btn-watch:hover { transform: scale(1.05); box-shadow: 0 0 25px var(--primary-glow); border-color: #ffffff; }

/* Empty State */
.empty-state-card {
    grid-column: 1 / -1; background: var(--bg-card); border: 1px solid var(--surface-border); border-radius: var(--radius-lg);
    padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem); text-align: center; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6); position: relative; overflow: hidden;
}
.empty-icon-box {
    position: relative; width: 100px; height: 100px; border-radius: 50%; background: rgba(179, 60, 255, 0.08); border: 1px solid var(--surface-border);
    display: flex; justify-content: center; align-items: center; margin-bottom: 1.8rem; animation: floating 4s ease-in-out infinite;
}
.empty-icon-box i { font-size: 3.2rem; color: var(--primary); filter: drop-shadow(0 0 15px var(--primary-glow)); }
.empty-radar-ring { position: absolute; inset: -15px; border: 1px solid var(--primary); border-radius: 50%; opacity: 0; animation: radarPulse 3s cubic-bezier(0.1, 0.8, 0.3, 1) infinite; }
.empty-title { font-size: clamp(1.3rem, 2.8vw, 1.8rem); font-weight: 800; color: #ffffff; margin-bottom: 0.8rem; max-width: 580px; line-height: 1.3; }
.empty-subtitle { font-size: clamp(0.9rem, 1.5vw, 1.05rem); color: var(--text-muted); max-width: 480px; line-height: 1.6; }

/* Skeleton Loaders */
.skeleton-card { height: 380px; background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--radius-lg); position: relative; overflow: hidden; }
.skeleton-card::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent); animation: skeletonShimmer 1.5s infinite; }

/* Animaciones */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes livePulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.8); } 70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(255, 71, 87, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); } }
@keyframes pulseGlow { 0% { transform: scale(1); opacity: 0.25; } 100% { transform: scale(1.2); opacity: 0.45; } }
@keyframes floating { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-12px); } }
@keyframes radarPulse { 0% { transform: scale(0.7); opacity: 0.8; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes skeletonShimmer { 100% { transform: translateX(100%); } }

@media (max-width: 768px) {
    .card-media { height: 170px; }
    .card-body { padding: 1.2rem; }
    .streamer-name { font-size: 1.2rem; }
    .card-footer { flex-direction: column; align-items: stretch; gap: 12px; }
    .btn-watch { justify-content: center; width: 100%; }
}