/* === DESIGN SYSTEM: PANDA ZEN === */
:root {
    --bg-main: #080808; 
    --c-panel: rgba(20, 20, 20, 0.60); /* Glassmorphism más profundo */
    --c-accent: #8ACB88; 
    --c-btn-idle: #282828; 
    --c-primary: #007FFF; 
    --text-main: #F4F4F5; /* Blanco suavizado anti-fatiga visual */
    --text-secondary: #A1A1AA; /* Gris ligeramente más vivo */
    --border-radius-card: 24px;
    --border-radius-pill: 50px;
    --transition-hover: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* === SCROLLBAR PERSONALIZADA === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--c-btn-idle);
    border-radius: 10px;
    border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--c-accent);
}

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

body {
    font-family: 'Inter', 'Roboto', 'Segoe UI', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* === NAVBAR === */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(8, 8, 8, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-family: 'Rajdhani', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.logo span {
    color: var(--c-accent);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}
nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-hover);
}
nav a:hover, nav a.active {
    color: var(--c-accent);
}

/* Botones Base */
.btn-primary, .btn-secondary, .btn-download, .btn-download-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: var(--border-radius-pill);
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    transition: var(--transition-hover);
    cursor: pointer;
    border: none;
}

.btn-primary, .btn-download-primary {
    background-color: var(--c-primary);
    color: var(--text-main);
}

.btn-secondary, .btn-download {
    background-color: transparent;
    color: var(--c-accent);
    border: 2px solid var(--c-accent);
}

.btn-primary:hover, .btn-download-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 15px rgba(0, 127, 255, 0.5);
}

.btn-secondary:hover, .btn-download:hover {
    background-color: var(--c-accent);
    color: var(--bg-main);
    box-shadow: 0 0 15px rgba(138, 203, 136, 0.4);
}

/* === INDEX.HTML SPECIFIC === */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
    position: relative;
    background: radial-gradient(circle at 70% 50%, rgba(20, 20, 20, 0.5) 0%, var(--bg-main) 70%),
                url('fondo.png') center/cover no-repeat;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.badge {
    display: inline-block;
    background: rgba(138, 203, 136, 0.1);
    color: var(--c-accent);
    padding: 6px 16px;
    border-radius: var(--border-radius-pill);
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 20px;
    border: 1px solid var(--c-accent);
    text-transform: uppercase;
}

.hero h1 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 64px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Animación 3D Strike Zone */
.opt-strike {
    position: absolute;
    right: 15%;
    top: 50%;
    transform: translateY(-50%);
    width: 360px;
    height: 480px;
    perspective: 800px;
    z-index: 10;
}
.strike-grid {
    width: 100%;
    height: 100%;
    border: 6px solid var(--c-accent);
    background: linear-gradient(var(--text-main) 2px, transparent 2px),
                linear-gradient(90deg, var(--text-main) 2px, transparent 2px);
    background-size: 33.33% 33.33%;
    transform: rotateY(-25deg);
    position: relative;
    opacity: 0.5;
}
.crosshair {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2px solid var(--c-primary);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--c-primary), inset 0 0 10px var(--c-primary);
    animation: target-lock 3s infinite alternate cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.crosshair::after {
    content: ''; position: absolute; top: 50%; left: -15px; right: -15px; height: 2px; background: var(--c-primary);
}
.crosshair::before {
    content: ''; position: absolute; left: 50%; top: -15px; bottom: -15px; width: 2px; background: var(--c-primary);
}

@keyframes target-lock {
    0% { top: 10%; left: 10%; }
    30% { top: 70%; left: 70%; opacity: 0.5; }
    60% { top: 40%; left: 40%; opacity: 1; }
    100% { top: 80%; left: 20%; }
}

.scoreboard-count {
    position: absolute;
    bottom: -60px;
    right: -20px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Rajdhani', sans-serif;
    background: var(--c-panel);
    padding: 10px 18px;
    border-radius: var(--border-radius-pill);
    border: 1px solid var(--c-accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.count-group { display: flex; align-items: center; gap: 6px; }
.count-label { color: var(--text-main); font-size: 24px; font-weight: bold; margin-right: 4px; line-height: 1; }
.count-circle { width: 18px; height: 18px; border-radius: 50%; border: 4px solid var(--c-btn-idle); background: transparent; }
.count-circle.blue { border-color: var(--c-primary); }
.count-circle.blue.filled { background: var(--c-primary); box-shadow: 0 0 10px var(--c-primary); }
.count-circle.red { border-color: #ff3b30; }
.count-circle.red.filled { background: #ff3b30; box-shadow: 0 0 10px #ff3b30; }
.count-circle.orange { border-color: #ff9500; }
.count-circle.orange.filled { background: #ff9500; box-shadow: 0 0 10px #ff9500; }

/* Features Section */
.features, .tech-stack {
    padding: 100px 10%;
    background: var(--bg-main);
    position: relative;
    z-index: 2;
}

.section-title {
    font-family: 'Rajdhani', sans-serif;
    text-align: center;
    font-size: 42px;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--c-panel);
    padding: 40px 30px;
    border-radius: var(--border-radius-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    backdrop-filter: blur(10px);
    
    /* Scroll Reveal properties */
    opacity: 0; 
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    /* El transform de inclinación lo maneja JS ahora */
    border-color: var(--c-accent);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(138, 203, 136, 0.15);
}

.icon-drawing {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
}
/* Reciclo los estilos de dibujos pero usando colores Panda Zen */
.draw-trajectory { width: 32px; height: 32px; border-top: 3px dashed var(--c-accent); border-right: 3px dashed var(--c-accent); border-top-right-radius: 32px; position: relative; }
.draw-trajectory::after { content: ''; position: absolute; bottom: -5px; right: -5px; width: 10px; height: 10px; background: var(--text-main); border-radius: 50%; box-shadow: 0 0 10px var(--c-accent); }
.draw-focus { width: 32px; height: 32px; position: relative; }
.draw-focus-box { position: absolute; width: 10px; height: 10px; border: 3px solid var(--c-accent); }
.draw-focus-box.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.draw-focus-box.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.draw-focus-box.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.draw-focus-box.br { bottom: 0; right: 0; border-left: none; border-top: none; }
.draw-focus::after { content: ''; position: absolute; top: 13px; left: 13px; width: 6px; height: 6px; background: var(--text-main); border-radius: 50%; box-shadow: 0 0 8px var(--text-main); }
.draw-bezier { width: 38px; height: 22px; border-top: 3px solid var(--c-accent); border-radius: 50% 50% 0 0; position: relative; margin-top: 10px; }
.draw-bezier::before, .draw-bezier::after { content: ''; position: absolute; width: 6px; height: 6px; background: var(--text-main); border-radius: 50%; top: -4px; box-shadow: 0 0 5px var(--c-accent); }
.draw-bezier::before { left: -3px; } .draw-bezier::after { right: -3px; }
.draw-3d { width: 20px; height: 20px; border: 3px solid var(--c-accent); transform: rotateX(55deg) rotateZ(45deg); position: relative; transform-style: preserve-3d; margin-left: 8px; }
.draw-3d::after { content: ''; position: absolute; top: -15px; left: -15px; width: 100%; height: 100%; border: 2px dashed rgba(255, 255, 255, 0.4); }
.draw-camera { width: 26px; height: 18px; border: 3px solid var(--c-accent); border-radius: 4px; position: relative; }
.draw-camera::after { content: ''; position: absolute; right: -10px; top: 1px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 7px solid var(--c-accent); }
.draw-camera::before { content: ''; position: absolute; top: -6px; left: 4px; width: 8px; height: 3px; background: var(--c-accent); }
.draw-theme { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--c-accent); background: linear-gradient(135deg, transparent 50%, var(--c-accent) 50%); position: relative; }
.draw-theme::after { content: ''; position: absolute; top: 4px; left: 4px; width: 6px; height: 6px; background: var(--text-main); border-radius: 50%; }

.feature-card h3 { font-family: 'Rajdhani', sans-serif; font-size: 24px; margin-bottom: 15px; color: var(--text-main); }
.feature-card p { color: var(--text-secondary); font-size: 15px; line-height: 1.6; }

/* Tech Stack */
.tech-stack { display: flex; align-items: center; gap: 50px; }
.tech-info { flex: 1; }
.tech-visual {
    flex: 1;
    background: var(--c-panel);
    border-radius: var(--border-radius-card);
    padding: 30px;
    font-family: monospace;
    color: var(--c-accent);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }


/* === DESCARGAS SPECIFIC === */
.downloads-section {
    padding: 150px 10% 100px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.downloads-grid {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 900px;
}
.download-card {
    background: var(--c-panel);
    padding: 50px 40px;
    border-radius: var(--border-radius-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-hover);
    flex: 1;
    min-width: 320px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideUpFade 0.6s ease-out forwards;
}
.download-card:hover {
    transform: translateY(-10px);
    border-color: var(--c-accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.os-icon { margin-bottom: 25px; display: flex; justify-content: center; align-items: center; height: 80px; }
.os-name { font-family: 'Rajdhani', sans-serif; font-size: 32px; margin-bottom: 10px; color: var(--text-main); }
.file-info { color: var(--text-secondary); font-size: 15px; margin-bottom: 35px; line-height: 1.5; }

/* === MANUAL / DOCUMENTACIÓN SPECIFIC === */
.docs-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    padding-top: 80px;
}
.sidebar {
    width: 280px;
    padding: 40px 30px;
    height: calc(100vh - 80px);
    position: sticky;
    top: 80px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    overflow-y: auto;
}
.sidebar h4 {
    font-family: 'Rajdhani', sans-serif;
    color: var(--text-secondary);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    margin-top: 30px;
}
.sidebar h4:first-child { margin-top: 0; }
.sidebar ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.sidebar a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    transition: var(--transition-hover);
    display: block;
    border-left: 2px solid transparent;
    padding-left: 10px;
}
.sidebar a:hover, .sidebar a.active {
    color: var(--c-accent);
    border-left-color: var(--c-accent);
}

.content {
    flex: 1;
    padding: 50px 80px 100px;
    max-width: 900px;
}
.content h1 { font-family: 'Rajdhani', sans-serif; font-size: 48px; margin-bottom: 15px; }
.content .subtitle { font-size: 18px; color: var(--text-secondary); margin-bottom: 50px; }
.doc-section { margin-bottom: 70px; scroll-margin-top: 100px; }
.doc-section h2 { font-family: 'Rajdhani', sans-serif; font-size: 32px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding-bottom: 10px; margin-bottom: 25px; color: var(--c-accent); }
.doc-section p, .doc-section ul { font-size: 16px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 20px; }
.doc-section ul { padding-left: 20px; }
.doc-section ul li { margin-bottom: 10px; }

/* Alertas */
.alert {
    padding: 20px 25px;
    border-radius: var(--border-radius-card);
    margin: 25px 0;
    display: flex;
    gap: 15px;
    background: var(--c-panel);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.alert-icon { font-size: 24px; line-height: 1; }
.alert-body h4 { font-size: 18px; margin-bottom: 5px; color: var(--text-main); }
.alert-body p { margin-bottom: 0; font-size: 14.5px; }
.alert.info { border-left: 4px solid var(--c-primary); }
.alert.success { border-left: 4px solid var(--c-accent); }
.alert.danger { border-left: 4px solid #ff3b30; }

kbd {
    background-color: var(--c-btn-idle);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-main);
    font-family: monospace;
    font-size: 13px;
    padding: 3px 6px;
}

/* Modal Panda Zen */
.feature-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.66);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.feature-modal.active { display: flex; opacity: 1; }

.feature-modal-content {
    background: var(--c-panel);
    padding: 40px;
    border-radius: var(--border-radius-card);
    max-width: 650px;
    width: 90%;
    position: relative;
    border: 2px solid var(--c-accent);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    transform: translateY(20px);
    opacity: 0;
}
.feature-modal.active .feature-modal-content { 
    animation: slideUpFade 0.4s ease-out forwards;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-secondary);
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
.close-modal:hover { color: var(--c-accent); }

.modal-media-container {
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#modalTitle {
    font-family: 'Rajdhani', sans-serif;
    font-size: 32px;
    color: var(--c-accent);
    margin-bottom: 15px;
    text-transform: uppercase;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
}
#modalDesc {
    color: var(--text-main);
    line-height: 1.7;
    font-size: 16px;
    text-align: justify;
}

/* === LEGAL SPECIFIC === */
.legal-container {
    max-width: 850px;
    margin: 120px auto 60px;
    padding: 50px;
    background: var(--c-panel);
    border-radius: var(--border-radius-card);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.legal-container h1 { font-family: 'Rajdhani', sans-serif; font-size: 42px; margin-bottom: 10px; color: var(--text-main); text-align: center; }
.legal-container h2 { font-family: 'Rajdhani', sans-serif; font-size: 24px; margin-top: 45px; margin-bottom: 20px; color: var(--c-accent); border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.legal-container p { color: var(--text-secondary); margin-bottom: 18px; text-align: justify; }
.legal-container ul { color: var(--text-secondary); margin-left: 20px; margin-bottom: 20px; }
.legal-container .highlight-box { background: rgba(0, 127, 255, 0.05); border-left: 4px solid var(--c-primary); padding: 20px; margin: 30px 0; border-radius: 0 8px 8px 0; }
.legal-container .highlight-box p { color: var(--text-main); font-weight: 600; }

/* === FOOTER === */
footer {
    text-align: center;
    padding: 40px 20px;
    background: var(--c-panel);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
    color: var(--text-secondary);
    font-size: 14px;
}
footer a {
    color: var(--c-accent);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition-hover);
}
footer a:hover {
    color: var(--text-main);
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    header { flex-direction: column; padding: 15px 20px; gap: 15px; text-align: center; }
    nav ul { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .hero { flex-direction: column; justify-content: center; padding: 140px 5% 50px; text-align: center; height: auto; min-height: 100vh; }
    .hero h1 { font-size: 42px; }
    .opt-strike { position: relative; right: auto; top: auto; transform: none; width: 280px; height: 380px; margin: 0 auto; }
    .features, .tech-stack { padding: 60px 5%; }
    .tech-stack { flex-direction: column; text-align: center; }
    .docs-layout { flex-direction: column; padding-top: 150px; }
    .sidebar { width: 100%; height: auto; position: relative; top: 0; border-right: none; border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding: 20px; display: flex; overflow-x: auto; white-space: nowrap; gap: 20px; }
    .sidebar h4 { display: none; }
    .sidebar ul { flex-direction: row; gap: 15px; }
    .sidebar a { border-left: none; border-bottom: 2px solid transparent; padding: 5px 0; }
    .sidebar a:hover { border-bottom-color: var(--c-accent); }
    .content { padding: 40px 20px; }
}

@keyframes slideUpFade {
    0% { transform: translateY(40px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}
