/* === Gate Page Styles === */

.gate-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 999999;
    overflow: hidden;
}

/* Subtle ambient glow */
.gate-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease;
}

.gate-glow-1 {
    background: #764ba2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.gate-page.active .gate-glow-1 {
    opacity: 0.12;
}

.gate-glow-2 {
    background: #FF69B4;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
}

.gate-page.active .gate-glow-2 {
    opacity: 0.08;
    animation: gateGlowPulse 4s ease-in-out infinite;
}

@keyframes gateGlowPulse {
    0%, 100% { opacity: 0.06; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.12; transform: translate(-50%, -50%) scale(1.2); }
}

/* Gate form container */
.gate-form {
    position: relative;
    z-index: 10;
    width: 360px;
    max-width: 90vw;
    text-align: center;
    animation: gateFormIn 0.8s ease-out;
}

@keyframes gateFormIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gate input */
.gate-input-wrap {
    position: relative;
    margin-bottom: 24px;
}

.gate-input {
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    letter-spacing: 3px;
    text-align: center;
    outline: none;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    font-family: 'Courier New', monospace;
    box-sizing: border-box;
}

.gate-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 1px;
    font-family: inherit;
}

.gate-input:focus {
    border-bottom-color: transparent;
    box-shadow: 0 1px 0 0 rgba(118, 75, 162, 0.6),
                0 2px 0 0 rgba(255, 105, 180, 0.3);
}

/* Animated underline on focus */
.gate-input-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #764ba2, #FF69B4);
    transition: width 0.4s ease, left 0.4s ease;
    border-radius: 1px;
}

.gate-input:focus ~ .gate-input-line {
    width: 100%;
    left: 0;
}

/* Error state */
.gate-input.error {
    animation: gateShake 0.4s ease;
    border-bottom-color: rgba(255, 80, 80, 0.5);
}

.gate-input.error ~ .gate-input-line {
    background: #ff5050;
    width: 100%;
    left: 0;
}

@keyframes gateShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* Gate button */
.gate-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    letter-spacing: 4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s ease;
    font-family: inherit;
}

.gate-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 20px rgba(118, 75, 162, 0.15);
}

.gate-btn:active {
    transform: scale(0.98);
}

.gate-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* Remember checkbox */
.gate-remember {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    cursor: pointer;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
    transition: color 0.3s;
}

.gate-remember:hover {
    color: rgba(255, 255, 255, 0.4);
}

.gate-remember input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #764ba2;
    cursor: pointer;
}

/* Hint text */
.gate-hint {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.08);
    letter-spacing: 2px;
    pointer-events: none;
}

/* Success transition */
.gate-page.success {
    animation: gateSuccess 0.6s ease forwards;
}

@keyframes gateSuccess {
    0% { opacity: 1; }
    100% { opacity: 0; pointer-events: none; }
}

@media (max-width: 480px) {
    .gate-form {
        width: 90vw;
    }
    .gate-input {
        font-size: 14px;
        letter-spacing: 2px;
    }
}
