* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-dark: #2d3748;
    --text-light: #718096;
    --border-light: #e2e8f0;
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-y: auto;
    padding: 20px;
}

/* Animated background - simplificado para performance */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
}

/* Container principal */
.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    margin: auto;
}

.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.5s ease-out;
}

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

/* Logo and Title */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: var(--primary-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    font-weight: bold;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

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

/* Warning Message */
.warning-box {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    color: #2d3436;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
}

/* Form Groups */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Password strength */
.password-strength {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak { background: #f56565; width: 33%; }
.strength-medium { background: #ed8936; width: 66%; }
.strength-strong { background: #48bb78; width: 100%; }

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 12px 20px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Messages */
.message {
    padding: 10px 12px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 13px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.message.show {
    display: block;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #fc8181;
}

.success-message {
    background: #c6f6d5;
    color: #276749;
    border: 1px solid #9ae6b4;
}

/* Helper text */
.helper-text {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

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

/* Responsive para telas muito pequenas */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .auth-card {
        padding: 20px;
        border-radius: 15px;
    }
    
    .auth-title {
        font-size: 20px;
    }
    
    .logo {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .form-input {
        padding: 10px 12px;
        font-size: 16px; /* Previne zoom no iOS */
    }
    
    .btn-submit {
        padding: 12px;
        font-size: 14px;
    }
}

/* Para telas muito pequenas em altura */
@media (max-height: 600px) {
    body {
        padding: 10px;
        align-items: flex-start;
    }
    
    .auth-header {
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .logo {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin-bottom: 10px;
    }
}

/* Ajustes para landscape em mobile */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 10px;
    }
    
    .auth-card {
        padding: 15px 20px;
    }
    
    .auth-header {
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    .logo {
        display: none;
    }
}

/* Remover partículas em telas pequenas para performance */
@media (max-width: 768px) {
    .particles {
        display: none;
    }
}
