/**
 * ============================================
 * CAULLER ACADEMY - HACKER THEME
 * Design System Cyberpunk/Matrix/Hacker
 * ============================================
 */

/* ============================================
   VARIÁVEIS CSS
   ============================================ */
:root {
    /* Cores Primárias - Matrix Green */
    --primary: #00ff41;
    --primary-dark: #00cc33;
    --primary-light: #33ff66;
    --primary-glow: rgba(0, 255, 65, 0.5);
    
    /* Cores Secundárias - Cyan */
    --secondary: #00d9ff;
    --secondary-dark: #00a8cc;
    --secondary-light: #33e1ff;
    
    /* Cores de Fundo - Dark */
    --bg-primary: #0a0e27;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --bg-card: rgba(15, 23, 42, 0.8);
    
    /* Cores de Texto */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Cores de Status */
    --success: #00ff41;
    --warning: #fbbf24;
    --error: #ff0040;
    --info: #00d9ff;
    
    /* Bordas e Sombras */
    --border-color: rgba(0, 255, 65, 0.2);
    --border-glow: 0 0 10px var(--primary-glow);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--primary-glow);
    
    /* Tipografia */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    
    /* Transições */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   RESET E BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   BACKGROUND MATRIX EFFECT
   ============================================ */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: 
        linear-gradient(180deg, var(--bg-primary) 0%, #0a1628 50%, var(--bg-primary) 100%);
    overflow: hidden;
}

.matrix-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 255, 65, 0.03) 2px, rgba(0, 255, 65, 0.03) 4px);
    animation: matrix-rain 20s linear infinite;
}

@keyframes matrix-rain {
    0% { transform: translateY(0); }
    100% { transform: translateY(100px); }
}

/* Grid Overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-image: 
        linear-gradient(rgba(0, 255, 65, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* Particles */
#particles {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page,
.register-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.login-container,
.register-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    animation: fadeInUp 0.8s ease;
}

.register-container {
    max-width: 600px;
}

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

.login-box,
.register-box {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    position: relative;
    box-shadow: var(--shadow-lg), var(--border-glow);
}

.login-box::before,
.register-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--primary));
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-base);
    animation: border-glow 3s ease infinite;
}

.login-box:hover::before,
.register-box:hover::before {
    opacity: 0.5;
}

@keyframes border-glow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* ============================================
   LOGO E HEADER
   ============================================ */
.login-header,
.register-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-glitch {
    margin-bottom: 16px;
}

.logo-text {
    font-size: 36px;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 4px;
    position: relative;
    display: inline-block;
    text-shadow: 
        0 0 10px var(--primary-glow),
        0 0 20px var(--primary-glow),
        0 0 30px var(--primary-glow);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 
            0 0 10px var(--primary-glow),
            0 0 20px var(--primary-glow),
            0 0 30px var(--primary-glow);
    }
    50% {
        text-shadow: 
            0 0 20px var(--primary-glow),
            0 0 30px var(--primary-glow),
            0 0 40px var(--primary-glow),
            0 0 50px var(--primary-glow);
    }
}

/* Efeito Glitch */
.logo-text::before,
.logo-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.logo-text::before {
    animation: glitch-1 2.5s infinite;
    color: var(--secondary);
    z-index: -1;
}

.logo-text::after {
    animation: glitch-2 3s infinite;
    color: var(--error);
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); opacity: 0.8; }
    33% { transform: translate(-2px, 2px); }
    66% { transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); opacity: 0.8; }
    33% { transform: translate(2px, -2px); }
    66% { transform: translate(-2px, 2px); }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.typing-text {
    overflow: hidden;
    border-right: 2px solid var(--primary);
    white-space: nowrap;
    animation: typing 3s steps(30) 1, blink 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 100% { border-color: var(--primary); }
    50% { border-color: transparent; }
}

.cursor {
    color: var(--primary);
    animation: blink 1s infinite;
}

/* ============================================
   FORMULÁRIOS
   ============================================ */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-primary);
    transition: all var(--transition-base);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
}

.form-group input:focus ~ .input-border,
.form-group select:focus ~ .input-border,
.form-group textarea:focus ~ .input-border {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ============================================
   BOTÕES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--bg-primary);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

/* Efeito de brilho no botão */
.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover .btn-glow {
    left: 100%;
}

.btn-login,
.btn-register {
    width: 100%;
    padding: 16px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: slideIn 0.4s ease;
}

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

.alert-error {
    background: rgba(255, 0, 64, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

.alert-success {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert i {
    font-size: 18px;
}

/* ============================================
   EXTRAS
   ============================================ */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    width: auto;
    margin: 0;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.forgot-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

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

.divider span {
    background: var(--bg-card);
    padding: 0 15px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
    font-size: 12px;
    text-transform: uppercase;
}

.register-section {
    text-align: center;
}

.register-section p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 14px;
}

.login-footer,
.register-footer {
    margin-top: 24px;
    text-align: center;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 20px;
    font-size: 12px;
    color: var(--primary);
}

.security-badge i {
    font-size: 14px;
}

.register-footer p {
    color: var(--text-secondary);
    font-size: 14px;
}

.register-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

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

/* ============================================
   PROGRESS BAR (REGISTRO)
   ============================================ */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    gap: 10px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all var(--transition-base);
}

.progress-step.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.progress-step span {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.progress-step.active span {
    color: var(--primary);
}

.progress-line {
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.progress-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary);
    transition: width var(--transition-slow);
}

.progress-line.active::after {
    width: 100%;
}

.step-title {
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.step-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.form-buttons {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.form-buttons .btn {
    flex: 1;
}

/* ============================================
   SIDE DECORATIONS
   ============================================ */
.side-decoration {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    opacity: 0.3;
}

.side-decoration.left {
    left: 20px;
}

.side-decoration.right {
    right: 20px;
}

.tech-line {
    width: 2px;
    height: 80px;
    background: linear-gradient(180deg, transparent, var(--primary), transparent);
    margin: 10px 0;
    animation: pulse-line 2s ease-in-out infinite;
}

@keyframes pulse-line {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 768px) {
    .login-box,
    .register-box {
        padding: 30px 20px;
    }
    
    .logo-text {
        font-size: 28px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .side-decoration {
        display: none;
    }
    
    .progress-bar {
        gap: 5px;
    }
    
    .progress-line {
        width: 40px;
    }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

