/* Reset do header para telas de autenticação */
.header {
    display: none;
}

/* Wrappers e Containers */
.login-wrapper, .register-wrapper, .verify-wrapper {
    min-height: 100vh;
    display: flex;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.login-container, .register-container, .verify-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Lado esquerdo - Formulário */
.login-form-section, .register-form-section, .verify-form-section {
    flex: 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow-y: auto; /* Necessário pro register ficar scrollable se precisar */
}

.login-container .login-form-section,
.verify-container .verify-form-section {
    flex: 0.85;
}

.login-container .video-section,
.verify-container .video-section {
    flex: 1.15;
}

.login-form-content, .register-form-content {
    width: 100%;
    max-width: 400px;
    z-index: 2;
}

.register-form-content {
    max-width: 450px;
}

.verify-form-content {
    width: 100%;
    max-width: 440px;
    z-index: 2;
    animation: cardSlideUp 0.6s ease-out;
}

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

/* Logo */
.brand-logo {
    text-align: center;
    margin-bottom: 30px;
}

.brand-logo img {
    height: 60px;
    width: auto;
    margin: 0 auto 20px auto;
    display: block;
}
.register-form-content .brand-logo img {
    height: 50px;
    margin-bottom: 15px;
}

.brand-logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3ddfef 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}
.register-form-content .brand-logo h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.brand-logo p {
    color: #666;
    font-size: 1.1rem;
    font-weight: 400;
}
.register-form-content .brand-logo p {
    font-size: 1rem;
}


/* Headers */
.login-header, .register-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2, .register-header h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}
.register-header h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.login-header p, .register-header p {
    color: #666;
    font-size: 1rem;
}
.register-header p {
    font-size: 0.95rem;
}

/* Alerts */
.login-messages, .register-messages, .verify-messages {
    margin-bottom: 20px;
}

.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background: #ff8c8c66; /* default from login but overridden */
    border: 1px solid transparent;
}

@keyframes slideIn {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.alert-error, .alert-danger {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    border-left: 4px solid #EF4444;
    color: #991B1B;
}

.alert-success {
    background-color: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-left: 4px solid #10B981;
    color: #065F46;
}

/* Formulário */
.modern-form {
    width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    border-color: #3ddfef;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    background: #ffffff;
}

/* Password */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: #3ddfef;
}

.forgot-password {
    text-align: right;
    margin-top: 8px;
}

.forgot-password a {
    color: #7f7f7f;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #555555;
}

/* Checkbox (Register) */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 25px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #555;
}

.checkbox-group a {
    color: #3ddfef;
    text-decoration: none;
    transition: color 0.3s ease;
}

.checkbox-group a:hover {
    color: #2c9cff;
    text-decoration: underline;
}

/* Botões */
.login-btn, .register-btn, .verify-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3ddfef 0%, #2c9cff 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.login-btn:hover, .register-btn:hover, .verify-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.login-btn:active, .register-btn:active, .verify-btn:active:not(:disabled) {
    transform: translateY(0);
}

.verify-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Links secundários e divisores */
.auth-separator {
    position: relative;
    margin: 30px 0;
    text-align: center;
}

.auth-separator::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    top: 50%;
    left: 0;
    background: #e1e8ed;
}

.auth-separator span {
    background: #ffffff;
    padding: 0 20px;
    color: #666;
    font-size: 0.9rem;
}

.register-link, .login-link {
    text-align: center;
    margin-top: 20px;
}

.register-link p, .login-link p {
    color: #666;
    margin-bottom: 15px;
}

.register-link a, .login-link a {
    color: #2db1be;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link a:hover, .login-link a:hover {
    color: #1a8e99;
}

.login-btn-outline, .register-btn-outline {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px solid #3ddfef;
    border-radius: 10px;
    color: #3ddfef;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.login-btn-outline:hover, .register-btn-outline:hover {
    background: #3ddfef;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

/* Lado direito - Vídeo */
.video-section {
    flex: 1;
    position: relative;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 16px 16px 32px;
}

.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    text-decoration: none;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 40px;
    z-index: 1;
}

.video-overlay h3 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.video-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 400px;
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Specific Verify Code Styles */
.verify-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3ddfef 0%, #2c9cff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 8px 24px rgba(61, 223, 239, 0.3);
}

.verify-icon i {
    font-size: 1.5rem;
    color: white;
}

.verify-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.verify-subtitle {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.5;
}

.verify-email {
    text-align: center;
    color: #111;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 30px;
}

.code-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
}

.code-input {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    color: #333;
    outline: none;
}

.code-input:focus {
    border-color: #3ddfef;
    box-shadow: 0 0 0 3px rgba(61, 223, 239, 0.15);
    transform: translateY(-2px);
    background: #ffffff;
}

.code-input.filled {
    border-color: #3ddfef;
    background: rgba(61, 223, 239, 0.05);
}

.code-input.error {
    border-color: #EF4444;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.timer-section {
    text-align: center;
    margin-top: 16px;
}

.timer-text {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.timer-countdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(61, 223, 239, 0.1);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    color: #3ddfef;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.resend-btn {
    background: transparent;
    border: 2px solid #3ddfef;
    color: #3ddfef;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 12px;
    width: 100%;
    margin-bottom: 15px;
}

.resend-btn:hover:not(:disabled) {
    background: #3ddfef;
    color: white;
    box-shadow: 0 8px 20px rgba(61, 223, 239, 0.2);
}

.resend-btn:disabled {
    color: #999;
    border-color: #e1e8ed;
    cursor: not-allowed;
}

.back-link {
    text-align: center;
    margin-top: 10px;
}

.back-link a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.back-link a:hover {
    color: #3ddfef;
}

.expired-overlay {
    text-align: center;
    padding: 16px;
    background: rgba(239, 68, 68, 0.08);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.expired-overlay i {
    font-size: 1.5rem;
    color: #EF4444;
    margin-bottom: 8px;
    display: block;
}

.expired-overlay p {
    color: #991B1B;
    font-weight: 500;
    margin: 0;
    font-size: 0.9rem;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* Responsividade unificada */
@media (max-width: 992px) {
    .verify-form-content {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .login-container, .register-container, .verify-container {
        flex-direction: column;
    }
    
    .video-section {
        order: -1;
        min-height: 35vh;
        flex: none;
        padding: 0;
    }

    .video-container {
        border-radius: 0;
    }
    
    .login-form-section, .register-form-section, .verify-form-section {
        flex: none;
        min-height: 65vh;
        padding: 30px 20px;
    }
    
    .login-wrapper .brand-logo,
    .verify-wrapper .brand-logo {
        display: none;
    }
    
    .brand-logo h1 {
        font-size: 2rem;
    }
    
    .login-header h2, .register-header h2 {
        font-size: 1.5rem;
    }
    
    .video-overlay h3 {
        font-size: 2rem;
    }
    
    .video-overlay p {
        font-size: 1rem;
    }
    
    .code-input {
        width: 44px;
        height: 52px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .login-form-section, .register-form-section, .verify-form-section {
        padding: 15px;
    }
    
    .login-form-content, .register-form-content {
        max-width: 100%;
    }
    
    .brand-logo {
        margin-bottom: 25px;
    }
    
    .brand-logo h1 {
        font-size: 1.6rem;
    }
    
    .video-overlay {
        padding: 20px;
    }
    
    .video-overlay h3 {
        font-size: 1.6rem;
    }

    .code-input-group {
        gap: 6px;
    }
    
    .verify-title {
        font-size: 1.5rem;
    }
}
