/* Authentication Pages Styles */

.auth-container {
    min-height: 100vh;
    padding: 80px 20px 20px;
    background:
        radial-gradient(circle at 20% 50%, rgba(246, 200, 78, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(246, 200, 78, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #0b1220 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.auth-card {
    min-height: 460px; /* Keep panel visible even on short screens */
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.4),
        0 8px 25px rgba(246, 200, 78, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    max-width: 450px;
    width: 100%;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #F6C84E, transparent);
    opacity: 0.8;
}

.auth-icon {
    font-size: 3rem;
    color: #F6C84E;
    margin-bottom: 1rem;
}

.auth-logo {
    position: relative;
}

.auth-logo img {
    filter: drop-shadow(0 4px 8px rgba(246, 200, 78, 0.3));
    transition: transform 0.3s ease;
    border-radius: 50%;
    background: transparent;
}

.auth-logo:hover img {
    transform: scale(1.05);
}

.auth-form {
    display: none;
    animation: slideIn 0.3s ease-out;
}

.auth-form.active {
    display: block;
}

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

/* Form Controls */
.form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #F6C84E;
    box-shadow: 0 0 0 0.2rem rgba(246, 200, 78, 0.25);
    color: #fff;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-group-text {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px 0 0 12px;
    color: #F6C84E;
    border-right: none;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 12px 12px 0;
}

.input-group .btn {
    border-radius: 0 12px 12px 0;
    border-left: none;
}

/* Form Labels */
.form-label {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Form Check */
.form-check-input {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-check-input:checked {
    background-color: #F6C84E;
    border-color: #F6C84E;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(246, 200, 78, 0.25);
}

.form-check-label {
    color: rgba(255, 255, 255, 0.8);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #F6C84E 0%, #e6b73e 100%);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e6b73e 0%, #F6C84E 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(246, 200, 78, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-link {
    color: #F6C84E !important;
    font-weight: 600;
}

.btn-link:hover {
    color: #e6b73e !important;
}

.btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* Password Strength Indicator */
.password-strength {
    width: 100%;
}

.password-strength-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.password-strength-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength.weak .password-strength-bar::after {
    width: 33%;
    background: #dc3545;
}

.password-strength.medium .password-strength-bar::after {
    width: 66%;
    background: #ffc107;
}

.password-strength.strong .password-strength-bar::after {
    width: 100%;
    background: #28a745;
}

.password-strength-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error States */
.form-control.is-invalid {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.form-control.is-valid {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.invalid-feedback,
.valid-feedback {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Modal Customization */
.modal-content {
    background: rgba(26, 26, 26, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.modal-body {
    color: #fff;
}

/* Responsive Design */
@media (max-width: 576px) {
    .auth-container {
        padding-top: 90px;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
        min-height: 420px;
    }

    /* Force auth card to remain in view */
    .auth-card .auth-form.active{ display:block; }
    .auth-card{ display:block; }

    .auth-icon {
        font-size: 2.5rem;
    }

    .btn-primary {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }

    /* Melhorar botões de troca entre login/register em mobile */
    .btn-link {
        font-size: 1rem !important;
        padding: 0.5rem 1rem !important;
        min-height: 44px !important; /* Área de toque mínima recomendada */
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
        border-radius: 0.375rem !important;
        background-color: rgba(246, 200, 78, 0.1) !important;
        border: 1px solid rgba(246, 200, 78, 0.3) !important;
        margin-top: 0.5rem !important;
    }

    .btn-link:hover {
        background-color: rgba(246, 200, 78, 0.2) !important;
        border-color: rgba(246, 200, 78, 0.5) !important;
    }

    /* Texto antes dos botões de troca */
    .text-center p {
        font-size: 0.95rem;
        margin-bottom: 0.75rem !important;
    }

    /* Container dos botões de troca */
    .text-center {
        padding-top: 1rem;
    }
}

/* Tablet Responsive */
@media (max-width: 768px) and (min-width: 577px) {
    .btn-link {
        font-size: 0.95rem !important;
        padding: 0.4rem 0.8rem !important;
        min-height: 40px !important;
        background-color: rgba(246, 200, 78, 0.05) !important;
        border: 1px solid rgba(246, 200, 78, 0.2) !important;
        border-radius: 0.25rem !important;
        margin-top: 0.25rem !important;
    }

    .btn-link:hover {
        background-color: rgba(246, 200, 78, 0.15) !important;
    }
}

/* Touch devices - melhor área de toque */
@media (hover: none) and (pointer: coarse) {
    .btn-link {
        min-height: 48px !important; /* Área de toque maior para touch */
        padding: 0.75rem 1.25rem !important;
        font-size: 1.1rem !important;
    }
}

/* Dark Theme Adjustments */
@media (prefers-color-scheme: dark) {
    .auth-container {
        background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    }
}

/* Focus Indicators for Accessibility */
.form-control:focus,
.btn:focus,
.form-check-input:focus {
    outline: 2px solid #F6C84E;
    outline-offset: 2px;
}

/* Social Login Buttons */
.social-login-section {
    margin: 1.5rem 0;
}

.divider {
    position: relative;
    margin: 1.5rem 0;
}

.divider-text {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    z-index: 0;
}

/* Google Button */
.btn-google {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    border: 1px solid rgba(66, 133, 244, 0.3);
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-google:hover {
    background: linear-gradient(135deg, #3367d6 0%, #2d8f47 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.4);
    color: #ffffff;
}

.btn-google:active {
    transform: translateY(0);
}

/* Facebook Button */
.btn-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    border: 1px solid rgba(24, 119, 242, 0.3);
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-facebook:hover {
    background: linear-gradient(135deg, #166fe5 0%, #1976d2 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.4);
    color: #ffffff;
}

.btn-facebook:active {
    transform: translateY(0);
}

/* Better text contrast */
.auth-card h3,
.auth-card .form-label,
.auth-card p {
    color: #ffffff;
    font-weight: 500;
}

.auth-card .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.auth-card .btn-link {
    color: #F6C84E !important;
    font-weight: 500;
}

.auth-card .btn-link:hover {
    color: #ffffff !important;
}

/* Responsividade para botões sociais */
@media (max-width: 768px) {
    .social-login-section {
        margin: 1rem 0;
    }

    .btn-google,
    .btn-facebook {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    .divider-text {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
}

@media (max-width: 480px) {
    .btn-google,
    .btn-facebook {
        padding: 1rem 0.8rem;
        font-size: 0.85rem;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
        overflow: visible;
    }

    .btn-google i,
    .btn-facebook i {
        margin-right: 0.5rem;
        font-size: 1rem;
    }

    .social-login-section {
        margin: 0.8rem 0;
    }

    .auth-card {
        padding: 1.5rem 1rem;
        margin: 0 0.5rem;
    }
}

/* Animation for Form Switching */
.auth-form.slide-out {
    animation: slideOut 0.2s ease-in forwards;
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* Social Login Styles */
.social-login-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.divider {
    position: relative;
    overflow: hidden;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider-text {
    position: relative;
    z-index: 1;
    font-size: 0.875rem;
}

.btn-outline-light:hover,
.btn-outline-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(246, 200, 78, 0.2);
    transition: all 0.3s ease;
}

#google-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

#google-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

#facebook-btn {
    background-color: rgba(66, 103, 178, 0.1);
    border-color: rgba(66, 103, 178, 0.3);
    color: #4267B2;
}

#facebook-btn:hover {
    background-color: rgba(66, 103, 178, 0.2);
    border-color: rgba(66, 103, 178, 0.5);
    color: #4267B2;
}
