* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000000;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Efeito de gradiente sutil para profundidade */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(30, 30, 35, 0.8), transparent 60%),
        radial-gradient(circle at 80% 70%, rgba(25, 25, 30, 0.6), transparent 50%),
        linear-gradient(135deg, rgba(15, 15, 18, 0.9) 0%, rgba(8, 8, 12, 0.95) 100%);
    pointer-events: none;
    z-index: -1;
}

.auth-body {
    background: none;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    z-index: 1;
    position: relative;
    margin: 20px auto;
}

.auth-card {
    background: rgba(18, 18, 22, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 56px 48px 48px;
    box-shadow: 
        0 24px 48px rgba(0, 0, 0, 0.6),
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 32px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1a1a1f 0%, #2a2a35 100%);
    box-shadow: 
        0 8px 24px rgba(220, 38, 38, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 32px;
    font-weight: bold;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.auth-logo:hover {
    transform: scale(1.05);
    box-shadow: 
        0 12px 32px rgba(220, 38, 38, 0.3),
        0 6px 16px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.auth-title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #dc2626 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    margin-bottom: 40px;
    font-weight: 400;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: left;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(12, 12, 16, 0.8);
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus {
    outline: none;
    border-color: rgba(220, 38, 38, 0.6);
    box-shadow: 
        0 0 0 3px rgba(220, 38, 38, 0.1),
        0 4px 12px rgba(220, 38, 38, 0.2);
    background: rgba(12, 12, 16, 0.95);
}

.form-group input:valid {
    border-color: rgba(34, 197, 94, 0.4);
}

.form-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.02);
}

.form-group input:valid:not(:focus):not(:placeholder-shown) {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.02);
}

.auth-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    padding: 18px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(220, 38, 38, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    margin: 32px 0 24px;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.divider span {
    padding: 0 16px;
    font-weight: 500;
}

#google-btn {
    margin-bottom: 32px;
    background: linear-gradient(135deg, #2a2a35 0%, #1a1a22 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#google-btn:hover {
    background: linear-gradient(135deg, #3a3a45 0%, #2a2a32 100%);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(255, 255, 255, 0.05);
}

.auth-link {
    margin-top: 24px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

.auth-link a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.auth-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #dc2626;
    transition: width 0.3s ease;
}

.auth-link a:hover::after {
    width: 100%;
}

.auth-link a:hover {
    color: #ef4444;
}

.message {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.message.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-content {
    background: rgba(18, 18, 22, 0.95);
    backdrop-filter: blur(20px);
    padding: 32px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 
        0 24px 48px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#loadingMessage {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Password strength indicator */
.password-strength {
    margin-top: 8px;
    display: none;
}

.password-strength.show {
    display: block;
}

.strength-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    background: #ef4444;
    width: 25%;
}

.strength-fill.fair {
    background: #f59e0b;
    width: 50%;
}

.strength-fill.good {
    background: #10b981;
    width: 75%;
}

.strength-fill.strong {
    background: #22c55e;
    width: 100%;
}

.strength-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Terms checkbox styling */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 24px 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #dc2626;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    cursor: pointer;
    margin: 0;
}

.checkbox-group label a {
    color: #dc2626;
    text-decoration: none;
}

.checkbox-group label a:hover {
    color: #ef4444;
    text-decoration: underline;
}

/* Responsive Design */
@media screen and (max-width: 480px) {
    body {
        padding: 16px;
        min-height: auto;
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .auth-container {
        max-width: 100%;
        margin: 0 auto;
    }

    .auth-card {
        padding: 40px 28px 32px;
        border-radius: 16px;
        min-height: auto;
    }

    .auth-title {
        font-size: 28px;
    }

    .auth-logo {
        width: 64px;
        height: 64px;
        margin-bottom: 24px;
        font-size: 24px;
    }

    .form-group input {
        padding: 14px 16px;
        font-size: 16px;
    }

    .auth-btn {
        padding: 16px 20px;
        font-size: 15px;
    }

    .loading-content {
        margin: 16px;
        padding: 24px;
    }
}

@media screen and (max-width: 360px) {
    body {
        padding: 12px;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .auth-card {
        padding: 32px 20px 24px;
        min-height: auto;
    }

    .auth-title {
        font-size: 24px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .auth-card {
        border: 2px solid rgba(255, 255, 255, 0.2);
    }

    .form-group input {
        border: 2px solid rgba(255, 255, 255, 0.15);
    }

    .form-group input:focus {
        border-color: #dc2626;
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    body::before {
        animation: none;
    }
}

/* Dark mode optimization */
@media (prefers-color-scheme: dark) {
    body {
        background: #000000 !important;
    }

    .auth-card {
        background: rgba(18, 18, 22, 0.98) !important;
        border-color: rgba(255, 255, 255, 0.12);
    }

    .form-group input {
        background: rgba(12, 12, 16, 0.95) !important;
        border-color: rgba(255, 255, 255, 0.12);
    }
}

/* Focus management for accessibility */
.auth-form *:focus-visible {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Garantir fundo preto em todos os cenários */
html {
    background-color: #000000 !important;
}

body, 
body * {
    box-sizing: border-box;
}

/* Force dark background */
*::before,
*::after {
    box-sizing: border-box;
}