﻿/* ============================================================
   QUAZAR ESTRELLA
   site.css
   CSS GENERAL CONSOLIDADO
============================================================ */


/* ============================================================
   BASE GENERAL
============================================================ */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;
    margin-bottom: 60px;
    background: radial-gradient(circle at center, #020617, #000000);
    color: white;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}


/* ============================================================
   FOCUS / UX
============================================================ */

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}


/* ============================================================
   NAVBAR
============================================================ */

.nav-link {
    font-weight: 500;
}

    .nav-link:hover {
        background-color: #1f1f1f;
        border-radius: 5px;
    }


/* ============================================================
   CONTAINER RESPONSIVE
============================================================ */

.container {
    width: 100%;
    padding: 10px;
    margin: auto;
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1000px;
    }
}

.container-fluid {
    position: relative;
    z-index: 1;
}


/* ============================================================
   FORM / LISTAS
============================================================ */

form {
    margin: 0;
}

ul {
    margin-bottom: 0;
}

.list-group {
    margin-bottom: 0;
}

.list-group-item {
    padding: 12px 16px;
}


/* ============================================================
   TEXTO
============================================================ */

h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: white;
}

a:hover {
    opacity: 0.8;
    transition: 0.2s;
}

pre {
    white-space: normal;
}


/* ============================================================
   BOTONES
============================================================ */

.btn-danger {
    background-color: #e50914;
    border: none;
}


/* ============================================================
   VIDEO GRID
============================================================ */

.video-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax(250px, 1fr) );
    gap: 20px;
}


/* ============================================================
   VIDEO CARD
============================================================ */

.video-card {
    background: #0f172a;
    padding: 10px;
    border-radius: 15px;
    min-width: 220px;
    flex-shrink: 0;
    color: white;
    transition: transform 0.3s ease;
}

    .video-card:hover {
        transform: scale(1.04);
    }


/* ============================================================
   VIDEO HOVER
============================================================ */

.video-hover {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .thumbnail {
    transform: scale(1.08);
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-hover:hover .overlay {
    opacity: 1;
}


/* ============================================================
   VIDEO ELEMENT
============================================================ */

video {
    width: 100%;
    background: #000;
    border-radius: 10px;
    max-height: 100%;
}

.video-player {
    width: 100%;
    max-height: 60vh;
    border-radius: 12px;
}

.video-player-container video {
    max-height: 70vh;
}


/* ============================================================
   VIDEO CONTAINER
============================================================ */

.video-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-ui {
    position: absolute;
    right: 10px;
    bottom: 80px;
    color: white;
}


/* ============================================================
   SCROLL HORIZONTAL
============================================================ */

.scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px;
    scroll-behavior: smooth;
}

    .scroll-container::-webkit-scrollbar {
        display: none;
    }


/* ============================================================
   LIKE BUTTON
============================================================ */

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #222;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

    .like-btn:hover {
        background: #333;
    }

    .like-btn.liked {
        background: #e50914;
    }


/* ============================================================
   SUSCRIBIR
============================================================ */

#subBtn {
    transition: all 0.3s ease;
    border-radius: 20px;
    font-weight: 600;
    padding: 8px 16px;
}

.btn-danger#subBtn {
    background: #ff0000;
    border: none;
}

.btn-secondary#subBtn {
    background: #272727;
    color: #ccc;
    border: none;
}

#subBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
}


/* ============================================================
   CATEGORÍAS
============================================================ */

.category-row {
    margin-bottom: 25px;
}


/* ============================================================
   ANIMACIONES GENERALES
============================================================ */

.pop {
    animation: pop 0.25s ease;
}

@keyframes pop {
    50% {
        transform: scale(1.2);
    }
}


/* ============================================================
   TOAST
============================================================ */

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    opacity: 0;
    transition: 0.3s;
    z-index: 9999;
}

    .toast.show {
        opacity: 1;
    }


/* ============================================================
   TOAST NOTIFICATION
============================================================ */

.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #111;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    opacity: 0;
    transition: 0.3s;
    z-index: 9999;
}

    .toast-notification.show {
        opacity: 1;
    }


/* ============================================================
   NÚCLEO QUAZAR
============================================================ */

.nucleo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.azul {
    background: blue;
}

.rojo {
    background: red;
}

.dorado {
    background: gold;
}

.blanco {
    background: white;
}


/* ============================================================
   CORE / GAMIFICACIÓN
============================================================ */

.thumb-container {
    position: relative;
}

.thumb {
    width: 100%;
    border-radius: 10px;
}

.core {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

    .core.normal {
        background: gray;
    }

    .core.viral {
        background: blue;
        box-shadow: 0 0 10px blue;
    }

    .core.epico {
        background: gold;
        box-shadow: 0 0 20px gold;
    }

    .core.legendario {
        background: linear-gradient(45deg, gold, orange);
        box-shadow: 0 0 15px gold, 0 0 40px orange, 0 0 70px yellow;
        animation: pulseLegend 1s infinite;
    }

@keyframes pulseLegend {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}


/* ============================================================
   POWER BAR
============================================================ */

.power-bar {
    height: 6px;
    background: #1e293b;
    margin-top: 10px;
}

.power-fill {
    height: 100%;
    background: linear-gradient( 90deg, cyan, purple );
}


/* ============================================================
   FLASH CARD
============================================================ */

.flash-card {
    animation: flashAnim 0.5s;
}

@keyframes flashAnim {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 transparent;
    }

    50% {
        transform: scale(1.03);
        box-shadow: 0 0 25px cyan;
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 transparent;
    }
}


/* ============================================================
   XP PANEL
============================================================ */

.xp-panel {
    background: #111;
    color: white;
    padding: 15px;
    border-radius: 15px;
}

.xp-bar {
    width: 100%;
    height: 12px;
    background: #222;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 10px;
}

.xp-fill {
    height: 100%;
    background: linear-gradient( 90deg, #ff512f, #dd2476 );
    border-radius: 20px;
}


/* ============================================================
   GLOW BADGE
============================================================ */

.glow-badge {
    box-shadow: 0 0 15px gold;
    animation: pulseBadge 1.5s infinite;
}

@keyframes pulseBadge {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}


/* ============================================================
   SHORTS
============================================================ */

.shorts-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
}

.short-item {
    width: 100%;
    max-width: 420px;
}

.short-video {
    width: 100%;
    height: 85vh;
    aspect-ratio: 9 / 16;
    max-height: 500px;
    object-fit: cover;
    scroll-snap-align: start;
    border-radius: 15px;
    background: #000;
}

.shorts-container.scrollable {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

.avatar-live {
    animation: avatarPulse 2s infinite;
}

@keyframes avatarPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

.short-info {
    padding: 10px;
}


/* ============================================================
   ENERGY / HOLOGRAM
============================================================ */

.energy-wave {
    animation: wavePulse 1s infinite;
}

@keyframes wavePulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.hologram {
    filter: blur(0.3px);
    opacity: 0.85;
    animation: holoPulse 2s infinite;
}

@keyframes holoPulse {
    0% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.7;
    }
}


/* ============================================================
   CHAT
============================================================ */

.chat-box {
    height: 300px;
    overflow-y: auto;
    background: #111;
    color: white;
    padding: 15px;
    border-radius: 10px;
}

.chat-message {
    padding: 8px;
    margin-bottom: 8px;
    background: #222;
    border-radius: 8px;
}

#messages {
    scroll-behavior: smooth;
}

.message-row {
    animation: messageAppear 0.15s ease-in;
}

.message-bubble {
    word-break: break-word;
    white-space: pre-wrap;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================
   ENLACES DEL CHAT
============================================================ */

.quazar-chat-link {
    color: #8ecbff;
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
    word-break: break-all;
}

    .quazar-chat-link:hover {
        color: #fff;
        text-decoration: underline;
    }


/* ============================================================
   LOGO / BRAND QUAZAR
============================================================ */

.quazar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quazar-logo {
    height: 220px;
    width: auto;
    filter: drop-shadow(0 0 15px #00bfff) drop-shadow(0 0 30px #008cff) drop-shadow(0 0 60px #0066ff);
    animation: logoPulse 3s infinite;
}

.splash-logo {
    max-width: 650px;
    width: 80vw;
    height: auto;
    filter: drop-shadow(0 0 30px #00bfff) drop-shadow(0 0 60px #008cff);
    animation: logoPulse 3s infinite;
}

@keyframes logoPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }

    100% {
        transform: scale(1);
    }
}


/* ============================================================
   THREE.JS BACKGROUND
============================================================ */

.three-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

    .three-bg canvas {
        display: block;
        width: 100%;
        height: 100%;
    }


/* ============================================================
   DASHBOARD
============================================================ */

.dashboard-card {
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}


/* ============================================================
   CALL CONTAINER
============================================================ */

.call-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 100px);
    background: #000;
    overflow: hidden;
    border-radius: 12px;
}

.remote-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.local-video {
    position: absolute;
    right: 20px;
    bottom: 90px;
    width: 220px;
    max-width: 35%;
    border-radius: 12px;
    background: #111;
    border: 2px solid #fff;
}

.call-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
}

    .call-controls button {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        font-size: 20px;
    }


/* ============================================================
   CALL PANEL
============================================================ */

.quazar-call-panel {
    position: relative;
    transition: all 0.25s ease;
}

    .quazar-call-panel.call-rotated {
        transform: rotate(90deg);
        transform-origin: center center;
    }

    .quazar-call-panel.call-minimized {
        display: none !important;
    }

body.quazar-call-active {
    padding-bottom: 20px;
}


/* ============================================================
   MINI CALL
============================================================ */

.quazar-mini-call {
    position: fixed;
    right: 15px;
    bottom: 15px;
    width: 260px;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    z-index: 99999;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.55);
}

.quazar-mini-video {
    position: relative;
    width: 100%;
    height: 160px;
    background: #000;
}

    .quazar-mini-video video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        background: #000;
    }

.quazar-mini-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 7px 9px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 12px;
    background: linear-gradient( transparent, rgba(0, 0, 0, 0.85) );
}

.quazar-mini-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px;
}


/* ============================================================
   FULLSCREEN CALL
============================================================ */

#callPanel:fullscreen {
    background: #000;
    width: 100vw;
    height: 100vh;
    overflow: auto;
}

    #callPanel:fullscreen #localVideo,
    #callPanel:fullscreen #remoteVideo {
        height: 100% !important;
        object-fit: contain !important;
    }


/* ============================================================
   LOCAL VIDEO WRAPPER
============================================================ */

.local-video-wrapper {
    width: 300px;
    height: 220px;
    margin-top: 15px;
    margin-left: auto;
}

#localVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}


/* ============================================================
   REMOTE VIDEO GRID
============================================================ */

.remote-grid {
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax(280px, 1fr) );
    gap: 12px;
    min-height: 300px;
    background: #080808;
    border-radius: 12px;
    padding: 10px;
}

.remote-video-wrapper {
    position: relative;
    height: 300px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

    .remote-video-wrapper video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        background: #000;
    }

.remote-user-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
}


/* ============================================================
   LLAMADA ENTRANTE
============================================================ */

.incoming-call-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.incoming-call-card {
    width: min(420px, 90%);
    background: white;
    border-radius: 20px;
    padding: 35px;
    text-align: center;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.5);
    animation: incomingCallPulse 1s infinite alternate;
}

.incoming-call-icon {
    font-size: 70px;
    margin-bottom: 15px;
}

@keyframes incomingCallPulse {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.03);
    }
}


/* ============================================================
   CAMBIAR CÁMARA
============================================================ */

#btnSwitchCamera {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
}


/* ============================================================
   QUAZAR PRESENTACIÓN / LAUNCH
============================================================ */

#quazarLaunch {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 999999;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.7s ease;
}


/* ============================================================
   VIDEO DE PRESENTACIÓN
============================================================ */

#quazarLaunchVideo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    z-index: 1;
}


/* ============================================================
   OVERLAY PRESENTACIÓN
============================================================ */

.quazarLaunchOverlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 8vh;
    background: linear-gradient( to bottom, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.80) );
    pointer-events: none;
}


/* ============================================================
   LOGO PRESENTACIÓN
============================================================ */

.quazarLaunchLogo {
    width: min(280px, 55vw);
    margin-bottom: 25px;
    filter: drop-shadow( 0 0 25px rgba(255, 255, 255, 0.45) );
    pointer-events: none;
}


/* ============================================================
   INDICADOR DE SONIDO
============================================================ */

.quazarSoundHint {
    margin-bottom: 15px;
    padding: 10px 20px;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.60);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    transition: opacity 0.5s ease;
    animation: quazarSoundPulse 2s infinite;
}

@keyframes quazarSoundPulse {
    0% {
        opacity: 0.60;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.60;
    }
}


/* ============================================================
   BOTÓN ACTIVAR SONIDO
============================================================ */

.quazarSoundButton {
    margin-top: 12px;
    padding: 10px 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    cursor: pointer;
    position: relative;
    z-index: 30;
    transition: all 0.3s ease;
}

    .quazarSoundButton:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: scale(1.03);
    }


/* ============================================================
   BOTONES DE PRESENTACIÓN
============================================================ */

.quazarLaunchButtons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    pointer-events: auto;
}

#enterQuazar {
    min-width: 260px;
    min-height: 55px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    z-index: 20;
    pointer-events: auto;
    box-shadow: 0 0 30px rgba(220, 53, 69, 0.60);
}

#skipQuazar {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.90);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 20px;
    position: relative;
    z-index: 20;
    pointer-events: auto;
}

    #skipQuazar:hover {
        color: #fff;
        text-decoration: underline;
    }


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 768px) {

    /* GENERAL */

    .container {
        padding: 8px;
    }


    /* CALL */

    .call-container {
        height: calc(100vh - 80px);
        border-radius: 0;
    }

    .local-video {
        width: 130px;
        max-width: 40%;
        bottom: 85px;
        right: 10px;
    }

    .quazar-call-panel video {
        max-height: 45vh;
    }


    /* MINI CALL */

    .quazar-mini-call {
        width: 190px;
        right: 10px;
        bottom: 10px;
        border-radius: 12px;
    }

    .quazar-mini-video {
        height: 120px;
    }


    /* FULLSCREEN */

    #callPanel:fullscreen .card-body {
        padding: 5px;
    }

    #callPanel:fullscreen #localVideo,
    #callPanel:fullscreen #remoteVideo {
        min-height: 40vh;
        height: 45vh !important;
    }


    /* REMOTE VIDEOS */

    .remote-grid {
        grid-template-columns: 1fr;
    }

    .remote-video-wrapper {
        height: 240px;
    }


    /* LOCAL VIDEO */

    .local-video-wrapper {
        width: 180px;
        height: 140px;
    }


    /* CHAT */

    #messages {
        height: 55vh !important;
    }


    /* SWITCH CAMERA */

    #btnSwitchCamera {
        width: 48px;
        height: 48px;
        padding: 0;
        border-radius: 50%;
        font-size: 20px;
    }

        #btnSwitchCamera .camera-text {
            display: none;
        }


    /* LAUNCH */

    .quazarLaunchLogo {
        width: 210px;
        margin-bottom: 25px;
    }

    #enterQuazar {
        min-width: 220px;
        min-height: 50px;
        font-size: 16px;
    }
}
