/**
 * ╔══════════════════════════════════════════════════════════════════════════╗
 * ║  TIERLIST HISPANA - TECH ELEMENTS & CODE DECORATION                     ║
 * ║  Ultra Elegante, Fluido, Tecnológico                                     ║
 * ╚══════════════════════════════════════════════════════════════════════════╝
 */

/* ============================================================================
   🐍 PYTHON CODE DECORATION - Código flotante de fondo
   ============================================================================ */

.code-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.code-line {
    position: absolute;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    opacity: 0;
    white-space: nowrap;
    color: var(--text-muted);
    animation: codeFloat 15s linear infinite;
}

.code-line:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; opacity: 0.03; }
.code-line:nth-child(2) { top: 25%; right: 8%; animation-delay: 2s; opacity: 0.04; }
.code-line:nth-child(3) { top: 40%; left: 15%; animation-delay: 4s; opacity: 0.035; }
.code-line:nth-child(4) { top: 60%; right: 12%; animation-delay: 6s; opacity: 0.03; }
.code-line:nth-child(5) { top: 75%; left: 10%; animation-delay: 8s; opacity: 0.04; }
.code-line:nth-child(6) { top: 15%; left: 60%; animation-delay: 3s; opacity: 0.035; }
.code-line:nth-child(7) { top: 50%; right: 25%; animation-delay: 5s; opacity: 0.03; }
.code-line:nth-child(8) { bottom: 20%; left: 30%; animation-delay: 7s; opacity: 0.04; }

@keyframes codeFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.04;
    }
    90% {
        opacity: 0.04;
    }
    100% {
        transform: translateY(-30px) translateX(10px);
        opacity: 0;
    }
}

/* Syntax Highlighting */
.code-keyword { color: #c586c0; }
.code-function { color: #dcdcaa; }
.code-string { color: #ce9178; }
.code-number { color: #b5cea8; }
.code-comment { color: #6a9955; font-style: italic; }
.code-class { color: #4ec9b0; }
.code-variable { color: #9cdcfe; }
.code-operator { color: #d4d4d4; }

/* ============================================================================
   📊 TECH GRID - Cuadrícula tecnológica de fondo
   ============================================================================ */

.tech-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.02;
}

.tech-grid-lines {
    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;
    width: 100%;
    height: 100%;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* ============================================================================
   💫 FLOATING PARTICLES - Partículas tecnológicas
   ============================================================================ */

.tech-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { left: 30%; animation-delay: 2s; }
.particle:nth-child(4) { left: 40%; animation-delay: 3s; }
.particle:nth-child(5) { left: 50%; animation-delay: 4s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; }
.particle:nth-child(7) { left: 70%; animation-delay: 6s; }
.particle:nth-child(8) { left: 80%; animation-delay: 7s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1.5s; }
.particle:nth-child(10) { left: 15%; animation-delay: 2.5s; }

@keyframes particleFloat {
    0% {
        bottom: -10px;
        opacity: 0;
        transform: translateX(0);
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        bottom: 110%;
        opacity: 0;
        transform: translateX(100px);
    }
}

/* ============================================================================
   🎯 TECH BORDERS - Bordes tecnológicos animados
   ============================================================================ */

.tech-border {
    position: relative;
}

.tech-border::before,
.tech-border::after {
    content: '';
    position: absolute;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent-primary), 
        transparent);
    height: 1px;
    width: 100%;
    opacity: 0.3;
}

.tech-border::before {
    top: 0;
    left: 0;
    animation: borderScanHorizontal 3s ease-in-out infinite;
}

.tech-border::after {
    bottom: 0;
    right: 0;
    animation: borderScanHorizontal 3s ease-in-out infinite reverse;
}

@keyframes borderScanHorizontal {
    0%, 100% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        transform: translateX(100%);
        opacity: 0.3;
    }
}

/* ============================================================================
   📟 TERMINAL EFFECT - Efecto terminal en títulos
   ============================================================================ */

.terminal-text {
    position: relative;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.terminal-text::before {
    content: '>';
    color: var(--accent-primary);
    margin-right: 0.5rem;
    animation: cursorBlink 1s step-end infinite;
}

.terminal-text::after {
    content: '_';
    color: var(--accent-primary);
    margin-left: 0.25rem;
    animation: cursorBlink 1s step-end infinite;
}

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

/* ============================================================================
   🔢 BINARY RAIN - Lluvia de binarios sutil
   ============================================================================ */

.binary-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.02;
}

.binary-column {
    position: absolute;
    top: -100%;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--accent-primary);
    white-space: pre;
    animation: binaryFall 10s linear infinite;
}

.binary-column:nth-child(1) { left: 5%; animation-delay: 0s; }
.binary-column:nth-child(2) { left: 15%; animation-delay: 2s; }
.binary-column:nth-child(3) { left: 25%; animation-delay: 4s; }
.binary-column:nth-child(4) { left: 35%; animation-delay: 1s; }
.binary-column:nth-child(5) { left: 45%; animation-delay: 3s; }
.binary-column:nth-child(6) { left: 55%; animation-delay: 5s; }
.binary-column:nth-child(7) { left: 65%; animation-delay: 2.5s; }
.binary-column:nth-child(8) { left: 75%; animation-delay: 4.5s; }
.binary-column:nth-child(9) { left: 85%; animation-delay: 1.5s; }
.binary-column:nth-child(10) { left: 95%; animation-delay: 3.5s; }

@keyframes binaryFall {
    0% {
        top: -100%;
        opacity: 0;
    }
    10% {
        opacity: 0.03;
    }
    90% {
        opacity: 0.03;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* ============================================================================
   🎨 TECH CARDS - Cards con efectos tecnológicos
   ============================================================================ */

.tech-card {
    position: relative;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.02) 0%,
        rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent);
    transition: left 0.5s ease;
}

.tech-card:hover::before {
    left: 100%;
}

.tech-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Corner decorations */
.tech-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-top: 2px solid var(--accent-primary);
    border-right: 2px solid var(--accent-primary);
    opacity: 0.2;
    transition: all 0.3s ease;
}

.tech-card:hover::after {
    width: 60px;
    height: 60px;
    opacity: 0.4;
}

/* ============================================================================
   📊 DATA STREAM - Stream de datos decorativo
   ============================================================================ */

.data-stream {
    position: fixed;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    overflow: hidden;
}

.data-item {
    position: absolute;
    right: 0;
    width: 100%;
    padding: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    color: var(--text-primary);
    transform: translateX(100%);
    animation: dataStreamMove 8s linear infinite;
}

.data-item:nth-child(1) { animation-delay: 0s; top: 10%; }
.data-item:nth-child(2) { animation-delay: 2s; top: 30%; }
.data-item:nth-child(3) { animation-delay: 4s; top: 50%; }
.data-item:nth-child(4) { animation-delay: 6s; top: 70%; }

@keyframes dataStreamMove {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* ============================================================================
   🎯 SCAN LINES - Líneas de escaneo retro-futuristas
   ============================================================================ */

.scan-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.02;
}

.scan-lines::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.03) 2px,
        rgba(255, 255, 255, 0.03) 4px
    );
    animation: scanMove 8s linear infinite;
}

@keyframes scanMove {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(4px);
    }
}

/* ============================================================================
   💎 HOLOGRAPHIC EFFECT - Efecto holográfico en hover
   ============================================================================ */

.holographic {
    position: relative;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.05) 0%,
        transparent 50%,
        rgba(255, 255, 255, 0.05) 100%);
    background-size: 200% 200%;
    transition: all 0.4s ease;
}

.holographic:hover {
    background-position: 100% 100%;
}

.holographic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.holographic:hover::before {
    opacity: 1;
    animation: holoShine 2s ease-in-out infinite;
}

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

/* ============================================================================
   🔌 CONNECTION LINES - Líneas de conexión entre elementos
   ============================================================================ */

.connection-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        var(--accent-primary),
        transparent);
    opacity: 0.2;
    animation: connectionPulse 3s ease-in-out infinite;
}

@keyframes connectionPulse {
    0%, 100% {
        opacity: 0.1;
        transform: scaleX(0.8);
    }
    50% {
        opacity: 0.3;
        transform: scaleX(1);
    }
}

/* ============================================================================
   📡 RADAR EFFECT - Efecto radar en esquinas
   ============================================================================ */

.radar-corner {
    position: fixed;
    width: 100px;
    height: 100px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.1;
}

.radar-corner.top-left {
    top: 0;
    left: 0;
    border-top: 2px solid var(--accent-primary);
    border-left: 2px solid var(--accent-primary);
}

.radar-corner.top-right {
    top: 0;
    right: 0;
    border-top: 2px solid var(--accent-primary);
    border-right: 2px solid var(--accent-primary);
}

.radar-corner.bottom-left {
    bottom: 0;
    left: 0;
    border-bottom: 2px solid var(--accent-primary);
    border-left: 2px solid var(--accent-primary);
}

.radar-corner.bottom-right {
    bottom: 0;
    right: 0;
    border-bottom: 2px solid var(--accent-primary);
    border-right: 2px solid var(--accent-primary);
}

.radar-corner::before {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at center,
        var(--accent-primary) 0%,
        transparent 70%);
    opacity: 0.5;
    animation: radarPulse 2s ease-out infinite;
}

.radar-corner.top-left::before { top: 0; left: 0; }
.radar-corner.top-right::before { top: 0; right: 0; }
.radar-corner.bottom-left::before { bottom: 0; left: 0; }
.radar-corner.bottom-right::before { bottom: 0; right: 0; }

@keyframes radarPulse {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* ============================================================================
   🎪 GLITCH EFFECT - Efecto glitch sutil
   ============================================================================ */

.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text:hover::before,
.glitch-text:hover::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.glitch-text:hover::before {
    animation: glitch1 0.3s infinite;
    color: rgba(255, 0, 0, 0.3);
    z-index: -1;
}

.glitch-text:hover::after {
    animation: glitch2 0.3s infinite;
    color: rgba(0, 255, 255, 0.3);
    z-index: -2;
}

@keyframes glitch1 {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes glitch2 {
    0% { transform: translate(0); }
    20% { transform: translate(2px, -2px); }
    40% { transform: translate(2px, 2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(-2px, 2px); }
    100% { transform: translate(0); }
}

/* ============================================================================
   🌟 TECH HIGHLIGHTS - Resaltados tecnológicos
   ============================================================================ */

.tech-highlight {
    position: relative;
    padding: 0.2rem 0.6rem;
    background: rgba(var(--accent-rgb), 0.1);
    border-left: 2px solid var(--accent-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    border-radius: 2px;
}

.tech-highlight::before {
    content: '//';
    color: var(--accent-primary);
    margin-right: 0.5rem;
    opacity: 0.5;
}

/* ============================================================================
   FIN - Tech Elements Ultra Elegantes y Fluidos
   ============================================================================ */
