/* ========================================
   RESET
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ========================================
   VARIABLES
   ======================================== */

:root {
    --background: #05070d;

    --card:
        rgba(9, 14, 26, 0.88);

    --card-border:
        rgba(255, 255, 255, 0.10);

    --text-primary:
        #f8fafc;

    --text-secondary:
        #94a3b8;

    --accent:
        #8b5cf6;

    --accent-secondary:
        #6366f1;

    --input-background:
        rgba(5, 10, 20, 0.82);

    --input-border:
        rgba(148, 163, 184, 0.18);

    --danger:
        #ef4444;
}


/* ========================================
   GENERAL
   ======================================== */

html,
body {
    width: 100%;
    height: 100%;
}


body {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color:
        var(--text-primary);

    background:
        var(--background);
}


/* ========================================
   LOGIN PAGE
   ======================================== */

.login-page {
    position: relative;

    width: 100vw;
    height: 100vh;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        var(--background);
}


/* ========================================
   VIDEO GRID
   ======================================== */

.video-grid {
    position: fixed;

    inset: 0;

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    grid-template-rows:
        repeat(2, 1fr);

    width: 100vw;
    height: 100vh;

    background: #000;

    overflow: hidden;

    z-index: 0;
}


/* ========================================
   VIDEO PANEL
   ======================================== */

.video-panel {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: hidden;

    background: #000;
}


/* Pequeña separación visual */

.video-panel:nth-child(1),
.video-panel:nth-child(2) {
    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.035);
}


.video-panel:nth-child(1),
.video-panel:nth-child(3) {
    border-right:
        1px solid
        rgba(255, 255, 255, 0.035);
}


/* ========================================
   VIDEO DE FONDO / BLUR
   ======================================== */

.video-background-blur {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 115%;
    height: 115%;

    object-fit: cover;

    transform:
        translate(-50%, -50%)
        scale(1.08);

    filter:
        blur(24px)
        brightness(0.42)
        saturate(1.15);

    opacity: 0.9;

    pointer-events: none;
}


/* ========================================
   VIDEO PRINCIPAL
   ======================================== */

.background-video {
    position: absolute;

    top: 50%;
    left: 50%;

    z-index: 2;

    width: 100%;
    height: 100%;

    object-fit: contain;

    /*
       Menor que 1 = el video se ve más "alejado".

       0.92 → ligeramente alejado
       0.88 → más alejado
       0.84 → bastante alejado
    */

    transform:
        translate(-50%, -50%)
        scale(1.5);

    filter:
        brightness(0.72)
        saturate(0.90);

    transition:
        transform 0.45s ease,
        filter 0.35s ease;
}


/* ========================================
   HOVER VIDEO
   ======================================== */

.video-panel:hover .background-video {
    transform:
        translate(-50%, -50%)
        scale(1.65);

    filter:
        brightness(0.95)
        saturate(1);
}


/* El fondo también cobra un poco de vida */

.video-panel:hover .video-background-blur {
    filter:
        blur(22px)
        brightness(0.50)
        saturate(1.20);
}


/* ========================================
   OVERLAY
   ======================================== */

.video-overlay {
    position: absolute;

    inset: 0;

    z-index: 5;

    pointer-events: none;

    background:
        radial-gradient(
            circle at center,
            rgba(3, 7, 18, 0.72) 0%,
            rgba(3, 7, 18, 0.30) 24%,
            rgba(3, 7, 18, 0.10) 48%,
            rgba(3, 7, 18, 0.22) 100%
        );
}

/* ========================================
   LOGIN CONTAINER
   ======================================== */

.login-container {
    position: relative;

    z-index: 20;

    width: 100%;

    max-width: 360px;

    padding: 16px;
}


/* ========================================
   LOGIN CARD
   ======================================== */

.login-card {
    position: relative;

    width: 100%;

    padding:
        30px
        30px
        22px;

    background:
        linear-gradient(
            145deg,
            rgba(15, 22, 37, 0.91),
            rgba(6, 11, 22, 0.89)
        );

    border:
        1px solid
        var(--card-border);

    border-radius:
        21px;

    box-shadow:
        0 28px 80px
        rgba(0, 0, 0, 0.65),

        inset 0 1px 0
        rgba(255, 255, 255, 0.04);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    overflow: hidden;
}


/* Luz sutil */

.login-card::before {
    content: "";

    position: absolute;

    width: 170px;
    height: 170px;

    top: -120px;
    right: -100px;

    border-radius:
        50%;

    background:
        var(--accent);

    filter:
        blur(80px);

    opacity:
        0.30;

    pointer-events:
        none;
}


/* ========================================
   BRAND
   ======================================== */

.login-brand {
    position: relative;

    text-align: center;

    margin-bottom:
        25px;
}


.login-brand-symbol {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    margin:
        0
        auto
        13px;

    border-radius:
        14px;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            var(--accent-secondary)
        );

    box-shadow:
        0 10px 28px
        rgba(99, 102, 241, 0.32);

    font-size:
        21px;

    font-weight:
        700;

    user-select:
        none;
}


.login-brand h1 {
    margin-bottom:
        5px;

    font-size:
        25px;

    font-weight:
        600;

    letter-spacing:
        -0.6px;
}


.login-brand p {
    color:
        var(--text-secondary);

    font-size:
        12px;
}


/* ========================================
   FORM
   ======================================== */

.login-form {
    display: flex;

    flex-direction:
        column;

    gap:
        16px;
}


.form-group {
    display: flex;

    flex-direction:
        column;

    gap:
        6px;
}


.form-group label {
    color:
        #cbd5e1;

    font-size:
        11px;

    font-weight:
        500;
}


.form-group input {
    width:
        100%;

    height:
        43px;

    padding:
        0
        13px;

    border:
        1px solid
        var(--input-border);

    border-radius:
        10px;

    outline:
        none;

    background:
        var(--input-background);

    color:
        var(--text-primary);

    font-size:
        14px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.form-group input:hover {
    border-color:
        rgba(148, 163, 184, 0.35);
}


.form-group input:focus {
    border-color:
        var(--accent);

    background:
        rgba(5, 10, 20, 0.96);

    box-shadow:
        0 0 0 3px
        rgba(139, 92, 246, 0.13);
}


/* ========================================
   BUTTON
   ======================================== */

.login-button {
    width:
        100%;

    height:
        43px;

    margin-top:
        3px;

    border:
        none;

    border-radius:
        10px;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            var(--accent-secondary)
        );

    color:
        white;

    font-size:
        14px;

    font-weight:
        600;

    cursor:
        pointer;

    transition:
        transform 0.18s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}


.login-button:hover {
    transform:
        translateY(-1px);

    filter:
        brightness(1.08);

    box-shadow:
        0 12px 30px
        rgba(99, 102, 241, 0.30);
}


.login-button:active {
    transform:
        translateY(0);
}


/* ========================================
   ERRORS
   ======================================== */

.login-error {
    padding:
        10px
        12px;

    border:
        1px solid
        rgba(239, 68, 68, 0.25);

    border-radius:
        9px;

    background:
        rgba(239, 68, 68, 0.10);

    color:
        #fca5a5;

    font-size:
        11px;
}


.login-error p {
    margin:
        0;
}


.field-error {
    color:
        #fca5a5;

    font-size:
        11px;
}


.field-error ul {
    padding:
        0;

    list-style:
        none;
}


/* ========================================
   LOGIN FOOTER
   ======================================== */

.login-footer {
    margin-top:
        23px;

    text-align:
        center;

    color:
        #475569;

    font-size:
        8px;

    font-weight:
        600;

    letter-spacing:
        3.5px;
}


/* ========================================
   SOUND CONTROL
   ======================================== */

.sound-control {
    position:
        fixed;

    right:
        20px;

    bottom:
        18px;

    z-index:
        30;

    display:
        flex;

    align-items:
        center;

    gap:
        7px;

    padding:
        9px
        13px;

    border:
        1px solid
        rgba(255, 255, 255, 0.10);

    border-radius:
        20px;

    background:
        rgba(5, 9, 17, 0.72);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);

    color:
        rgba(255, 255, 255, 0.64);

    font-size:
        11px;

    cursor:
        pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}


.sound-control:hover {
    background:
        rgba(11, 17, 30, 0.92);

    border-color:
        rgba(139, 92, 246, 0.40);

    color:
        white;
}


.sound-control.sound-enabled {
    border-color:
        rgba(139, 92, 246, 0.35);

    color:
        #c4b5fd;
}


.sound-icon {
    color:
        #a78bfa;

    font-size:
        14px;
}


/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 700px) {

    .video-grid {
        grid-template-columns:
            1fr 1fr;

        grid-template-rows:
            1fr 1fr;
    }


    .login-container {
        max-width:
            330px;

        padding:
            12px;
    }


    .login-card {
        padding:
            25px
            22px
            20px;
    }


    .login-brand-symbol {
        width:
            44px;

        height:
            44px;
    }


    .login-brand h1 {
        font-size:
            23px;
    }


    .video-overlay {
        background:
            radial-gradient(
                circle at center,
                rgba(3, 7, 18, 0.78) 0%,
                rgba(3, 7, 18, 0.38) 38%,
                rgba(3, 7, 18, 0.18) 100%
            );
    }


    .sound-control {
        right:
            12px;

        bottom:
            12px;
    }

}