/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    color: #333;
    overflow-x: hidden;
}

/* Fundo binário animado */
.binary-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0f23 0%, #16213e 50%, #0f0f23 100%);
    z-index: -1;
    overflow: hidden;
}

.binary-char {
    position: absolute;
    color: #4fc3f7;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 16px;
    animation: binaryFall linear infinite;
    text-shadow: 0 0 10px currentColor;
    opacity: 0.8;
}

@keyframes binaryFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Container principal */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Card de login */
.login-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px -10px rgba(79, 195, 247, 0.3);
    border: 1px solid rgba(79, 195, 247, 0.2);
    position: relative;
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.logo-icon {
    position: relative;
    width: 32px;
    height: 32px;
}

.atom-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.orbit {
    position: absolute;
    border: 1px solid #333;
    border-radius: 50%;
    opacity: 0.6;
}

.orbit-1 {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.orbit-2 {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform: rotate(45deg);
}

.orbit-3 {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform: rotate(90deg);
}

.logo-text {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    letter-spacing: 0.5px;
}

/* Cabeçalho do formulário */
.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-header h1 {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.form-header p {
    color: #666;
    font-size: 14px;
}

/* Mensagens */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.message.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.message.error {
    background: #ffeaea;
    color: #c62828;
    border: 1px solid #f44336;
}

/* Grupos de formulário */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #f8f9ff;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4fc3f7;
    box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.2);
    background: white;
}

/* Container de senha */
.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ba68c8;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
}

.password-toggle:hover {
    color: #9c27b0;
}

.show-text {
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    color: #ba68c8;
    font-size: 12px;
    pointer-events: none;
}

.password-visible .show-text {
    display: none;
}

/* Ações do formulário */
.form-actions {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Botões */
.btn-primary, .btn-secondary {
    width: 100%;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #333;
    color: white;
}

.btn-primary:hover {
    background: rgba(51, 51, 51, 0.9);
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.4);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-secondary {
    background: #333;
    color: white;
    border: 1px solid #333;
}

.btn-secondary:hover {
    background: rgba(51, 51, 51, 0.9);
}

/* Loading spinner */
.loading-spinner {
    display: none;
}

.btn-primary.loading .btn-text {
    display: none;
}

.btn-primary.loading .loading-spinner {
    display: block;
}

/* Link esqueceu senha */
.forgot-password {
    text-align: center;
    margin-top: 20px;
}

.forgot-password a {
    color: #ba68c8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #9c27b0;
}

/* Responsividade */
@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }
    
    .login-card {
        padding: 24px;
    }
    
    .form-header h1 {
        font-size: 20px;
    }
}