/* variables globales */
:root {
    --bg-color: #050508;
    --card-bg: rgba(10, 10, 15, 0.7);
    --border-color: rgba(0, 255, 0, 0.2);
    --border-glow: rgba(0, 255, 0, 0.4);
    
    /* Paleta neón del logo */
    --neon-green: #00ff00;
    --neon-cyan: #00e5ff;
    --neon-yellow: #ffeb3b;
    --neon-magenta: #e91e63;
    --neon-white: #ffffff;
    
    --text-color: #e0e0e8;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    --font-header: 'Share Tech Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 50% 10%, rgba(20, 20, 35, 0.5) 0%, rgba(5, 5, 8, 1) 80%),
        linear-gradient(rgba(18, 18, 18, 0.3) 50%, rgba(0, 0, 0, 0) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 100%, 100% 4px, 6px 100%;
}

/* Efectos retro CRT de terminal */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    ), linear-gradient(
        90deg, 
        rgba(255, 0, 0, 0.06), 
        rgba(0, 255, 0, 0.02), 
        rgba(0, 0, 255, 0.06)
    );
    background-size: 100% 4px, 6px 100%;
    z-index: 9999;
    pointer-events: none;
}

.crt-effect {
    animation: textShadow 1.6s infinite alternate;
}

@keyframes textShadow {
    0% {
        text-shadow: 0.4px 0 1px rgba(0,255,0,0.5), -0.4px 0 1px rgba(255,0,0,0.3);
    }
    100% {
        text-shadow: -0.4px 0 1px rgba(0,255,0,0.5), 0.4px 0 1px rgba(255,0,0,0.3);
    }
}

/* Clases de utilidad para colores neón */
.green-text { color: var(--neon-green); text-shadow: 0 0 8px rgba(0, 255, 0, 0.4); }
.cyan-text { color: var(--neon-cyan); text-shadow: 0 0 8px rgba(0, 229, 255, 0.4); }
.yellow-text { color: var(--neon-yellow); text-shadow: 0 0 8px rgba(255, 235, 59, 0.4); }
.magenta-text { color: var(--neon-magenta); text-shadow: 0 0 8px rgba(233, 30, 99, 0.4); }
.white-text { color: var(--neon-white); }

.green-bg { background-color: var(--neon-green); }
.cyan-bg { background-color: var(--neon-cyan); }
.yellow-bg { background-color: var(--neon-yellow); }
.magenta-bg { background-color: var(--neon-magenta); }

/* Barra de Navegación */
.navbar {
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 0.8rem 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-dot {
    width: 10px;
    height: 10px;
    background-color: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-green);
    animation: pulse 1.5s infinite;
}

.logo-text {
    font-family: var(--font-header);
    font-size: 1.6rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-header);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.nav-link svg {
    width: 16px;
    height: 16px;
}

.nav-link:hover, .nav-link.active {
    color: var(--neon-green);
    border: 1px dashed var(--neon-green);
    background: rgba(0, 255, 0, 0.05);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.2);
}

/* Contenedor Principal */
.main-container {
    max-width: 1200px;
    margin: 80px auto 40px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Paneles Glassmorphism estilo retro-futuro */
.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

/* Sección de Encabezado */
.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-family: var(--font-header);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 svg {
    width: 28px;
    height: 28px;
}

.section-header p {
    color: #a0a0b0;
    font-size: 1.05rem;
}

/* HERO / SECCIÓN TERMINAL */
.hero-section {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 20px;
    align-items: stretch;
    margin-top: 20px;
}

/* Ventana de Terminal */
.terminal-window {
    background: #020204;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 255, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 520px;
    overflow: hidden;
}

.terminal-header {
    background: rgba(15, 15, 25, 0.9);
    padding: 10px 15px;
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.terminal-buttons {
    display: flex;
    gap: 6px;
}

.terminal-buttons span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.btn-close { background-color: #ff5f56; }
.btn-minimize { background-color: #ffbd2e; }
.btn-expand { background-color: #27c93f; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #888899;
}

.terminal-status {
    font-family: var(--font-header);
    font-size: 0.85rem;
    color: var(--neon-green);
    letter-spacing: 1px;
}

.terminal-body {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    font-family: var(--font-mono);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ascii-logo {
    font-family: monospace;
    font-size: 8px;
    line-height: 1.1;
    color: var(--neon-cyan);
    white-space: pre;
    overflow-x: auto;
    text-shadow: 0 0 5px rgba(0, 229, 255, 0.3);
}

.welcome-text p {
    margin-bottom: 5px;
}

.main-title {
    font-size: 2.2rem;
    font-family: var(--font-header);
    margin: 8px 0 2px;
    letter-spacing: 2px;
}

.subtitle-text {
    font-size: 1.1rem;
    font-family: var(--font-header);
    margin-bottom: 12px;
    opacity: 0.9;
}

.terminal-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.terminal-history-item {
    margin-bottom: 4px;
}

.terminal-history-item .cmd-input {
    color: var(--neon-white);
    font-weight: bold;
}

.terminal-history-item .cmd-output {
    color: #a0a0b0;
    white-space: pre-wrap;
    padding-left: 12px;
    margin-top: 4px;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.terminal-input-line .prompt {
    color: var(--neon-green);
    font-weight: bold;
}

#terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--neon-white);
    font-family: var(--font-mono);
    font-size: 14px;
    flex-grow: 1;
    caret-color: var(--neon-green);
}

/* Tarjeta Mascota ALS */
.mascot-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.mascot-card::before {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.mascot-img-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(0, 229, 255, 0.3);
    border-radius: 4px;
    padding: 15px;
    min-height: 220px;
    position: relative;
    overflow: hidden;
}

#mascot-avatar {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 4px;
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.4));
}

.fallback-svg {
    width: 100%;
    height: 180px;
}

.neon-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px var(--neon-green));
}

.mascot-info h3 {
    font-family: var(--font-header);
    font-size: 1.4rem;
    color: var(--neon-white);
}

.status-badge {
    font-size: 0.85rem;
    color: var(--neon-green);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--neon-green);
    animation: pulse 1.5s infinite;
}

.mascot-terminal-info {
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 229, 255, 0.1);
    padding: 12px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.info-row .label {
    color: #666677;
}

.info-row .val {
    font-weight: bold;
}

/* BOTONES RETRO */
.btn-retro {
    font-family: var(--font-header);
    padding: 10px 20px;
    border: 1px solid;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.btn-retro svg {
    width: 18px;
    height: 18px;
}

.cyan-btn {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}
.cyan-btn:hover {
    background: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

.green-btn {
    border-color: var(--neon-green);
    color: var(--neon-green);
}
.green-btn:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.4);
}

.red-btn {
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
}
.red-btn:hover {
    background: rgba(233, 30, 99, 0.1);
    box-shadow: 0 0 12px rgba(233, 30, 99, 0.4);
}

/* SECCIÓN IDEAS / CANVAS DE ARQUITECTURA */
.architecture-sandbox {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    margin-top: 20px;
    height: 500px;
}

.sandbox-toolbox {
    background: rgba(10, 10, 15, 0.5);
    border: 1px dashed rgba(255, 235, 59, 0.3);
    border-radius: 4px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toolbox-header {
    font-family: var(--font-header);
    color: var(--neon-yellow);
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 235, 59, 0.2);
    padding-bottom: 8px;
}

.toolbox-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
    overflow-y: auto;
}

.tool-item {
    background: rgba(255, 235, 59, 0.05);
    border: 1px solid rgba(255, 235, 59, 0.2);
    padding: 10px 12px;
    border-radius: 4px;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    user-select: none;
}

.tool-item:hover {
    background: rgba(255, 235, 59, 0.12);
    border-color: var(--neon-yellow);
    box-shadow: 0 0 8px rgba(255, 235, 59, 0.2);
}

.tool-item svg {
    width: 16px;
    height: 16px;
    color: var(--neon-yellow);
}

.toolbox-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toolbox-actions button {
    width: 100%;
}

/* Área del Canvas */
.sandbox-canvas-container {
    background: #020204;
    border: 1px solid rgba(255, 235, 59, 0.2);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.canvas-grid {
    width: 100%;
    height: 100%;
    background-size: 20px 20px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    position: relative;
}

.canvas-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.canvas-node {
    position: absolute;
    background: rgba(10, 10, 15, 0.9);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-white);
    border-radius: 4px;
    padding: 8px 12px;
    cursor: move;
    user-select: none;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), 0 0 6px rgba(0, 229, 255, 0.2);
    min-width: 140px;
}

.canvas-node:hover {
    border-color: var(--neon-white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7), 0 0 10px rgba(0, 229, 255, 0.4);
}

.node-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    position: relative;
}

.node-header svg {
    width: 14px;
    height: 14px;
    color: var(--neon-cyan);
}

.node-port {
    width: 8px;
    height: 8px;
    background-color: var(--neon-cyan);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 4px var(--neon-cyan);
}

.input-port {
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
}

.output-port {
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
}

/* Reporte de Análisis */
.console-report {
    margin-top: 20px;
    background: #020204;
    border: 1px solid var(--neon-green);
    border-radius: 4px;
    overflow: hidden;
}

.report-header {
    background: rgba(0, 255, 0, 0.05);
    padding: 8px 15px;
    font-family: var(--font-header);
    color: var(--neon-green);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.report-header svg {
    width: 16px;
    height: 16px;
}

.report-body {
    padding: 15px;
    font-family: var(--font-mono);
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.9rem;
    color: #c0c0d0;
}

.report-line {
    margin-bottom: 5px;
}

/* CASOS DE ESTUDIO / TARJETAS DE ANÁLISIS */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.analysis-card {
    background: rgba(10, 10, 15, 0.5);
    border: 1px solid rgba(233, 30, 99, 0.2);
    border-radius: 4px;
    padding: 20px;
    transition: all 0.3s ease;
}

.analysis-card:hover {
    border-color: var(--neon-magenta);
    box-shadow: 0 0 12px rgba(233, 30, 99, 0.2);
    transform: translateY(-2px);
}

.card-title {
    font-family: var(--font-header);
    font-size: 1.25rem;
    color: var(--neon-white);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.card-title .index {
    color: var(--neon-magenta);
    font-size: 0.9rem;
    border: 1px solid rgba(233, 30, 99, 0.4);
    padding: 2px 6px;
    border-radius: 2px;
}

.analysis-card p {
    color: #a0a0b0;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.metric-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.metric-fill {
    height: 100%;
    box-shadow: 0 0 8px currentColor;
}

.metric-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666677;
}

/* FORMULARIO DE CONTACTO */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-family: var(--font-header);
    color: var(--neon-cyan);
    font-size: 1rem;
}

.form-group input, .form-group textarea {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 229, 255, 0.2);
    padding: 12px 15px;
    color: var(--neon-white);
    font-family: var(--font-mono);
    border-radius: 4px;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
    background: rgba(0, 229, 255, 0.05);
}

.form-feedback {
    font-size: 0.9rem;
    font-family: var(--font-mono);
    min-height: 20px;
}

/* FOOTER */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 30px 20px;
    text-align: center;
    background: rgba(5, 5, 8, 0.9);
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer p {
    color: #666677;
}

.footer .tagline {
    font-family: var(--font-header);
    color: var(--neon-green);
    letter-spacing: 1px;
    font-size: 0.95rem;
}

/* ANIMACIONES */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

/* Responsividad Móvil */
@media (max-width: 900px) {
    .hero-section {
        grid-template-columns: 1fr;
    }
    
    .architecture-sandbox {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .sandbox-canvas-container {
        height: 400px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .navbar-container {
        flex-direction: column;
        gap: 12px;
        padding: 0.5rem 10px;
    }

    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .ascii-logo {
        font-size: 1.5vw;
        line-height: 1.2;
    }
    
    .main-container {
        margin-top: 140px;
    }

    .analysis-grid {
        grid-template-columns: 1fr;
    }
}
