/* --- VARIÁVEIS GLOBAIS (DESIGN SYSTEM ELASDEV) --- */
:root {
    --elasdev-bg: #0F0F0F;
    --neon-pink: #FF00FF;
    --neon-purple: #7000FF;
    --neon-blue: #00FFFF;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #FFFFFF;
    --text-secondary: #AAAAAA;
    
    /* Novas variáveis para formulários */
    --success-color: #00C851;
    --error-color: #ff4444;
    --warning-color: #ffbb33;
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.15);
    --input-focus-border: var(--neon-pink);
    --card-bg: rgba(15, 15, 15, 0.95);
}

/* --- RESET & BASE --- */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--elasdev-bg);
    color: var(--text-primary);
    scroll-behavior: smooth;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

h1, h2, h3, h4, h5 {
    font-weight: 900;
}

/* Fix focus visível em h1 - ocultar para sighted users, manter para screen readers */
h1:focus {
    outline: none;
}

h1:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* Para screen readers - manter acessibilidade */
h1:focus-visible::before {
    content: '';
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

a {
    color: var(--neon-blue);
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    color: var(--neon-pink);
}

/* --- COMPONENTES BLAZOR PADRÃO --- */
#blazor-error-ui {
    background: #330033;
    color: white;
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-top: 2px solid var(--neon-pink);
}

.loading-progress circle:last-child {
    stroke: var(--neon-pink);
}

/* --- REGISTER PAGE STYLES --- */
.register-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        rgba(15, 15, 15, 0.95) 0%, 
        rgba(112, 0, 255, 0.1) 50%, 
        rgba(15, 15, 15, 0.95) 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.register-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.register-container {
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 1;
}

.register-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    margin-bottom: 25px;
}

.logo-text {
    font-size: 3rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -2px;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 0, 255, 0.3);
}

.logo-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.register-title {
    font-size: 2rem;
    margin: 15px 0 10px;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
}

.register-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.register-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.register-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple));
}

/* Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease;
    border: 1px solid;
}

.alert-error {
    background: rgba(255, 68, 68, 0.1);
    border-color: rgba(255, 68, 68, 0.3);
    color: #ff8888;
}

.alert-success {
    background: rgba(0, 200, 81, 0.1);
    border-color: rgba(0, 200, 81, 0.3);
    color: #88ff88;
}

.alert-icon {
    margin-right: 12px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-content strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}

/* Form Grid */
.form-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 24px;
}

.form-group {
    position: relative;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-icon {
    font-size: 1.1rem;
    opacity: 0.8;
}

.form-input {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--input-border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: inherit;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-input:focus {
    outline: none;
    border-color: var(--input-focus-border);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 0, 255, 0.1);
}

.form-input.valid {
    border-color: var(--success-color);
    background: rgba(0, 200, 81, 0.05);
}

.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.password-strength {
    margin-top: 12px;
}

.strength-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--input-border);
    margin-bottom: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.strength-bar.empty {
    width: 0%;
}

.strength-bar.very-weak {
    width: 25%;
    background: var(--error-color);
    box-shadow: 0 0 10px var(--error-color);
}

.strength-bar.weak {
    width: 50%;
    background: var(--warning-color);
    box-shadow: 0 0 10px var(--warning-color);
}

.strength-bar.medium {
    width: 75%;
    background: #00C851;
    box-shadow: 0 0 10px #00C851;
}

.strength-bar.strong {
    width: 100%;
    background: var(--success-color);
    box-shadow: 0 0 10px var(--success-color);
}

.strength-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Validation Messages */
.validation-message {
    font-size: 0.85rem;
    margin-top: 6px;
    display: block;
    padding-left: 4px;
}

.validation-message.error {
    color: var(--error-color);
}

.validation-message.success {
    color: var(--success-color);
}

/* Terms and Conditions */
.terms-container {
    margin: 24px 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--input-border);
    border-radius: 4px;
    background: var(--input-bg);
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--neon-pink);
    border-color: var(--neon-pink);
}

.checkbox-input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.checkbox-text {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.terms-link {
    color: var(--neon-blue);
    text-decoration: underline;
    transition: all 0.2s ease;
}

.terms-link:hover {
    color: var(--neon-pink);
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 30px rgba(255, 0, 255, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-button:hover:not(:disabled)::before {
    left: 100%;
}

.button-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.button-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.button-icon {
    font-size: 1.2rem;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: var(--text-secondary);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.divider span {
    padding: 0 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Alternative Login */
.alternative-login {
    text-align: center;
}

.login-text {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.login-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--neon-blue);
    transform: translateY(-2px);
}

.link-icon {
    font-size: 1rem;
}

/* Footer */
.register-footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-text {
    margin: 0;
    opacity: 0.7;
}

.footer-link {
    color: var(--neon-blue);
    margin-left: 10px;
}

.footer-link:hover {
    color: var(--neon-pink);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* --- LAYOUT DE CURSOS (WIDE TECH STYLE) --- */
.courses-wide-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.course-wide-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.course-wide-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--neon-pink);
    transform: translateX(10px);
    box-shadow: -5px 0 20px rgba(255, 0, 255, 0.15);
}

.course-card-inner {
    display: grid;
    grid-template-columns: 140px 1fr 200px;
    align-items: center;
    padding: 1.5rem 2rem;
}

.tech-box {
    width: 60px;
    height: 60px;
    background: rgba(112, 0, 255, 0.1);
    border: 1px solid rgba(112, 0, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-pink);
    margin-bottom: 8px;
}

.course-id-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #555;
    letter-spacing: 1px;
}

.course-title-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #FFF;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.course-desc-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.btn-elasdev-action {
    border: 1px solid var(--neon-pink) !important;
    color: #FFF !important;
    font-weight: 700 !important;
}

.course-wide-card:hover .btn-elasdev-action {
    background: var(--neon-pink) !important;
    color: #000 !important;
}

/* --- COURSE DETAILS: MISSION BRIEFING --- */
.mission-control-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 60px;
    align-items: start;
}

.mission-sidebar {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 8px;
}

.tech-id-badge {
    display: flex;
    flex-direction: column;
    border-left: 3px solid var(--neon-pink);
    padding-left: 15px;
}

.tech-id-badge .label { font-size: 0.65rem; color: #666; font-weight: 800; letter-spacing: 2px; }
.tech-id-badge .value { font-family: 'JetBrains Mono', monospace; font-size: 1.1rem; color: #FFF; }

.stat-item { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.stat-icon { color: var(--neon-purple); opacity: 0.7; }
.stat-label { display: block; font-size: 0.6rem; color: #555; font-weight: 800; }
.stat-value { font-size: 0.85rem; color: #AAA; font-weight: 700; }

.btn-start-mission {
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple)) !important;
    color: white !important;
    font-weight: 800 !important;
    height: 50px !important;
}

.briefing-tag { font-family: 'JetBrains Mono', monospace; color: var(--neon-pink); font-size: 0.75rem; letter-spacing: 3px; }
.briefing-title { font-size: 3.5rem; font-weight: 900; margin: 10px 0; color: #FFF; }
.briefing-divider { width: 100px; height: 5px; background: var(--neon-pink); box-shadow: 0 0 15px var(--neon-pink); }

.section-subtitle { font-size: 1rem; font-weight: 800; color: var(--neon-purple); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; }

.module-card-mini {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 25px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-radius: 4px;
    transition: 0.3s;
}

.module-card-mini:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 0, 255, 0.3);
}

.module-num { 
    font-family: 'JetBrains Mono'; 
    color: var(--neon-pink); 
    font-weight: 800; 
    opacity: 0.5;
    font-size: 1.2rem;
    min-width: 40px;
}

.module-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.module-txt {
    font-weight: 600;
    color: white;
    font-size: 1rem;
}

.module-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.module-lessons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.modules-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* --- HEADER E DIVISORES DE PÁGINA --- */
.courses-title-main { 
    font-size: 2.5rem; 
    font-weight: 900; 
    text-transform: uppercase; 
    color: #FFF; 
}

.courses-divider-glow { 
    width: 80px; 
    height: 4px; 
    background: var(--neon-pink); 
    margin: 10px auto; 
    box-shadow: 0 0 15px var(--neon-pink); 
}

.section-flow-divider { 
    height: 250px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
}

.flow-line { 
    width: 1px; 
    height: 100px; 
    background: linear-gradient(to bottom, var(--neon-pink), transparent); 
    box-shadow: 0 0 15px var(--neon-pink); 
}

/* --- REVEAL EFFECTS (SCROLL) --- */
.reveal-section { 
    opacity: 0; 
    transform: translateY(40px); 
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
}

.reveal-section.is-visible { 
    opacity: 1; 
    transform: translateY(0); 
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 960px) {
    .course-card-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    .mission-control-layout { grid-template-columns: 1fr; }
    .briefing-title { font-size: 2.2rem; }
    .course-visual-aside { border: none; }
    .course-info-main { padding: 0; }
    .course-wide-card:hover { transform: translateY(-5px); }
    
    /* Responsividade para Register */
    .register-card {
        padding: 30px 20px;
    }
    
    .logo-text {
        font-size: 2.5rem;
    }
    
    .register-title {
        font-size: 1.5rem;
    }
    
    .form-grid {
        gap: 20px;
    }
    
    .submit-button {
        padding: 16px;
    }
}

/* === RESPONSIVIDADE GLOBAL MOBILE-FIRST === */
@@media (max-width: 768px) {
    /* Garante que não haja scroll horizontal */
    body {
        overflow-x: hidden;
    }

    /* Ajusta padding geral */
    .container-custom,
    .dashboard-container,
    .forum-container,
    .report-container,
    .admin-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Grids responsivos */
    .stats-grid,
    .courses-grid,
    .articles-grid {
        grid-template-columns: 1fr !important;
    }

    /* Headers responsivos */
    .page-header,
    .forum-header,
    .report-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    /* Botões em mobile */
    .btn-create,
    .btn-create-topic,
    .btn-submit {
        width: 100%;
    }

    /* Filtros em coluna */
    .forum-filters,
    .blog-filters,
    .reports-filters {
        flex-direction: column;
    }

    /* Cards menores */
    .topic-card,
    .article-card,
    .report-card {
        margin-bottom: 1rem;
    }
}

@@media (max-width: 480px) {
    /* Ajustes para telas muito pequenas */
    .page-title {
        font-size: 1.8rem !important;
    }

    .stat-value {
        font-size: 2rem !important;
    }

    /* Esconde elementos menos importantes */
    .hide-mobile {
        display: none !important;
    }
}

/* === TOUCH-FRIENDLY CONTROLS === */
button,
a,
.nav-link,
.btn-icon-action,
.lesson-link {
    min-height: 44px;
    min-width: 44px;
}

/* === VIDEO PLAYER MOBILE === */
@@media (max-width: 768px) {
    .video-wrapper {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }

    .youtube-iframe {
        width: 100%;
        height: 100%;
    }

    .lesson-navigation {
        flex-direction: column;
        width: 100%;
    }

    .btn-nav-lesson {
        width: 100%;
    }
}

/* Etiquetas Antigas (Mantidas para compatibilidade) */
.elasdev-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s ease;
}

.badge-free { background-color: var(--neon-blue); color: #000; font-weight: bold; }
.lock-icon { color: var(--neon-purple); filter: drop-shadow(0 0 5px var(--neon-purple)); }

/* --- FOCUS GLOBAL (apenas teclado) --- */
*:focus {
    outline: none !important;
    box-shadow: none !important;
}
:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.5);
    border-radius: 6px;
}
:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* --- LIGHT AREAS (formulários, blog, mentorias, detalhes de curso) --- */
.light-section {
    background: #1a1a1a;
    padding: 2rem 0;
    border-radius: 0;
}
.light-section .container-custom,
.light-section .report-container,
.light-section .checkout-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- UTILITY CLASSES --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
