:root {
    --bg-dark: #0a0a0f;
    --bg-card: rgba(20, 20, 30, 0.6);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --neon-blue: #00f0ff;
    --neon-blue-glow: rgba(0, 240, 255, 0.5);
    --accent-purple: #8b5cf6;
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(10, 10, 15, 0.7);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image: linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography & Colors */
.neon-text {
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue-glow), 0 0 20px var(--neon-blue-glow);
}

/* Header */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.nav-links a {
    margin-left: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--neon-blue);
}

/* Hero */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    padding: 20px;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.15) 0%, rgba(10, 10, 15, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

/* Layout Elements */
.section-title {
    margin-bottom: 40px;
    display: inline-block;
}

.section-title h2 {
    font-size: 2rem;
}

.neon-line {
    height: 3px;
    width: 60px;
    background: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue-glow);
    margin-top: 10px;
    border-radius: 2px;
}

/* Post Grid & Cards */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
}

.post-image-container {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-image-placeholder {
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.blue-gradient {
    background: linear-gradient(135deg, #0f172a, #00f0ff);
}

.purple-gradient {
    background: linear-gradient(135deg, #1e1b4b, #8b5cf6);
}

.post-card:hover .card-image-placeholder {
    transform: scale(1.05);
}

.post-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--neon-blue);
    border: 1px solid var(--glass-border);
}

.post-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.post-card:hover .post-content h3 {
    color: var(--neon-blue);
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 25px;
    flex-grow: 1;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 15px;
}

.post-date {
    color: var(--text-secondary);
}

.read-more {
    font-weight: 600;
    color: var(--neon-blue);
    display: flex;
    align-items: center;
}

.arrow {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.post-card:hover .arrow {
    transform: translateX(5px);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px dashed var(--glass-border);
    color: var(--text-secondary);
}

/* Iluminación de fondo para toda la web */
.ambient-glow {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(0, 240, 255, 0.07) 0%, transparent 50%), radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.07) 0%, transparent 50%);
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
    transition: background 0.2s ease-out;
}

/* Related Articles */
.related-articles {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--glass-border);
}

.related-articles h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
}

/* Article & Pages Detail */
.article-header {
    padding-top: 130px;
    padding-bottom: 20px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.article-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.article-meta {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 30px;
}

.article-content {
    max-width: 800px;
    margin: 0 auto 80px auto;
    font-size: 1.1rem;
    color: #cbd5e1;
}

.article-content h2 {
    font-size: 2rem;
    margin: 40px 0 20px 0;
    color: var(--neon-blue);
}

.article-content h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px 0;
    color: #fff;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content a:not(.neon-text) {
    color: var(--neon-blue);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(0, 240, 255, 0.4);
    transition: all 0.3s ease;
}

.article-content a:not(.neon-text):hover {
    text-shadow: 0 0 10px var(--neon-blue-glow);
    text-decoration-color: var(--neon-blue);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: -100px;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    padding: 20px;
    z-index: 9999;
    transition: bottom 0.5s ease;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.5);
    display: none;
}

.cookie-banner.show {
    bottom: 0;
    display: block;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.btn-primary {
    background: var(--neon-blue);
    color: #000;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    box-shadow: 0 0 15px var(--neon-blue-glow);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: #050508;
    border-top: 1px solid var(--glass-border);
    padding: 60px 0 20px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand h2 {
    font-size: 1.5rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--text-secondary);
    margin-left: 20px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--neon-blue);
}

.footer-bottom {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-play-state: paused;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: fadeInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-play-state: paused;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: fadeInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-play-state: paused;
}

.zoom-in {
    opacity: 0;
    transform: scale(0.9);
    animation: zoomIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-play-state: paused;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

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

@keyframes fadeInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.5);
}

/* Reading Progress Bar */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue-glow);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--neon-blue);
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--neon-blue-glow);
    border-color: var(--neon-blue);
}

/* Hero CTA Button */
.hero-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 40px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--neon-blue);
    border-radius: 30px;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.hero-btn:hover {
    box-shadow: 0 0 20px var(--neon-blue-glow);
    background: rgba(0, 240, 255, 0.2);
}

.hero-btn:hover::before {
    left: 100%;
}

/* Blockquote */
blockquote {
    margin: 40px 0;
    padding: 25px 30px;
    border-left: 4px solid var(--neon-blue);
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.05), transparent);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    font-size: 1.25rem;
    color: #fff;
    position: relative;
}

blockquote::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 4rem;
    color: rgba(0, 240, 255, 0.1);
    font-family: serif;
    line-height: 1;
}

/* Filter & Search Controls */
.filter-controls {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.search-bar {
    position: relative;
    max-width: 600px;
    width: 100%;
}

.search-bar svg {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-bar input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 15px 20px 15px 50px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.search-bar input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px var(--neon-blue-glow);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.filter-btn.active {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--neon-blue);
    color: #fff;
    box-shadow: 0 0 10px var(--neon-blue-glow);
}

/* Table of Contents */
.toc-container {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--neon-blue);
    border-radius: 8px;
    padding: 25px;
    margin: 0 0 40px 0;
}

.toc-container h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-list li {
    margin-bottom: 10px;
}

.toc-list a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.toc-list a:hover {
    color: var(--neon-blue);
    text-decoration: underline;
}

.toc-list li.toc-h3 {
    padding-left: 20px;
    font-size: 0.85rem;
}

/* Responsive Mobile Overhaul */
@media (max-width: 768px) {

    /* Header (compact) */
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        padding: 15px 20px;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav-links {
        display: flex;
        gap: 10px;
    }

    .nav-links a {
        margin: 0;
        font-size: 0.85rem;
        padding: 5px 12px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 15px;
        border: 1px solid var(--glass-border);
    }

    /* Typography & Spacing */
    .hero {
        padding-top: 100px;
        min-height: 50vh;
    }

    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

    /* Articles Details */
    .article-header {
        padding-top: 120px;
        padding-bottom: 30px;
    }

    .article-header h1 {
        font-size: 1.8rem;
    }

    .article-meta {
        font-size: 0.85rem;
        margin-bottom: 20px;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .article-content {
        font-size: 1rem;
        padding: 0 10px;
    }

    .article-content h2 {
        font-size: 1.5rem;
        margin: 30px 0 15px 0;
    }

    .article-content h3 {
        font-size: 1.3rem;
    }

    /* Cards */
    .post-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .post-image-container {
        height: 180px;
    }

    .post-content {
        padding: 15px;
    }

    .post-content h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .post-excerpt {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    /* Blockquote */
    blockquote {
        padding: 20px 15px 20px 25px;
        font-size: 1.1rem;
        margin: 30px 0;
    }

    blockquote::before {
        font-size: 3rem;
        top: 5px;
        left: 5px;
    }

    /* Buttons & Touch Targets */
    .hero-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    #back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1.2rem;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .btn-primary {
        width: 100%;
        padding: 12px;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px 0;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .footer-links a {
        margin: 0;
    }
}

/* --- Botón Copiar Enlace --- */
.copy-link-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0a0b0;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-left: 15px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.copy-link-btn:hover {
    background: rgba(0, 242, 254, 0.1);
    border-color: #00f2fe;
    color: #fff;
}

.copy-success-msg {
    color: #00f2fe;
    font-size: 0.85rem;
    margin-left: 10px;
    font-weight: 600;
    display: none;
    animation: fadeIn 0.3s ease;
}