@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Share+Tech+Mono&display=swap');

:root {
    --primary: #00FFAB;
    --primary-dim: rgba(0, 255, 171, 0.7);
    --primary-glow: rgba(0, 255, 171, 0.3);
    --bg-dark: #0a0a14;
    --bg-panel: #1b1b2f;
    --text-bright: #e0ffe9;
    --error-bg: rgba(255, 0, 0, 0.8);
    --success-bg: rgba(0, 255, 0, 0.8);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    background-color: var(--bg-dark);
    color: var(--primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    overflow: hidden;
    position: relative;
}

.form-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0;
    background: #070711 url('/static/login-background.webp') center / cover no-repeat;
    transition: opacity 180ms ease;
}

.form-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 28%, rgba(0, 0, 0, 0.58) 100%);
}

.two-box-form-page #preloader {
    opacity: 1;
    visibility: visible;
}

.two-box-form-page.form-background-ready .form-background {
    opacity: 1;
}

.two-box-form-page.form-background-ready #preloader {
    opacity: 0;
    visibility: hidden;
}

.two-box-form-page .preloader-spinner {
    width: 180px;
    height: 5px;
    border: 1px solid var(--primary-dim);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    animation: none;
}

.two-box-form-page .preloader-spinner::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 42%;
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary);
    animation: loginLoading 1.1s ease-in-out infinite;
}

@keyframes loginLoading {
    from { transform: translateX(-110%); }
    to { transform: translateX(250%); }
}

.two-box-form-container {
    width: 100%;
    max-width: 500px;
    background-color: #1b1b2f8f;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 255, 171, 0.3);
    border: 3px solid var(--primary);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
    transform: rotateX(3deg);
    transition: all 0.5s ease;
}

.two-box-form-container:hover {
    transform: rotateX(0deg) scale(1.02);
    box-shadow: 0 25px 80px rgba(0, 255, 171, 0.5);
}


header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

h1 {
    font-family: 'Press Start 2P', cursive;
    color: var(--text-bright);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.5rem;
    text-shadow: 0 0 15px var(--primary);
    animation: glitch 2s infinite;
    position: relative;
}

@keyframes glitch {
    2%, 64% { transform: translate(2px, 0) skew(0deg); }
    4%, 60% { transform: translate(-2px, 0) skew(0deg); }
    62% { transform: translate(0, 0) skew(5deg); }
}

.form-container {
    position: relative;
    z-index: 2;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-weight: bold;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--primary);
    border: 2px solid var(--primary-dim);
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    outline: none;
    transform: scale(1.02);
}

.input-info {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 5px;
    font-style: italic;
}

.two-box-form-button {
    width: 100%;
    padding: 12px;
    background-color: rgba(0, 255, 171, 0.2);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.two-box-form-button:hover {
    background-color: var(--primary);
    color: #000;
    box-shadow: 0 0 30px var(--primary-glow);
    transform: translateY(-3px);
}

.two-box-form-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(0, 255, 171, 0.2), transparent);
    transition: left 0.5s ease;
}

.two-box-form-button:hover::before {
    left: 100%;
}

.finalize-btn {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 217, 0, 0.2);
    color: var(--secondary, #FFD900);
    border: 2px solid var(--secondary, #FFD900);
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: 10px 0;
    letter-spacing: 1px;
}

.finalize-btn:hover {
    background-color: var(--secondary, #FFD900);
    color: #000;
    box-shadow: 0 0 30px rgba(255, 217, 0, 0.6);
    transform: translateY(-3px);
}

.finalize-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 217, 0, 0.3), transparent);
    transition: left 0.5s ease;
}

.finalize-btn:hover::before {
    left: 100%;
}

.skip-btn {
    width: 100%;
    padding: 12px;
    background-color: rgba(150, 150, 150, 0.1);
    color: var(--tertiary, #AAA);
    border: 2px dashed var(--tertiary, #AAA);
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: 10px 0;
    font-size: 0.9em;
}

.skip-btn:hover {
    background-color: rgba(150, 150, 150, 0.3);
    color: #FFF;
    box-shadow: 0 0 15px rgba(150, 150, 150, 0.4);
    transform: translateY(-2px);
}

.skip-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(150, 150, 150, 0.2), transparent);
    transition: left 0.5s ease;
}

.skip-btn:hover::before {
    left: 100%;
}

.step-message {
    font-size: 1.1rem;
    margin-top: 5px;
    margin-bottom: 25px;
    font-style: italic;
    text-align: center;
    text-wrap: pretty;
    line-height: 1.8rem;
}

footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.8rem;
    opacity: 0.7;
    color: var(--primary-dim);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: 8px;
    color: white;
    font-family: 'Share Tech Mono', monospace;
    z-index: 1000;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    opacity: 0;
    transition: all 0.5s ease;
}

.notification.error {
    background-color: var(--error-bg);
    border: 2px solid red;
}

.notification.success {
    background-color: var(--success-bg);
    border: 2px solid green;
}

.notification.show {
    opacity: 1;
    top: 30px;
}

/* Login Transition Improvements */
.login-transition {
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    transform-origin: center bottom;
}

.login-transition.activate {
    transform: perspective(1000px) rotateX(45deg) scale(0.8);
    opacity: 0;
}

/* Breakout Blur Animation */
.breakout-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.breakout-bar {
    position: absolute;
    background: linear-gradient(
        to right, 
        transparent, 
        var(--primary), 
        transparent
    );
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.breakout-container.active {
    opacity: 1;
}

.breakout-bar.expand {
    opacity: 1;
}

/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
}

#preloader.show {
    opacity: 1;
    visibility: visible;
}

.preloader-content {
    text-align: center;
    color: var(--primary);
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--primary-dim);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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



/* Responsive adjustments */
@media (max-width: 600px) {
    .two-box-form-container {
        width: 90%;
        padding: 20px;
        margin: 20px;
    }

    h1 {
        font-size: 1.2rem;
    }

}
@media (max-width: 800px) {
    .progress-bar {
        display: none !important;
    }
}

.progress-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 10px;
    margin-bottom: 20px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    text-align: center;
}

.progress-circle {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    opacity: 0.7;
    border: 2px solid var(--primary);
    transition: all 0.3s ease;
}

.progress-circle.active {
    background-color: var(--primary-dim);
    scale: 1.2;
}

.progress-step.active .progress-circle {    
    background-color: var(--primary);
    opacity: 1;
    box-shadow: 0 0 10px var(--primary-glow);
}

.progress-circle:hover {
    background-color: var(--primary);
    transform: scale(1.2);
}

.progress-label {
    font-size: 0.7rem;
    color: var(--primary-dim);
    margin-top: 5px;
    text-wrap: balance;
    line-height: 1.2;
}

.progress-step.active .progress-label {
    color: var(--text-bright);
}

#progress-bar-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    z-index: 100;
    display: flex;
    justify-content: center;
}

select {
    width: 100%;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--primary);
    border: 2px solid var(--primary-dim);
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='rgb(0,255,171)' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
}

select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    outline: none;
}

option {
    background-color: var(--bg-panel);
    color: var(--primary);
    padding: 10px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
}

option:hover {
    background-color: var(--primary-dim);
    color: var(--text-bright);
}


#exit-button-container {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    cursor: pointer;
    font-variant-emoji: text;
    color: #00ffab;
}

#exit-button-container img{
    width: 30px;
    height: 20px;
    cursor: pointer;
    transition: transform 0.5s ease;
}

#exit-button-container img {
    opacity: 0.7;
}

#exit-button-container img:hover {
    scale: 1.1;
    animation: wave 3s infinite;
    opacity: 1;
}
