/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables de color basadas en tu tema con verde principal */
:root {
    --primary-green: #00ff00;
    --secondary-blue: #00ffff;
    --dark-bg: #0c141f;
    --black: #000000;
    --white: #ffffff;
    --gray-dark: #212121;
    --modal-bg: rgba(10, 30, 20, 0.95);
}

/* ===== PRELOADER STYLES (opcional, si lo incluyes en tu HTML) ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at center, #1e3a24 0%, #0c141f 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: all 0.5s ease;
}

.preloader-content {
    text-align: center;
    position: relative;
    z-index: 10001;
}

.logo-container {
    margin-bottom: 40px;
    animation: logoGlow 2s ease-in-out infinite alternate;
}

.main-logo {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-green);
    text-shadow:
        0 0 10px var(--primary-green),
        0 0 20px var(--primary-green),
        0 0 40px var(--primary-green);
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.tagline {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    color: var(--secondary-blue);
    text-shadow: 0 0 10px var(--secondary-blue);
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.location {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
}

@keyframes logoGlow {
    0% {
        filter: brightness(1);
        transform: scale(1);
    }
    100% {
        filter: brightness(1.2);
        transform: scale(1.02);
    }
}

/* Progress Bar */
.progress-container {
    margin: 40px 0;
    width: 400px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 255, 0, 0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 0 10px rgba(0, 255, 0, 0.3),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-green), var(--secondary-blue), var(--primary-green));
    background-size: 200% 100%;
    animation: progressShimmer 2s linear infinite;
    transition: width 0.3s ease;
    box-shadow: 0 0 15px var(--primary-green);
}

@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.progress-text {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    color: var(--primary-green);
    text-shadow: 0 0 8px var(--primary-green);
    margin-top: 15px;
    letter-spacing: 1px;
}

.progress-percentage {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: var(--secondary-blue);
    text-shadow: 0 0 10px var(--secondary-blue);
    margin-top: 10px;
    font-weight: 700;
}

/* Matrix Rain Effect */
.matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 10000;
    opacity: 0.15;
}

.matrix-column {
    position: absolute;
    top: -100%;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    color: var(--primary-green);
    text-shadow: 0 0 5px var(--primary-green);
    line-height: 1.2;
    animation: matrixFall linear infinite;
}

@keyframes matrixFall {
    0% { top: -100%; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Loading Circles */
.loading-circles {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-green);
    animation: circleLoader 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px var(--primary-green);
}

.circle:nth-child(1) { animation-delay: 0s; }
.circle:nth-child(2) { animation-delay: 0.5s; }
.circle:nth-child(3) { animation-delay: 1s; }

@keyframes circleLoader {
    0%, 100% {
        transform: scale(1);
        background: var(--primary-green);
        box-shadow: 0 0 10px var(--primary-green);
    }
    50% {
        transform: scale(1.5);
        background: var(--secondary-blue);
        box-shadow: 0 0 15px var(--secondary-blue);
    }
}

/* Terminal */
.terminal {
    margin-top: 40px;
    text-align: left;
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 5px;
    border: 1px solid var(--primary-green);
    box-shadow:
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    width: 400px;
}

.terminal-line {
    color: var(--secondary-blue);
    text-shadow: 0 0 5px var(--secondary-blue);
    margin-bottom: 8px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.terminal-line.visible {
    opacity: 1;
    transform: translateX(0);
}

.terminal-line::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--primary-green);
    margin-right: 10px;
    animation: terminalCursor 1s infinite;
}

@keyframes terminalCursor {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Responsive para preloader */
@media (max-width: 768px) {
    .main-logo {
        font-size: 2rem;
    }

    .progress-container,
    .terminal {
        width: 90vw;
        max-width: 350px;
    }

    .tagline {
        font-size: 1rem;
    }
}

/* Efecto cuando la página está cargada */
body.loaded {
    overflow: visible;
}

body.loaded .preloader {
    pointer-events: none;
}

/* ===== ESTILOS ORIGINALES ===== */
body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--dark-bg);
    color: var(--white);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    background: radial-gradient(ellipse at center, #1e3a24 0%, #0c141f 100%);
}

/* Efecto de ruido de fondo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='noise'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* Header tipo barra de tareas */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--primary-green);
}

.logo {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary-green);
    text-shadow: 0 0 8px var(--primary-green);
}

.header-center {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 900;
    color: var(--primary-green);
    text-shadow: 0 0 10px var(--primary-green);
    text-transform: uppercase;
}

.header-right {
    font-size: 14px;
    color: var(--primary-green);
    text-shadow: 0 0 5px var(--primary-green);
}

/* Desktop area */
.desktop {
    position: relative;
    width: 100vw;
    height: 100vh;
    padding: 80px 20px 20px;
    overflow: hidden;
}

/* Grid de carpetas/iconos en el escritorio */
.desktop-icons {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 20px;
    max-width: 600px;
    position: absolute;
    top: 100px;
    left: 30px;
    z-index: 2;
}

/* Icono de carpeta/aplicación */
.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
    transition: background 0.2s ease;
    max-width: 80px;
}

.desktop-icon:hover {
    background: rgba(0, 255, 0, 0.2);
}

.folder-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 8px;
    filter: drop-shadow(0px 0px 3px var(--primary-green)) brightness(120%);
}

.icon-label {
    font-size: 12px;
    text-align: center;
    color: var(--secondary-blue);
    text-shadow: 0 0 5px var(--secondary-blue);
}

.star-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-green);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    margin-bottom: 8px;
    animation: starGlow 2s infinite;
}

@keyframes starGlow {
    0%, 100% {
        filter: drop-shadow(0 0 5px var(--primary-green));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 15px var(--primary-green));
        transform: scale(1.1);
    }
}

/* Ventanas/modales arrastrables */
.modal-window {
    position: absolute;
    background: var(--modal-bg);
    border: 2px solid var(--primary-green);
    border-radius: 4px;
    min-width: 350px;
    max-width: 500px;
    box-shadow:
        0 0 20px var(--primary-green),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    z-index: 100;
    display: none;
    backdrop-filter: blur(15px);
    animation: windowOpen 0.3s ease-out;
}

.modal-window.active {
    display: block;
}

.modal-window.focused {
    z-index: 1001;
    border-color: var(--secondary-blue);
    box-shadow:
        0 0 25px var(--secondary-blue),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
}

/* Barra de título de ventana */
.window-header {
    background: linear-gradient(90deg, var(--primary-green), rgba(0, 255, 0, 0.7));
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
}

.window-title {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 0 5px var(--white);
    text-transform: uppercase;
}

.window-close {
    background: none;
    border: none;
    color: var(--secondary-blue);
    font-size: 18px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.window-close:hover {
    background: var(--secondary-blue);
    color: var(--black);
    box-shadow: 0 0 8px var(--secondary-blue);
}

/* Contenido de ventana */
.window-content {
    padding: 20px;
    color: var(--white);
    font-size: 14px;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
}

.window-content h3 {
    color: var(--primary-green);
    font-family: 'Orbitron', monospace;
    margin-bottom: 15px;
    text-shadow: 0 0 8px var(--primary-green);
}

.window-content a {
    color: var(--secondary-blue);
    text-decoration: none;
}

.window-content a:hover {
    text-shadow: 0 0 5px var(--secondary-blue);
}

/* Scrollbar personalizado */
.window-content::-webkit-scrollbar {
    width: 8px;
}

.window-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

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

.window-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-blue);
}

/* Animaciones */
@keyframes windowOpen {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Enlace "SOPORTE REMOTO" */
.solutions-link {
    position: fixed;
    bottom: 30px;
    right: 30px;
    color: var(--primary-green);
    text-decoration: none;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 16px;
    text-shadow: 0 0 8px var(--primary-green);
    animation: textFlicker 0.1s infinite alternate;
    z-index: 100;
    cursor: pointer;
}

@keyframes textFlicker {
    from {
        text-shadow: -1px 0 0 var(--primary-green), -3px 0 0 var(--secondary-blue);
    }
    to {
        text-shadow: 2px 0.5px 2px var(--secondary-blue), -1px -0.5px 2px var(--primary-green);
    }
}

/* Responsive para tablets */
@media (max-width: 1024px) {
    .desktop-icons {
        grid-template-columns: repeat(4, 1fr);
        max-width: 400px;
    }

    .modal-window {
        min-width: 300px;
        max-width: 90vw;
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .desktop-icons {
        grid-template-columns: repeat(3, 1fr);
        max-width: 300px;
        left: 15px;
    }

    .folder-icon {
        width: 40px;
        height: 40px;
    }

    .modal-window {
        min-width: 280px;
        max-width: 95vw;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }

    .window-header {
        cursor: default;
    }
}
/* === Ajustes Responsive Header === */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: center;
    padding: 10px;
    text-align: center;
  }

  .logo {
    font-size: 14px;
    margin-bottom: 5px;
  }

  .header-center {
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: 5px;
    white-space: normal; /* permite salto de línea */
  }

  .header-right {
    font-size: 12px;
    margin-bottom: 5px;
    word-break: break-word; /* evita que el correo se salga */
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 12px;
  }

  .header-center {
    font-size: 12px;
  }

  .header-right {
    font-size: 11px;
  }
}
