/* Variáveis CSS */
:root {
    --disco-purple: #6a11cb;
    --disco-pink: #ff00ff;
    --disco-blue: #00bfff;
    --disco-green: #00ff7f;
    --neon-text: #ffffff;
}

/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    background: #1a1a2e;
    color: var(--neon-text);
}

/* Efeito de scanlines retrô */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 6px 100%;
    pointer-events: none;
    z-index: -1;
}

/* Padrão geométrico disco */
.geometric-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 0, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 191, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 255, 127, 0.2) 0%, transparent 50%);
    z-index: -2;
    opacity: 0.4;
    animation: discoRotate 20s linear infinite;
}

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

/* Container principal */
.login-container {
    width: 100%;
    max-width: 1200px;
    height: 650px;
    display: flex;
    background: rgba(26, 26, 46, 0.9);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Lado esquerdo - Login */
.login-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    position: relative;
    z-index: 2;
    transition: transform 0.5s ease;
}

.login-side::before {
    content: '';
    position: absolute;
    top: 0;
    right: -30px;
    width: 60px;
    height: 100%;
    background: linear-gradient(135deg, var(--disco-purple), var(--disco-pink));
    transform: skewX(-10deg);
    z-index: -1;
}

.login-header {
    margin-bottom: 30px;
}

.login-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    color: var(--disco-pink);
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.login-header p {
    color: var(--neon-text);
    font-size: 1rem;
    opacity: 0.8;
}

.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--disco-green), transparent);
}

.divider-text {
    padding: 0 15px;
    color: var(--neon-text);
    font-size: 0.9rem;
    opacity: 0.7;
}

.login-form {
    width: 85%;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--neon-text);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-wrapper {
    position: relative;
}

.icon-input {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--disco-blue);
    font-size: 1rem;
    z-index: 1;
}

.retro-input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: rgba(26, 26, 46, 0.7);
    border: 2px solid var(--disco-blue);
    border-radius: 10px;
    color: var(--neon-text);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 
        inset 0 2px 5px rgba(0,0,0,0.3),
        0 0 10px rgba(0, 191, 255, 0.2);
}

.retro-input:focus {
    outline: none;
    border-color: var(--disco-pink);
    box-shadow: 
        inset 0 2px 5px rgba(0,0,0,0.3),
        0 0 15px rgba(255, 0, 255, 0.5);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--disco-blue);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.password-toggle:hover {
    color: var(--disco-green);
}

.login-btn {
    background: linear-gradient(135deg, var(--disco-pink), var(--disco-blue));
    border: none;
    color: var(--neon-text);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 
        0 5px 15px rgba(255, 0, 255, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(255, 0, 255, 0.6),
        0 0 20px rgba(0, 191, 255, 0.4);
}

.login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.forgot-link, .register-link {
    color: var(--disco-green);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.forgot-link:hover, .register-link:hover {
    color: var(--disco-pink);
    text-shadow: 0 0 5px rgba(255, 0, 255, 0.5);
}

.error-message {
    background: rgba(255, 69, 0, 0.1);
    border: 1px solid rgba(255, 69, 0, 0.3);
    color: #FF4500;
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
    display: none;
    font-size: 0.85rem;
}

/* Lado direito - Banner de Registro */
.register-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: linear-gradient(135deg, var(--disco-purple), var(--disco-pink));
    position: relative;
    overflow: hidden;
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
}

.register-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.register-content {
    text-align: center;
    max-width: 300px;
    position: relative;
    z-index: 1;
}

.register-icon {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 25px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
}

.register-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.register-content p {
    color: white;
    font-size: 1rem;
    margin-bottom: 25px;
    opacity: 0.9;
    line-height: 1.5;
}

.register-btn {
    background: transparent;
    border: 2px solid white;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.register-btn:hover {
    background: white;
    color: var(--disco-purple);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* Botão voltar */
.back-home {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    color: var(--neon-text);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    z-index: 10;
}

.back-home:hover {
    color: var(--disco-pink);
    transform: scale(1.1);
}

/* Estados de loading */
.login-btn.loading {
    opacity: 0.8;
    cursor: not-allowed;
}

.button-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

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

/* Formulário de registro */
.register-form-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #2D2D44, #1A1A2E);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 45px;
    transform: translateX(100%);
    transition: transform 0.5s ease;
    z-index: 3;
    overflow-y: auto;
}

.register-form-container.active {
    transform: translateX(0);
}

.register-form-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.register-form-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    color: var(--disco-pink);
    margin-right: auto;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.back-to-login {
    background: none;
    border: none;
    color: var(--neon-text);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-radius: 5px;
    border: 1px solid var(--disco-blue);
}

.back-to-login:hover {
    background: var(--disco-blue);
    color: white;
}

.register-form {
    width: 100%;
    max-height: 80%;
    overflow-y: auto;
    padding: 10px;
    padding-bottom: 20px;
}

.register-form-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.register-form-group {
    margin-bottom: 15px;
}

.register-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--neon-text);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.register-form-group label small{
    font-size: .6rem;
    color: var(--disco-pink)
}

/* Personalização do Scrollbar */
.register-form::-webkit-scrollbar {
    width: 8px;
}

.register-form::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #1A1A2E, #2D2D44);
    border-radius: 10px;
}

.register-form::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FF00FF, #00BFFF);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 0 10px rgba(255, 0, 255, 0.5),
        inset 0 0 5px rgba(255, 255, 255, 0.3);
}

.register-form::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #FF00FF, #00FF7F);
    box-shadow: 
        0 0 15px rgba(255, 0, 255, 0.7),
        inset 0 0 8px rgba(255, 255, 255, 0.5);
}


/* Estilos para o checkbox de termos */
.terms-checkbox-container {
    margin: 15px 0 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.terms-checkbox-container:focus-within {
    border-color: var(--disco-blue);
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.3);
}

.terms-checkbox-container input[type="checkbox"] {
    opacity: 0;
    display: none;
}

.terms-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--neon-text);
    line-height: 1.5;
    gap: 8px;
    position: relative;

}

.terms-label::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--disco-pink);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 0 5px rgba(255, 0, 255, 0.3);
}

.terms-checkbox-container input[type="checkbox"]:checked + .terms-label::before {
    background: var(--disco-pink);
    border-color: var(--disco-pink);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

.terms-label::after {
    content: '✓';
    position: absolute;
    left: 5px;
    top: 1px;
    color: white;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.terms-checkbox-container input[type="checkbox"]:checked + .terms-label::after {
    opacity: 1;
}

.terms-link {
    color: var(--disco-blue);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.terms-link:hover {
    color: var(--disco-green);
    text-shadow: 0 0 10px rgba(0, 255, 127, 0.5);
}

.terms-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--disco-green);
    transition: width 0.3s ease;
}

.terms-link:hover::after {
    width: 100%;
}

.terms-error {
    color: var(--neon-red);
    font-size: 0.85rem;
    margin-top: 5px;
    padding: 8px 12px;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 5px;
    border-left: 3px solid var(--neon-red);
    display: none; /* Inicialmente escondido */
    animation: shake 0.5s ease;
}

.required-star {
    color: var(--neon-red);
    font-size: 1.2rem;
}

/* Animação para erro */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Efeito pulsante para checkbox não marcado */
.terms-checkbox-container.error {
    animation: pulseError 2s infinite;
    border-color: var(--neon-red);
}

@keyframes pulseError {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(255, 42, 42, 0.7);
    }
    50% { 
        box-shadow: 0 0 0 10px rgba(255, 42, 42, 0);
    }
}
