/* =============================================================================
 *  assets/css/cyber.css
 *  Estilo cyberpunk compartido — igual a la presentación React
 *  Paleta: #030306 base · #10b981 emerald · #d946ef fuchsia · #22d3ee cyan
 * ============================================================================= */

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

html { scroll-behavior: smooth; }

body {
    background: #030306;
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Gradient orbs de fondo */
body::before, body::after {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}
body::before {
    background: rgba(16, 185, 129, 0.15);
    top: -100px;
    left: 20%;
}
body::after {
    background: rgba(217, 70, 239, 0.15);
    bottom: -100px;
    right: 20%;
}

/* Matrix rain background (canvas) */
#matrix-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
}

main, .main-wrapper { position: relative; z-index: 10; }

/* Typography */
.font-mono {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; }

a {
    color: #10b981;
    text-decoration: none;
    transition: all 0.3s;
}
a:hover { color: #34d399; text-shadow: 0 0 10px rgba(16, 185, 129, 0.5); }

/* ---------- NAVBAR ---------- */
.cyber-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    backdrop-filter: blur(16px);
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.75rem 1.5rem;
}
.cyber-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.cyber-nav-brand {
    font-family: 'JetBrains Mono', monospace;
    color: #10b981;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cyber-nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.cyber-nav-links a {
    padding: 0.5rem 0.75rem;
    color: #9ca3af;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    border: 1px solid transparent;
    transition: all 0.3s;
}
.cyber-nav-links a:hover, .cyber-nav-links a.active {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* ---------- CONTAINER ---------- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.container-sm { max-width: 600px; margin: 0 auto; padding: 2rem 1.5rem; }
.container-md { max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-content { padding-top: 6rem; padding-bottom: 4rem; min-height: 100vh; }

/* ---------- GLITCH TEXT ---------- */
.glitch {
    position: relative;
    display: inline-block;
    color: #fff;
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.glitch::before {
    color: #22d3ee;
    opacity: 0.7;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-2px, -1px);
}
.glitch::after {
    color: #d946ef;
    opacity: 0.7;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    transform: translate(2px, 1px);
}

/* ---------- HEADINGS ---------- */
.section-label {
    font-family: 'JetBrains Mono', monospace;
    color: #10b981;
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    margin-bottom: 0.75rem;
    opacity: 0.8;
    text-align: center;
}
.section-title {
    font-size: clamp(2rem, 5vw, 3.75rem);
    text-align: center;
    margin-bottom: 1rem;
}
.section-subtitle {
    color: #9ca3af;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem;
}
.divider-line {
    margin: 1.5rem auto;
    width: 6rem;
    height: 2px;
    background: linear-gradient(to right, transparent, #10b981, transparent);
}
.divider-line.purple { background: linear-gradient(to right, transparent, #d946ef, transparent); }
.divider-line.cyan { background: linear-gradient(to right, transparent, #22d3ee, transparent); }

/* ---------- CYBER CARD ---------- */
.cyber-card {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s;
}
.cyber-card:hover {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.2);
}
.cyber-card.purple { border-color: rgba(217, 70, 239, 0.3); }
.cyber-card.purple:hover { border-color: rgba(217, 70, 239, 0.6); box-shadow: 0 0 40px rgba(217, 70, 239, 0.2); }
.cyber-card.cyan { border-color: rgba(34, 211, 238, 0.3); }
.cyber-card.cyan:hover { border-color: rgba(34, 211, 238, 0.6); box-shadow: 0 0 40px rgba(34, 211, 238, 0.2); }

.cyber-card .header-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, #10b981, transparent);
    opacity: 0;
    transition: opacity 0.5s;
}
.cyber-card:hover .header-line { opacity: 1; }

/* ---------- FORM ELEMENTS ---------- */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #10b981;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #fff;
    padding: 0.75rem 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    transition: all 0.3s;
    outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}
.form-input::placeholder { color: #6b7280; }
.form-textarea { min-height: 100px; resize: vertical; }
.form-select { cursor: pointer; }
.form-select option { background: #030306; color: #fff; }

/* ---------- BUTTONS (NEON) ---------- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #10b981;
    color: #6ee7b7;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}
.btn:hover {
    background: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 35px rgba(16, 185, 129, 0.7);
    color: #6ee7b7;
    transform: translateY(-2px);
}
.btn:active { transform: translateY(0); }
.btn.purple {
    border-color: #d946ef;
    color: #f5d0fe;
    box-shadow: 0 0 20px rgba(217, 70, 239, 0.3);
}
.btn.purple:hover {
    background: rgba(217, 70, 239, 0.1);
    box-shadow: 0 0 35px rgba(217, 70, 239, 0.7);
}
.btn.cyan {
    border-color: #22d3ee;
    color: #a5f3fc;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
}
.btn.cyan:hover {
    background: rgba(34, 211, 238, 0.1);
    box-shadow: 0 0 35px rgba(34, 211, 238, 0.7);
}
.btn.danger {
    border-color: #ef4444;
    color: #fca5a5;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}
.btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    box-shadow: 0 0 35px rgba(239, 68, 68, 0.7);
}
.btn.small { padding: 0.4rem 0.8rem; font-size: 0.7rem; }
.btn.full { width: 100%; text-align: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- FLASH MESSAGES ---------- */
.flash {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.flash::before { content: '[ '; }
.flash::after { content: ' ]'; }
.flash-emerald { border-color: #10b981; color: #6ee7b7; background: rgba(16, 185, 129, 0.1); }
.flash-fuchsia { border-color: #d946ef; color: #f5d0fe; background: rgba(217, 70, 239, 0.1); }
.flash-cyan { border-color: #22d3ee; color: #a5f3fc; background: rgba(34, 211, 238, 0.1); }
.flash-amber { border-color: #f59e0b; color: #fcd34d; background: rgba(245, 158, 11, 0.1); }

/* ---------- STATS ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-box {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(16, 185, 129, 0.3);
    backdrop-filter: blur(16px);
    text-align: center;
    transition: all 0.3s;
}
.stat-box:hover { transform: translateY(-4px); box-shadow: 0 0 30px rgba(16, 185, 129, 0.2); }
.stat-box .stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #10b981;
    margin-bottom: 0.5rem;
}
.stat-box.purple .stat-value { color: #d946ef; }
.stat-box.cyan .stat-value { color: #22d3ee; }
.stat-box .stat-label {
    color: #9ca3af;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ---------- TABLES ---------- */
.cyber-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.5);
    font-size: 0.875rem;
}
.cyber-table th, .cyber-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}
.cyber-table th {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-bottom-color: rgba(16, 185, 129, 0.3);
}
.cyber-table tbody tr:hover { background: rgba(16, 185, 129, 0.05); }
.cyber-table td { color: #d1d5db; }

/* ---------- BADGES ---------- */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    border: 1px solid;
    text-transform: uppercase;
}
.badge.green { color: #10b981; border-color: rgba(16, 185, 129, 0.5); background: rgba(16, 185, 129, 0.1); }
.badge.purple { color: #d946ef; border-color: rgba(217, 70, 239, 0.5); background: rgba(217, 70, 239, 0.1); }
.badge.cyan { color: #22d3ee; border-color: rgba(34, 211, 238, 0.5); background: rgba(34, 211, 238, 0.1); }
.badge.amber { color: #f59e0b; border-color: rgba(245, 158, 11, 0.5); background: rgba(245, 158, 11, 0.1); }
.badge.red { color: #ef4444; border-color: rgba(239, 68, 68, 0.5); background: rgba(239, 68, 68, 0.1); }

/* ---------- HERO INDEX INTERACTIVO ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1rem 4rem;
    position: relative;
}
.hero h1 {
    font-size: clamp(2.5rem, 8vw, 6rem);
    margin-bottom: 1rem;
    line-height: 1.1;
}
.hero-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #d1d5db;
    margin-bottom: 2rem;
    min-height: 2rem;
}
.hero-desc {
    color: #9ca3af;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
}
.hero-cta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}
.cursor-blink::after {
    content: '▊';
    color: #10b981;
    animation: blink 1s infinite;
}
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Classified badge */
.classified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
}

/* ---------- QUIZ QUESTION CARD ---------- */
.question-card {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 2rem;
    margin-bottom: 1rem;
}
.question-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: cover;
    border: 1px solid rgba(16, 185, 129, 0.3);
    margin: 1rem auto;
    display: block;
}
.question-text {
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(16, 185, 129, 0.2);
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: #d1d5db;
}
.option:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
    transform: translateX(4px);
}
.option.selected {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}
.option.correct {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}
.option.incorrect {
    border-color: #d946ef;
    background: rgba(217, 70, 239, 0.2);
    color: #f5d0fe;
}
.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #10b981;
    font-weight: 700;
    flex-shrink: 0;
}
.option input[type="radio"] { display: none; }

/* ---------- PROGRESS BAR ---------- */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #10b981, #22d3ee);
    transition: width 0.4s;
}

/* ---------- FOOTER ---------- */
.cyber-footer {
    padding: 2rem 1rem;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    text-align: center;
    color: #6b7280;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    position: relative;
    z-index: 10;
}
.cyber-footer .highlight { color: #10b981; letter-spacing: 0.2em; font-weight: 700; }

/* ---------- UTILITIES ---------- */
.text-emerald { color: #10b981; }
.text-cyan { color: #22d3ee; }
.text-fuchsia { color: #d946ef; }
.text-amber { color: #f59e0b; }
.text-red { color: #ef4444; }
.text-gray { color: #9ca3af; }
.text-white { color: #fff; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.w-full { width: 100%; }

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #030306; }
::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.4);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(16, 185, 129, 0.7); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
    .cyber-nav { padding: 0.5rem 1rem; }
    .cyber-nav-inner { gap: 0.5rem; }
    .cyber-nav-links a { padding: 0.4rem 0.6rem; font-size: 0.65rem; }
    .cyber-card { padding: 1.25rem; }
    .container { padding: 1rem; }
    .btn { padding: 0.6rem 1.2rem; font-size: 0.8rem; }
    .cyber-table { font-size: 0.75rem; }
    .cyber-table th, .cyber-table td { padding: 0.6rem 0.5rem; }
}
