/* === TECH NOIR CLARO - Diseño Profesional Luminoso === */
/* Versión más clara y accesible */

:root {
    /* Paleta clara y sofisticada */
    --bg-light: #F8FAFE;           /* Fondo muy claro, casi blanco */
    --bg-card: rgba(255, 255, 255, 0.85); /* Blanco con transparencia */
    --primary-light: #EFF6FF;      /* Azul muy claro */
    --accent-blue: #2563EB;        /* Azul más corporativo (en lugar de cian) */
    --accent-soft: #3B82F6;         /* Azul medio para acentos */
    --accent-glow: rgba(37, 99, 235, 0.15);
    --text-dark: #1E293B;           /* Texto principal oscuro */
    --text-soft: #475569;           /* Texto secundario */
    --text-muted: #64748B;           /* Texto terciario */
    --border-light: rgba(37, 99, 235, 0.15);
    --code-bg: #F1F5F9;              /* Fondo para código claro */
    --code-text: #0F172A;             /* Texto para código */
    --gradient-1: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
}

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

body {
    background-color: var(--bg-light);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.03) 0%, transparent 30%),
        radial-gradient(circle at 90% 70%, rgba(59, 130, 246, 0.02) 0%, transparent 40%);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    margin: 0;
    color: var(--text-dark);
    padding: 2rem;
    line-height: 1.5;
    font-weight: 400;
    position: relative;
}

/* Tipografía refinada */
h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-dark);
}

h1 {
    font-size: 3.8rem;
    background: linear-gradient(135deg, #1E293B 0%, #2563EB 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 20px rgba(37, 99, 235, 0.2);
    margin: 0 0 0.5rem 0;
    line-height: 1.1;
}

h2 {
    font-size: 2rem;
    color: var(--text-dark);
    border-left: 4px solid var(--accent-blue);
    padding-left: 1.25rem;
    margin: 0 0 1.5rem 0;
    font-weight: 550;
    letter-spacing: -0.01em;
}

/* Estilo específico para el segundo h2 en cada sección */
section h2:first-of-type {
    margin-top: 0;
}

section h2:nth-of-type(2) {
    font-size: 1.3rem;
    border-left-color: var(--border-light);
    color: var(--text-soft);
    margin: 1rem 0 0.8rem 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

p {
    color: var(--text-soft);
    font-size: 1.1rem;
    line-height: 1.7;
    font-weight: 380;
    margin-bottom: 1rem;
}

/* Estilo para los párrafos que contienen los ejemplos de Emmet */
section > p {
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: white;
    display: inline-block;
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    border: 1px solid var(--border-light);
    color: var(--accent-blue);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

/* Botón Home - Refinado y elegante en versión clara */
.btn-home {
    position: fixed;
    top: 2rem;
    left: 2rem;
    width: 48px;
    height: 48px;
    border: 1.5px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--accent-blue);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn-home svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
}

.btn-home:hover {
    transform: scale(1.08);
    border-color: var(--accent-blue);
    background: #F0F7FF;
    box-shadow: 0 0 25px var(--accent-glow);
}

/* Contenedor Principal */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Secciones - Cada bloque de ejemplo */
section {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: 32px;
    border: 1px solid var(--border-light);
    box-shadow: 
        0 20px 40px -15px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

section:hover {
    border-color: var(--accent-blue);
    box-shadow: 
        0 25px 50px -15px rgba(37, 99, 235, 0.15),
        inset 0 1px 1px white;
    transform: translateY(-2px);
}

/* Header principal */
header {
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 32px;
    border: 1px solid var(--border-light);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.05);
}

/* Logo circular */
.logo-emmet {
    width: 130px;
    height: 130px;
    border: 3px solid white;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    object-fit: contain;
    background: white;
    padding: 1.5rem;
    box-shadow: 
        0 15px 30px -10px rgba(37, 99, 235, 0.2),
        0 0 0 1px var(--border-light);
    transition: all 0.3s ease;
}

.logo-emmet:hover {
    border-color: var(--accent-blue);
    box-shadow: 
        0 20px 40px -10px rgba(37, 99, 235, 0.3),
        0 0 0 2px var(--accent-glow);
    transform: scale(1.02);
}

/* Bloques de código - Estilo claro */
xmp {
    display: block;
    background: var(--code-bg);
    background-image: linear-gradient(rgba(37, 99, 235, 0.02) 1px, transparent 1px);
    background-size: 100% 4px;
    color: var(--code-text);
    padding: 1.75rem;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    overflow-x: auto;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    box-shadow: 
        inset 0 4px 12px rgba(0, 0, 0, 0.02),
        0 8px 20px -10px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0 0 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Estilo especial para el último xmp (el del ejercicio complejo) */
section:last-of-type xmp {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-blue) var(--code-bg);
}

section:last-of-type xmp::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

section:last-of-type xmp::-webkit-scrollbar-track {
    background: var(--code-bg);
    border-radius: 8px;
}

section:last-of-type xmp::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 8px;
    opacity: 0.5;
}

section:last-of-type xmp::-webkit-scrollbar-thumb:hover {
    background: var(--accent-soft);
}

/* Etiquetas dentro de xmp con color sutil */
xmp tag {
    color: var(--accent-blue);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    header, section {
        padding: 1.75rem;
        border-radius: 24px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    section h2:nth-of-type(2) {
        font-size: 1.2rem;
    }
    
    .btn-home {
        top: 1rem;
        left: 1rem;
        width: 42px;
        height: 42px;
    }
    
    .btn-home svg {
        width: 20px;
        height: 20px;
    }
    
    .logo-emmet {
        width: 100px;
        height: 100px;
        padding: 1rem;
    }
    
    section > p {
        font-size: 1rem;
        padding: 0.3rem 1rem;
    }
}

/* Animación de entrada suave */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section, header {
    animation: fadeInUp 0.5s ease forwards;
}

/* Delay en la animación para cada sección */
section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }
section:nth-child(6) { animation-delay: 0.6s; }
section:nth-child(7) { animation-delay: 0.7s; }
section:nth-child(8) { animation-delay: 0.8s; }
section:nth-child(9) { animation-delay: 0.9s; }
section:nth-child(10) { animation-delay: 1s; }
section:nth-child(11) { animation-delay: 1.1s; }
section:nth-child(12) { animation-delay: 1.2s; }
section:nth-child(13) { animation-delay: 1.3s; }

/* Efecto de brillo sutil en bordes */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    pointer-events: none;
}