/* Estilos base */
:root {
    --primary-color: #05aa05;
    --secondary-color: #8f08ce;
    --dark-color: #0a0a0a;
    --light-color: #f0f0f0;
    --accent-color: #ff5500;
    --terminal-bg: rgba(10, 10, 10, 0.9);
}

body {
    font-family: 'Roboto Mono', monospace;
    background-color: var(--dark-color);
    color: var(--light-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: -1;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -2;
}

/* Cursor personalizado mejorado */
.custom-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

.cursor-inner {
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.cursor-outer {
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: all 0.1s;
}

.cursor-hover {
    width: 20px;
    height: 20px;
    background-color: var(--secondary-color);
}

.cursor-hover-outer {
    width: 50px;
    height: 50px;
    border-color: var(--secondary-color);
}

/* Contenedor principal */
.container {
    display: flex;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Sidebar estilo terminal */
.sidebar {
    width: 300px;
    background-color: var(--terminal-bg);
    padding: 20px;
    border-right: 4px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.profile-section {
    text-align: center;
    margin-bottom: 30px;
}

.profile-pic {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    position: relative;
    border: 4px solid var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.level-badge {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background-color: var(--accent-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    border: 3px solid white;
}

.neon-text {
    font-family: 'Press Start 2P', cursive;
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
    animation: neon-flicker 1.5s infinite alternate;
}

@keyframes neon-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

.aboutme {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Barra de XP */
.xp-bar {
    width: 100%;
    height: 20px;
    background-color: #333;
    border-radius: 10px;
    margin: 15px 0;
    overflow: hidden;
    position: relative;
    border: 2px solid #555;
}

.xp-progress {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #00cc00);
    border-radius: 8px;
    transition: width 1s ease-in-out;
}

.xp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 1px black;
}

/* Botones de navegación */
.nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.nav-button {
    background-color: transparent;
    border: none;
    position: relative;
    padding: 0;
}

.pixel-btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    cursor: pointer;
    position: relative;
    text-transform: uppercase;
    transition: all 0.3s;
    border: 2px solid #555;
    box-shadow: 3px 3px 0 #555;
}

.pixel-btn:hover {
    background-color: var(--primary-color);
    color: black;
    box-shadow: 5px 5px 0 #555;
    transform: translate(-2px, -2px);
}

.pixel-btn:active {
    box-shadow: 1px 1px 0 #555;
    transform: translate(2px, 2px);
}

.pixel-btn a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Habilidades */
.skills {
    margin-bottom: 30px;
}

.skills h3 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background-color: rgba(0, 255, 0, 0.2);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid var(--primary-color);
    transition: all 0.3s;
}

.skill-tag:hover {
    background-color: var(--primary-color);
    color: black;
    transform: translateY(-2px);
}

/* Stats */
.stats-container {
    margin-top: 30px;
}

.stats-container h3 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat {
    margin-bottom: 10px;
}

.stat-name {
    display: block;
    margin-bottom: 5px;
    font-size: 0.8rem;
}

.stat-bar {
    width: 100%;
    height: 10px;
    background-color: #333;
    border-radius: 5px;
    overflow: hidden;
}

.stat-value {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    border-radius: 5px;
    transition: width 1s ease-in-out;
}

/* ==================== ESTILOS ADICIONALES PARA SPA ==================== */

/* Contenedor principal del contenido SPA */
.spa-content {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Animación para el cambio de secciones */
.spa-content.loading {
    opacity: 0;
    transform: translateY(20px);
}

/* ==================== ESTILOS PARA LA SECCIÓN DE HABILIDADES ==================== */

.skill-category {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.skill-category h3 {
    color: var(--primary-color);
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 0 5px var(--primary-color);
}

.skill-progress-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skill-progress-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-name {
    color: var(--light-color);
    font-size: 0.9rem;
    font-weight: bold;
}

.skill-bar {
    width: 100%;
    height: 20px;
    background-color: rgba(51, 51, 51, 0.8);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid #555;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    font-size: 0.8rem;
    font-weight: bold;
    color: black;
    transition: width 1.5s ease-in-out;
    position: relative;
}

.skill-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.2) 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ==================== MEJORAS RESPONSIVAS PARA SPA ==================== */

@media (max-width: 768px) {
    .skill-category {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .skill-category h3 {
        font-size: 0.8rem;
    }
    
    .skill-progress-container {
        gap: 12px;
    }
    
    .skill-bar {
        height: 16px;
    }
    
    .skill-progress {
        font-size: 0.7rem;
        padding-right: 8px;
    }
}

/* ==================== EFECTOS ADICIONALES ==================== */

/* Efecto de aparición gradual para las secciones */
.section {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Mejora en la transición del menú SPA */
.spa-menu a {
    position: relative;
    overflow: hidden;
}

.spa-menu a::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s;
}

.spa-menu a:hover::after {
    left: 100%;
}

/* Efecto de carga para las secciones */
.section-loading {
    position: relative;
}

.section-loading::before {
    content: 'CARGANDO...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-color);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Mejoras en el formulario de contacto para SPA */
.contact-form {
    animation: slideInFromBottom 0.6s ease-out;
}

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

/* Efectos hover mejorados para los proyectos */
.inventory-slot {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.inventory-slot:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 15px 35px rgba(0, 255, 0, 0.2),
        0 0 20px rgba(0, 255, 0, 0.1);
}

/* zona de NAV-SPA */
/* Estilos para el menú de navegación SPA */
.spa-options {
    position: relative;
    z-index: 100;
    margin-bottom: 30px;
    padding: 10px;
    background-color: rgba(10, 10, 10, 0.8);
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
    border-radius: 5px;
}

.spa-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 15px;
    flex-wrap: wrap;
}

.spa-menu li {
    position: relative;
}

.spa-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: all 0.3s ease;
    background-color: rgba(0, 0, 0, 0.7);
    position: relative;
    overflow: hidden;
}

.spa-menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.spa-menu a:hover {
    color: black;
    background-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    transform: translateY(-3px);
}

.spa-menu a:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.spa-menu a.active {
    color: black;
    background-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.7);
    border: 2px solid var(--secondary-color);
}

.spa-menu a.active::after {
    content: '>';
    position: absolute;
    right: 10px;
    animation: blink 0.8s infinite;
}

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

/* Efecto de selección tipo consola */
.spa-menu a:focus {
    outline: none;
    animation: select-option 0.3s ease;
}

@keyframes select-option {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Indicador de sección activa */
.spa-menu li::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.spa-menu li:hover::after {
    width: 80%;
}

.spa-menu li.active::after {
    width: 100%;
    background-color: var(--primary-color);
    height: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .spa-menu {
        flex-direction: column;
        gap: 8px;
    }
    
    .spa-menu a {
        padding: 10px 15px;
        font-size: 0.7rem;
        text-align: center;
    }
    
    .spa-menu li::after {
        bottom: -3px;
    }
}

/* Efecto de cursor personalizado para los items */
.spa-menu a {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><circle cx="8" cy="8" r="6" fill="%2300ff00"/></svg>'), auto;
}

/* Contenido principal */

.main-content {
    flex: 1;
    padding: 0 20px;
}

.section {
    background-color: var(--terminal-bg);
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 5px;
    position: relative;
}

.pixel-border {
    border: 4px solid var(--primary-color);
    position: relative;
}

.pixel-border::before {
    content: "";
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 4px solid var(--secondary-color);
    z-index: -1;
    border-radius: 5px;
}

.section h2 {
    color: var(--primary-color);
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.highlight {
    color: var(--secondary-color);
    text-shadow: 0 0 5px var(--secondary-color);
}

.text-info {
    line-height: 1.6;
    font-size: 0.95rem;
}

/* CSS adicional para SPA - puedes moverlo a tu archivo style.css */
.spa-content {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.skill-category {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.skill-category h3 {
    color: var(--primary-color);
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 0 5px var(--primary-color);
}

.skill-progress-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skill-progress-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-name {
    color: var(--light-color);
    font-size: 0.9rem;
    font-weight: bold;
}

.skill-bar {
    width: 100%;
    height: 20px;
    background-color: rgba(51, 51, 51, 0.8);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid #555;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    font-size: 0.8rem;
    font-weight: bold;
    color: black;
    transition: width 1.5s ease-in-out;
}

.section {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Efecto terminal */
.terminal-effect {
    background-color: var(--terminal-bg);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.terminal-header {
    background-color: #333;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

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

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-btn.red { background-color: #ff5f56; }
.terminal-btn.yellow { background-color: #ffbd2e; }
.terminal-btn.green { background-color: #27c93f; }

.terminal-title {
    font-size: 0.7rem;
    color: #aaa;
    font-family: 'Press Start 2P', cursive;
}

.terminal-content {
    padding: 0 10px;
}

/* Proyectos */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 5px 10px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.7rem;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: black;
    font-weight: bold;
}

.contenedor {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.inventory-grid {
    perspective: 1000px;
}

.item {
    display: block;
    text-decoration: none;
    color: white;
    transition: all 0.3s;
    position: relative;
    transform-style: preserve-3d;
}

.inventory-slot {
    background-color: rgba(51, 51, 51, 0.7);
    border: 2px solid #555;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.inventory-slot::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.inventory-slot:hover {
    transform: translateY(-5px) rotateX(10deg);
    box-shadow: 0 10px 20px rgba(0, 255, 0, 0.3);
    border-color: var(--primary-color);
}

.screen {
    width: 100%;
    height: 150px;
    background-color: #222;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #444;
    position: relative;
    overflow: hidden;
}

.screen::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0) 20%,
        rgba(255, 255, 255, 0) 80%,
        rgba(255, 255, 255, 0.1) 100%
    );
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.item:hover .project-img {
    transform: scale(1.05);
}

.item p {
    margin-top: 10px;
    font-weight: bold;
    color: var(--primary-color);
}

.item-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    font-size: 0.7rem;
    border-radius: 3px;
    font-weight: bold;
}

.web-tag {
    background-color: rgba(0, 119, 255, 0.8);
    color: white;
}

.game-tag {
    background-color: rgba(255, 85, 0, 0.8);
    color: white;
}

/* Formulario de contacto */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.pixel-input {
    width: 100%;
    padding: 10px;
    background-color: #333;
    border: 2px solid #555;
    color: white;
    font-family: 'Roboto Mono', monospace;
    border-radius: 5px;
    transition: all 0.3s;
}

.pixel-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.send-btn {
    display: block;
    margin: 30px auto 0;
    padding: 12px 25px;
    font-size: 1rem;
}

/* Footer */
.pixel-footer {
    text-align: center;
    padding: 20px;
    background-color: var(--terminal-bg);
    border-top: 4px solid var(--primary-color);
    margin-top: 50px;
}

.pixel-footer p {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.pixel-social {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s;
    border: 2px solid #555;
}

.pixel-social:hover {
    background-color: var(--primary-color);
    color: black;
    transform: translateY(-3px);
}

/* Botón volver arriba */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    z-index: 99;
}

/* Efectos de animación */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 4px solid var(--primary-color);
        margin-bottom: 30px;
    }
    
    .nav-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .contenedor {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 576px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-buttons {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .contenedor {
        grid-template-columns: 1fr 1fr;
    }
    
    .neon-text {
        font-size: 1.2rem;
    }
}
