/* =================================
   MODERN AUTH SYSTEM CSS - CORRECTED
   ================================= */

/* Auth Variables */
:root {
    --auth-gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --auth-gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --auth-glass-bg: rgba(255, 255, 255, 0.1);
    --auth-glass-border: rgba(255, 255, 255, 0.2);
    --auth-glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    --auth-text-primary: #ffffff;
    --auth-text-secondary: rgba(255, 255, 255, 0.9);
    --auth-text-muted: rgba(255, 255, 255, 0.7);
    --auth-text-accent: #4facfe;
    --auth-border-radius: 16px;
    --auth-border-radius-lg: 24px;
    --auth-animation-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modern Auth Wrapper */
.modern-auth-wrapper {
    min-height: 100vh;
    background: var(--auth-gradient-primary);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Background Animation */
.auth-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    z-index: 1;
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: gentleFloat 20s ease-in-out infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 15%;
    animation-delay: -7s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation-delay: -14s;
}

.shape-4 {
    width: 40px;
    height: 40px;
    top: 30%;
    right: 30%;
    animation-delay: -10s;
}

@keyframes gentleFloat {
    0%, 100% { 
        transform: translateY(0px) translateX(0px);
        opacity: 0.1;
    }
    50% { 
        transform: translateY(-20px) translateX(10px);
        opacity: 0.2;
    }
}

/* Main Auth Container */
.modern-auth-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

/* Auth Branding Side */
.auth-branding-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.branding-content {
    text-align: center;
    max-width: 500px;
}

/* Logo Section */
.logo-section {
    margin-bottom: 32px;
    animation: fadeInUp 0.8s var(--auth-animation-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    /* Mantém proporção original da imagem, sem distorcer */
    height: 90px;
    width: auto;
    display: inline-block;
    object-fit: contain;
    margin-bottom: 16px;
    /* Remove blur/sombra pesada para manter nítida */
    filter: none;
    image-rendering: -webkit-optimize-contrast;
}

.brand-title {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #4facfe 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    letter-spacing: 2px;
}

/* Welcome Content */
.welcome-content {
    animation: fadeInUp 0.8s var(--auth-animation-smooth) 0.2s both;
}

.welcome-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--auth-text-primary);
    margin: 0 0 20px;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 18px;
    color: var(--auth-text-secondary);
    margin: 0 0 40px;
    line-height: 1.6;
}

/* Features Showcase */
.features-showcase {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--auth-glass-bg);
    border: 1px solid var(--auth-glass-border);
    border-radius: var(--auth-border-radius);
    backdrop-filter: blur(10px);
    transition: transform 0.2s var(--auth-animation-smooth);
}

.feature-item:hover {
    transform: translateY(-3px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-gradient-accent);
    border-radius: 12px;
    font-size: 20px;
    color: white;
}

.feature-item span {
    font-size: 16px;
    font-weight: 500;
    color: var(--auth-text-primary);
}

/* Auth Form Side */
.auth-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    backdrop-filter: blur(20px);
}

.form-container {
    width: 100%;
    max-width: 450px;
    background: var(--auth-glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--auth-glass-border);
    border-radius: var(--auth-border-radius-lg);
    padding: 40px;
    box-shadow: var(--auth-glass-shadow);
    animation: fadeInUp 0.8s var(--auth-animation-smooth) 0.3s both;
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--auth-text-primary);
    margin: 0 0 10px;
}

.form-header p {
    font-size: 16px;
    color: var(--auth-text-secondary);
    margin: 0;
}

/* Modern Form */
.modern-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Input Groups */
.input-group {
    position: relative;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 18px;
    z-index: 2;
    color: var(--auth-text-muted);
    font-size: 16px;
    transition: color 0.3s var(--auth-animation-smooth);
}

.modern-form input {
    width: 100%;
    height: 55px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--auth-border-radius);
    padding: 0 18px 0 50px;
    font-size: 16px;
    color: var(--auth-text-primary);
    transition: all 0.3s var(--auth-animation-smooth);
    box-sizing: border-box;
}

.modern-form input:focus {
    outline: none;
    border-color: var(--auth-text-accent);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.15);
}

.modern-form input:focus + .input-icon {
    color: var(--auth-text-accent);
}

.modern-form input::placeholder {
    color: var(--auth-text-muted);
    opacity: 0.8;
}

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

.password-toggle-btn {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-muted);
    cursor: pointer;
    z-index: 3;
    transition: color 0.3s var(--auth-animation-smooth);
    font-size: 16px;
    padding: 5px;
}

.password-toggle-btn:hover {
    color: var(--auth-text-accent);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

/* Modern Checkbox */
.modern-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.modern-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark-modern {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s var(--auth-animation-smooth);
}

.checkmark-modern::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s var(--auth-animation-smooth);
}

.modern-checkbox input[type="checkbox"]:checked + .checkmark-modern {
    background: var(--auth-gradient-accent);
    border-color: transparent;
}

.modern-checkbox input[type="checkbox"]:checked + .checkmark-modern::after {
    opacity: 1;
    transform: scale(1);
}

.checkbox-text {
    font-size: 14px;
    color: var(--auth-text-secondary);
}

/* Links */
.forgot-link {
    font-size: 14px;
    color: var(--auth-text-accent);
    text-decoration: none;
    transition: color 0.3s var(--auth-animation-smooth);
}

.forgot-link:hover {
    color: #ffffff;
}

/* Modern Button */
.modern-btn {
    position: relative;
    width: 100%;
    height: 55px;
    border: none;
    border-radius: var(--auth-border-radius);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s var(--auth-animation-smooth);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn {
    background: var(--auth-gradient-accent);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.5);
}

.btn-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity 0.3s var(--auth-animation-smooth);
}

.btn-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s var(--auth-animation-smooth);
}

.modern-btn.loading .btn-text {
    opacity: 0;
}

.modern-btn.loading .btn-loading {
    opacity: 1;
}

/* Divider */
.divider-section {
    display: flex;
    align-items: center;
    margin: 25px 0;
    gap: 15px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.divider-text {
    font-size: 14px;
    color: var(--auth-text-muted);
    white-space: nowrap;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.social-btn {
    flex: 1;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--auth-border-radius);
    background: rgba(255, 255, 255, 0.05);
    color: var(--auth-text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s var(--auth-animation-smooth);
}

.discord-btn:hover {
    background: #5865f2;
    border-color: #5865f2;
    transform: translateY(-2px);
}

.google-btn:hover {
    background: #ea4335;
    border-color: #ea4335;
    transform: translateY(-2px);
}

/* Form Footer */
.form-footer {
    text-align: center;
}

.form-footer p {
    font-size: 16px;
    color: var(--auth-text-secondary);
    margin: 0;
}

.register-link {
    color: var(--auth-text-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s var(--auth-animation-smooth);
}

.register-link:hover {
    color: #ffffff;
}

/* Error Messages */
.error-message {
    font-size: 14px;
    color: #ff4757;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.3s var(--auth-animation-smooth);
}

.error-message.show {
    opacity: 1;
}

/* Input Hint */
.input-hint {
    font-size: 12px;
    color: var(--auth-text-muted);
    margin-top: 5px;
    display: block;
    font-style: italic;
}

.input-wrapper.error input {
    border-color: #ff4757;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.15);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .modern-auth-container {
        flex-direction: column;
    }
    
    .auth-branding-side {
        min-height: auto;
        padding: 40px 20px;
    }
    
    .auth-form-side {
        padding: 20px;
    }
    
    .features-showcase {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .feature-item {
        flex: 1;
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .auth-branding-side {
        padding: 30px 20px;
    }
    
    .brand-title {
        font-size: 36px;
    }
    
    .welcome-title {
        font-size: 28px;
    }
    
    .form-container {
        padding: 30px 20px;
    }
    
    .features-showcase {
        flex-direction: column;
    }
    
    .feature-item {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .social-login {
        flex-direction: column;
    }
    
    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .brand-title {
        font-size: 28px;
    }
    
    .welcome-title {
        font-size: 24px;
    }
}
