/* =====================================================
   DDSI — GATE DE ACCESO + MARCA DE AGUA
   Versión: 1.1 — Minimalista
   ===================================================== */

/* =====================================================
   GATE DE ACCESO
   ===================================================== */

#gate-acceso {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    overflow: hidden;
    animation: gate-aparecer 0.5s ease-out;
}

#gate-acceso::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(ellipse at 50% 40%, rgba(0, 200, 60, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

@keyframes gate-aparecer {
    from { opacity: 0; }
    to { opacity: 1; }
}

#gate-acceso.gate-saliendo {
    animation: gate-salir 0.6s ease-in forwards;
}

@keyframes gate-salir {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.05); filter: blur(8px); }
}

.gate-contenedor {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 400px;
    width: 90%;
    padding: 0 24px;
    animation: gate-contenedor-entrada 0.7s ease-out 0.1s both;
}

@keyframes gate-contenedor-entrada {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Logo */
.gate-logo-wrapper {
    margin-bottom: 36px;
    display: flex;
    justify-content: center;
}

.gate-logo {
    width: 260px;
    max-width: 80vw;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 40px rgba(0, 200, 60, 0.2));
    animation: gate-logo-pulso 4s ease-in-out infinite;
}

@keyframes gate-logo-pulso {
    0%, 100% { filter: drop-shadow(0 0 40px rgba(0, 200, 60, 0.2)); }
    50% { filter: drop-shadow(0 0 60px rgba(0, 200, 60, 0.35)); }
}

/* Formulario */
.gate-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 320px;
    margin: 0 auto;
}

.gate-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.gate-input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    font-family: 'OpenDyslexic', 'Comic Sans MS', 'Trebuchet MS', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #d0e8d8;
    background: rgba(0, 200, 60, 0.05);
    border: 1px solid rgba(0, 200, 60, 0.2);
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    letter-spacing: 2px;
    text-align: center;
}

.gate-input::placeholder {
    color: #3a5a40;
    letter-spacing: 1px;
    font-size: 13px;
}

.gate-input:focus {
    border-color: rgba(0, 200, 60, 0.45);
    background: rgba(0, 200, 60, 0.08);
    box-shadow: 0 0 24px rgba(0, 200, 60, 0.1);
}

.gate-input-error {
    animation: gate-shake 0.4s ease-in-out;
    border-color: #c0392b !important;
    background: rgba(192, 57, 43, 0.08) !important;
}

@keyframes gate-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

.gate-toggle-ver {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    opacity: 0.4;
    transition: opacity 0.2s;
    line-height: 1;
}

.gate-toggle-ver:hover {
    opacity: 0.8;
}

.gate-btn {
    margin-top: 4px;
    padding: 13px 24px;
    font-family: 'OpenDyslexic', 'Comic Sans MS', 'Trebuchet MS', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #000000;
    background: linear-gradient(135deg, #00c83c, #00e048);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 200, 60, 0.2);
    text-transform: uppercase;
    line-height: 1.5;
}

.gate-btn:hover {
    background: linear-gradient(135deg, #00e048, #2aff5e);
    box-shadow: 0 6px 28px rgba(0, 200, 60, 0.3);
    transform: translateY(-1px);
}

.gate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 200, 60, 0.15);
}

.gate-error {
    font-family: 'OpenDyslexic', 'Comic Sans MS', 'Trebuchet MS', sans-serif;
    font-size: 13px;
    color: #e74c3c;
    margin: 4px 0 0 0;
    line-height: 1.5;
    animation: gate-aparecer 0.3s ease;
}

/* =====================================================
   MARCA DE AGUA — Diagonal semitransparente
   ===================================================== */

#marca-de-agua {
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    z-index: 9998;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 120px;
    transform: rotate(-35deg);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.watermark-linea {
    display: block;
    white-space: nowrap;
    font-family: 'OpenDyslexic', 'Comic Sans MS', 'Trebuchet MS', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: rgba(0, 180, 100, 0.07);
    letter-spacing: 4px;
    text-transform: uppercase;
    line-height: 1;
    padding: 8px 0;
}

.watermark-linea:nth-child(even) {
    padding-left: 180px;
}

.watermark-linea:nth-child(3n) {
    padding-left: 90px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {
    .gate-logo {
        width: 200px;
    }

    .gate-input {
        font-size: 14px;
        padding: 12px 44px 12px 14px;
    }

    .gate-btn {
        padding: 12px 20px;
        font-size: 13px;
    }

    .watermark-linea {
        font-size: 12px;
        letter-spacing: 3px;
    }

    #marca-de-agua {
        gap: 80px;
    }
}

@media (max-width: 480px) {
    .gate-logo {
        width: 170px;
    }

    .watermark-linea {
        font-size: 10px;
        letter-spacing: 2px;
    }

    #marca-de-agua {
        gap: 60px;
    }
}
