/* Cyberpunk Intro Screen Styles */

.hidden {
    display: none !important;
}

.cyberpunk-intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0f14 0%, #1a1f25 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    animation: intro-fade-in 0.4s ease-out forwards; /* Reduced from 0.6s to 0.4s */
    perspective: 1000px;
    overflow: hidden;
}

@keyframes intro-fade-in {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

.circular-loader {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circular-loader .circle {
    position: absolute;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #00c3ff;
    animation: spin 2s linear infinite;
}

.circular-loader .circle-outer {
    width: 180px;
    height: 180px;
    border-width: 4px;
}

.circular-loader .circle-middle {
    width: 140px;
    height: 140px;
    border-width: 3px;
    border-top-color: #ff3366;
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.circular-loader .circle-inner {
    width: 100px;
    height: 100px;
    border-width: 2px;
    border-top-color: #ffcc00;
    animation-duration: 1s;
}

.loader-text {
    position: relative;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 14px;
    z-index: 2;
}

.loader-text .loading-progress {
    display: block;
    margin-top: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #00c3ff;
    text-shadow: 0 0 10px rgba(0, 195, 255, 0.7);
}

.gate {
    position: absolute;
    width: 100%;
    height: 50%;
    background: linear-gradient(135deg, #0a0f14 0%, #1a1f25 100%);
    z-index: 1000;
    transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1); /* Reduced from 1.5s to 1s */
}

.gate-top {
    top: 0;
    border-bottom: 2px solid #00c3ff;
    box-shadow: 0 0 30px rgba(0, 195, 255, 0.3);
    transform-origin: top center;
}

.gate-bottom {
    bottom: 0;
    border-top: 2px solid #00c3ff;
    box-shadow: 0 0 30px rgba(0, 195, 255, 0.3);
    transform-origin: bottom center;
}

.gate-open .gate-top {
    transform: translateY(-100%);
}

.gate-open .gate-bottom {
    transform: translateY(100%);
}

.header-drop {
    transform: translateY(-100px);
    transition: transform 1s ease-out;
    transition-delay: 1s;
}

.header-visible {
    transform: translateY(0);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Circuit decoration for the intro screen */
.circuit-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.3;
    z-index: 1;
}

.circuit-line {
    position: absolute;
    background: #00c3ff;
    box-shadow: 0 0 8px rgba(0, 195, 255, 0.8);
}

.circuit-horizontal {
    height: 2px;
    width: 100px;
}

.circuit-vertical {
    width: 2px;
    height: 100px;
}

.circuit-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00c3ff;
    box-shadow: 0 0 8px rgba(0, 195, 255, 0.8);
}

.circuit-dot-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Progress bar styling */
.progress-container {
    position: relative;
    width: 160px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 15px auto 0;
    overflow: hidden;
}

.progress-bar {
    position: absolute;
    height: 100%;
    background: linear-gradient(90deg, #00c3ff, #ff3366);
    width: 0%;
    transition: width 0.5s ease;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Welcome message that appears after loading */
.welcome-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    z-index: 1005;
    transition: all 0.5s ease;
    width: 100%;
    max-width: 600px;
    pointer-events: none;
}

.welcome-message.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.welcome-message h2 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #00c3ff, #ff3366, #ffcc00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px rgba(0, 195, 255, 0.5), 0 0 30px rgba(0, 195, 255, 0.3);
}

.welcome-message p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 195, 255, 0.5);
}

/* Split welcome message animation */
.welcome-top, 
.welcome-bottom {
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
    background: rgba(10, 15, 22, 0.9);
    padding: 10px;
    border: 1px solid rgba(0, 195, 255, 0.4);
    box-shadow: 0 0 30px rgba(0, 195, 255, 0.4);
    z-index: 1005;
}

.welcome-top {
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    transform-origin: top center;
}

.welcome-bottom {
    border-top: none;
    border-radius: 0 0 5px 5px;
    transform-origin: bottom center;
}

.welcome-top.split-top {
    transform: translateY(-300px) scale(0.9);
    opacity: 0;
}

.welcome-bottom.split-bottom {
    transform: translateY(300px) scale(0.9);
    opacity: 0;
}

.login-form {
    padding: 25px;
    position: relative;
}

.login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--cyber-neon-blue, #00c3ff), transparent);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    color: #8a9bae;
    margin-bottom: 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cyberpunk-input {
    width: 100%;
    background: rgba(16, 23, 33, 0.7);
    border: 1px solid rgba(0, 195, 255, 0.3);
    padding: 12px 15px;
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 0 0 rgba(0, 195, 255, 0);
}

.cyberpunk-input:focus {
    outline: none;
    border-color: var(--cyber-neon-blue, #00c3ff);
    box-shadow: 0 0 15px rgba(0, 195, 255, 0.3);
}

.cyberpunk-input::placeholder {
    color: rgba(138, 155, 174, 0.5);
}

.cyberpunk-btn {
    background: linear-gradient(90deg, #0a1520, #1e293b);
    border: 1px solid rgba(0, 195, 255, 0.6);
    color: var(--cyber-neon-blue, #00c3ff);
    font-family: 'Orbitron', sans-serif;
    padding: 12px 25px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 0 10px rgba(0, 195, 255, 0.2);
}

.cyberpunk-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    background: linear-gradient(90deg, 
        var(--cyber-neon-blue, #00c3ff), 
        var(--cyber-neon-purple, #a742bc),
        var(--cyber-neon-pink, #ff3366),
        var(--cyber-neon-blue, #00c3ff));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
    animation: rotate-gradient 3s linear infinite;
    background-size: 400% 400%;
}

@keyframes rotate-gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.cyberpunk-btn:hover {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    border-color: transparent;
}

.cyberpunk-btn:hover::before {
    opacity: 1;
}

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

.login-footer {
    padding: 0 25px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.login-footer a {
    color: var(--cyber-neon-blue, #00c3ff);
    text-decoration: none;
    position: relative;
}

.login-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--cyber-neon-blue, #00c3ff);
    transition: width 0.3s;
}

.login-footer a:hover::after {
    width: 100%;
}

.login-close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #8a9bae;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.login-close:hover {
    color: var(--cyber-neon-pink, #ff3366);
}

/* Circuit design elements */
.circuit-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.circuit-line {
    position: absolute;
    background: rgba(0, 195, 255, 0.15);
}

.circuit-line-h1 {
    height: 1px;
    width: 40%;
    top: 30%;
    right: 0;
}

.circuit-line-h2 {
    height: 1px;
    width: 25%;
    bottom: 25%;
    left: 0;
}

.circuit-line-v1 {
    width: 1px;
    height: 30%;
    top: 0;
    left: 30%;
}

.circuit-line-v2 {
    width: 1px;
    height: 20%;
    bottom: 0;
    right: 20%;
}

.circuit-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyber-neon-blue, #00c3ff);
    box-shadow: 0 0 8px var(--cyber-neon-blue, #00c3ff);
}

.circuit-dot1 {
    top: 30%;
    right: 40%;
}

.circuit-dot2 {
    bottom: 25%;
    left: 25%;
}

/* Remember me and toggle switch */
.remember-me-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.cyberpunk-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-right: 10px;
}

.cyberpunk-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cyberpunk-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(16, 23, 33, 0.7);
    border: 1px solid rgba(0, 195, 255, 0.3);
    transition: .4s;
}

.cyberpunk-toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 2px;
    background-color: #8a9bae;
    transition: .4s;
}

input:checked + .cyberpunk-toggle-slider {
    background-color: rgba(0, 195, 255, 0.2);
}

input:checked + .cyberpunk-toggle-slider:before {
    transform: translateX(20px);
    background-color: var(--cyber-neon-blue, #00c3ff);
    box-shadow: 0 0 8px var(--cyber-neon-blue, #00c3ff);
}

.cyberpunk-toggle-slider.round {
    border-radius: 20px;
}

.cyberpunk-toggle-slider.round:before {
    border-radius: 50%;
}

.remember-me-label {
    color: #8a9bae;
    font-size: 0.85rem;
}

/* Glitch effect for login button */
.cyberpunk-btn:hover {
    animation: glitch 0.3s linear infinite;
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

/* Scanline effect */
.scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 195, 255, 0.03) 50%
    );
    background-size: 100% 4px;
    z-index: 999;
    pointer-events: none;
}

/* Guest entry button */
.guest-entry {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #8a9bae;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.guest-entry:hover {
    color: var(--cyber-neon-pink, #ff3366);
    text-shadow: 0 0 8px rgba(255, 51, 102, 0.5);
}

/* Animation for when form is submitted */
@keyframes form-submit {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(0);
    }
}

.submitting .cyberpunk-login-container {
    animation: form-submit 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Responsive styling */
@media screen and (max-width: 576px) {
    .cyberpunk-login-container {
        width: 95%;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
}

/* Ensure the login is hidden by default but can be toggled via JavaScript */
.cyberpunk-login-overlay.hidden {
    display: none;
}
