/* ============================================
   PIXEL-PERFECT NETFLIX LOGIN (2025)
   Based on authentic Netflix Brasil design
   ============================================ */

/* Global Reset for Login */
body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: #000;
    color: #333;
}

/* Background - Moody Cinematic Gradient */
#loginScreen {
    /* High quality noise texture + rich gradients */
    background: 
        linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.8) 100%),
        radial-gradient(circle at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%),
        url('netflix_poster_background.png'); /* Fallback / Underlying Texture */
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Overlay to darken background further */
#loginScreen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

/* Header */
.login-header {
    height: 90px;
    padding: 20px 3%; /* Netflix spacing */
    position: relative;
    z-index: 10;
}

.logo-image {
    height: 45px; /* Actual Netflix logo height */
    width: auto;
}

/* Login Body */
.login-body {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Aligns to top, but padding pushes it down */
    padding-top: 20px;
    position: relative;
    z-index: 10;
    margin-bottom: 90px;
}

.login-content {
    background-color: rgba(0, 0, 0, 0.75);
    border-radius: 4px;
    padding: 60px 68px 40px;
    width: 450px;
    min-height: 660px; /* Consistent height */
    box-sizing: border-box;
}

/* Typography */
.login-title {
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 28px;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Floating Label Inputs */
.input-container {
    position: relative;
    background: #333;
    border-radius: 4px;
    border: 0;
    margin-bottom: 0;
}

.netflix-input {
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: #fff;
    height: 50px;
    line-height: 50px;
    padding: 16px 20px 0;
    width: 100%;
    font-size: 16px;
    box-sizing: border-box;
    outline: none;
}

.netflix-input:focus {
    background: #454545;
}

/* Floating Label Logic */
.netflix-label {
    position: absolute;
    top: 50%;
    left: 20px;
    color: #8c8c8c;
    font-size: 16px;
    transition: all 0.2s ease;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Float label when focused or has value (handled via valid pseudo-class for now, script for robust) */
.netflix-input:focus ~ .netflix-label,
.netflix-input:not(:placeholder-shown) ~ .netflix-label,
.netflix-input[data-has-value="true"] ~ .netflix-label {
    top: 7px;
    font-size: 11px;
    transform: translateY(0);
}

.netflix-input.has-error {
    border-bottom: 2px solid #e87c03;
}

.input-error {
    color: #e87c03;
    font-size: 13px;
    padding: 6px 3px;
    display: none;
}

/* Select Styling */
select.netflix-input {
    appearance: none;
    padding-top: 16px; /* Space for label */
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23fff' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.netflix-label-static {
    position: absolute;
    top: 7px;
    left: 20px;
    color: #8c8c8c;
    font-size: 11px;
    pointer-events: none;
}

/* Button */
.btn-login {
    background-color: #e50914;
    color: #fff;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    margin: 24px 0 12px;
    padding: 16px;
    width: 100%;
    transition: background 0.2s;
}

.btn-login:hover {
    background-color: #f40612;
}

.btn-login:disabled {
    background-color: #ccc;
    cursor: default;
}

/* Help & Remember Me */
.login-help {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #b3b3b3;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input {
    margin-right: 5px;
    accent-color: #b3b3b3; /* Browser support dependant */
    height: 16px;
    width: 16px;
}

.help-link {
    color: #b3b3b3;
    text-decoration: none;
}

.help-link:hover {
    text-decoration: underline;
}

/* Footer Section */
.login-footer-text {
    margin-top: 16px;
    color: #737373;
    font-size: 16px;
}

.signup-link {
    color: #fff;
    text-decoration: none;
}

.signup-link:hover {
    text-decoration: underline;
}

.recaptcha-text {
    font-size: 13px;
    margin-top: 11px;
    color: #8c8c8c;
    text-align: left;
}

.recaptcha-text a {
    color: #0071eb;
    text-decoration: none;
}

/* Error Message */
.error-message {
    background: #e87c03;
    border-radius: 4px;
    font-size: 14px;
    margin: 0 0 16px;
    padding: 10px 20px;
    color: #fff;
    display: none;
}

.error-message a {
    color: #fff;
    text-decoration: underline;
}

/* Site Footer */
.site-footer {
    background: rgba(0,0,0,0.75);
    padding: 30px 0;
    margin-top: auto; /* Pushes to bottom */
    position: relative;
    z-index: 10;
    color: #737373;
    font-size: 13px;
    border-top: 1px solid #333; /* Slight separation */
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 4%;
}

.footer-top {
    margin-bottom: 30px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.footer-links a {
    color: #737373;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.lang-select select {
    background: #000;
    color: #737373;
    border: 1px solid #333;
    padding: 12px 26px 12px 10px;
    font-size: 13px;
    appearance: none;
}

/* Responsive */
@media only screen and (max-width: 740px) {
    .login-content {
        width: 100%;
        padding: 40px 20px; /* Reduced padding */
        min-height: auto;
        margin-bottom: 0;
        background: #000; /* Full black on mobile */
    }
    
    .login-body {
        padding-top: 0;
        margin-bottom: 0;
        background: #000;
    }
    
    .login-header {
        background: #000;
        height: auto;
        padding: 10px 3%;
    }
    
    .site-footer {
        background: #000;
        border-top: 1px solid #333;
    }
    
    .footer-links {
        grid-template-columns: 1fr 1fr;
    }
}
/* Dark overlay on background */
#loginScreen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

/* Hide logo on login screen (Netflix doesn't show it in form) */
#loginScreen .logo-container {
    display: none;
}

/* Remove old gradient orbs */
.background-animation,
.gradient-orb {
    display: none !important;
}

/* Main Login Container - Compact Netflix Style */
.login-container {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    border-radius: 4px;
    padding: 48px 68px 48px;
    width: 450px;
    max-width: 100%;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    position: relative;
    z-index: 1;
}

/* Form Title - "Entrar" */
.login-form-title {
    font-size: 32px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 28px;
    text-align: left;
}

/* Form Styling */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Input Fields - Netflix Style (Simpler) */
.form-group {
    position: relative;
    margin-bottom: 0;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 50px;
    background: #333333;
    border: none;
    border-radius: 4px;
    color: #FFFFFF;
    font-size: 16px;
    padding: 16px 20px;
    font-family: inherit;
    transition: background 0.2s;
}

.form-group input::placeholder,
.form-group select option:first-child {
    color: #8C8C8C;
}

.form-group input:focus,
.form-group select:focus {
    background: #454545;
    outline: none;
}

/* Hide labels (Netflix uses placeholders) */
.form-group label {
    display: none;
}

/* Select specific styling */
.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 40px;
}

.form-group select option {
    background: #333;
    color: #fff;
}

/* Entrar Button - Netflix Red */
.btn-login {
    background: #E50914;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 24px;
    height: 50px;
    position: relative;
    letter-spacing: 0.5px;
}

.btn-login:hover {
    background: #f40612;
}

.btn-login:active {
    background: #c20710;
}

.btn-login.loading {
    background: #8c0610;
    cursor: not-allowed;
}

/* Button Loading State */
.btn-loader {
    display: none;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-login.loading .btn-loader {
    display: block;
}

.btn-login.loading .btn-text {
    opacity: 0.6;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Error Message - Netflix Orange */
.error-message {
    background: #e87c03;
    color: #fff;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 16px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Secondary Text */
.form-secondary {
    color: #737373;
    font-size: 13px;
    margin-top: 16px;
}

.form-secondary a {
    color: #fff;
    text-decoration: none;
}

.form-secondary a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 740px) {
    .login-container {
        padding: 40px 28px 28px;
        width: 100%;
    }
    
    .login-form-title {
        font-size: 28px;
    }
}

@media (max-width: 500px) {
    .login-container {
        background: rgba(0, 0, 0, 0.85);
    }
}
