/* ===== VARIABLES Y RESET ===== */
:root {
    --primary: #00d4ff;
    --primary-dark: #0099cc;
    --secondary: #ff006e;
    --accent: #8338ec;
    --bg-dark: #0a0a0a;
    --bg-darker: #000000;
    --bg-card: #111111;
    --bg-card-hover: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border-color: #222222;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 212, 255, 0.2);
    --gradient: linear-gradient(135deg, var(--primary), var(--accent));
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

/* Modo Claro */
[data-theme="light"] {
    --primary: #0099cc;
    --primary-dark: #007399;
    --secondary: #d63384;
    --accent: #6610f2;
    --bg-dark: #f8f9fa;
    --bg-darker: #e9ecef;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 153, 204, 0.15);
}

[data-theme="light"] body::before {
    background: radial-gradient(circle at 20% 30%, rgba(0, 153, 204, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(102, 16, 242, 0.03) 0%, transparent 50%);
}

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

html {
    scroll-behavior: smooth;
}

/* ===== ACCESIBILIDAD ===== */
/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--bg-dark);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.3s;
    box-shadow: var(--shadow-lg);
}

.skip-to-content:focus {
    top: 20px;
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* Mejora de Focus Visible */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

html:not([data-theme="light"]) {
    /* Tema oscuro por defecto */
    --bg-dark: #0a0e27;
    --bg-darker: #060914;
    --bg-card: #0f1729;
    --bg-card-hover: #1a2332;
}

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(131, 56, 236, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ===== ANIMATED BACKGROUND ===== */
.stars, .twinkling {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: -1;
}

.stars {
    transition: opacity 0.3s;
}

[data-theme="light"] .stars {
    opacity: 0.1;
}

[data-theme="light"] .twinkling {
    opacity: 0.2;
    background: #000 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"><circle cx="50" cy="50" r="1" fill="white" opacity="0.8"/><circle cx="150" cy="120" r="1" fill="white" opacity="0.6"/><circle cx="280" cy="80" r="1.5" fill="white" opacity="0.9"/><circle cx="350" cy="200" r="1" fill="white" opacity="0.7"/><circle cx="100" cy="280" r="1" fill="white" opacity="0.8"/><circle cx="220" cy="340" r="1.5" fill="white" opacity="0.6"/></svg>') repeat;
}

.twinkling {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="600" height="600"><circle cx="100" cy="100" r="2" fill="%2300d4ff" opacity="0.3"/><circle cx="350" cy="250" r="1.5" fill="%238338ec" opacity="0.4"/><circle cx="500" cy="400" r="2" fill="%23ff006e" opacity="0.3"/></svg>') repeat;
    animation: move-twink-back 200s linear infinite;
}

@keyframes move-twink-back {
    from { background-position: 0 0; }
    to { background-position: -10000px 5000px; }
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--border-color);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.logo-icon {
    flex-shrink: 0;
    stroke: var(--primary);
}

.logo-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--text-primary);
}

.nav-link .icon {
    flex-shrink: 0;
}


/* Toggle de tema */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.theme-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: var(--primary);
    border-radius: 50%;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-slider svg {
    width: 14px;
    flex-shrink: 0;
    height: 14px;
    color: #0a0e27;
}

.theme-toggle.active .theme-toggle-slider {
    transform: translateX(30px);
}
.admin-btn {
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--primary);
    border-radius: 0.5rem;
}

.admin-btn:hover {
    background: rgba(0, 212, 255, 0.2);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    min-height: calc(100vh - 200px);
}

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

/* ===== HERO SECTION ===== */
.hero {
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== BLOG SECTION ===== */
.blog-section {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

/* ===== SEARCH BOX ===== */
.search-box {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    stroke: var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* ===== POSTS GRID ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    will-change: transform;
    contain: layout style paint;
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(131, 56, 236, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 4rem;
}

.post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.post-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.post-date {
    color: var(--text-muted);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    flex: 1;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.tag {
    padding: 0.25rem 0.5rem;
    background: rgba(131, 56, 236, 0.1);
    color: var(--accent);
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    display: block;
    stroke: var(--text-muted);
    margin: 0 auto 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* ===== BUTTONS ===== */
.btn-primary, .btn-secondary, .btn-text {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-text {
    background: transparent;
    color: var(--primary);
    padding: 0.5rem 1rem;
}

.btn-text:hover {
    background: rgba(0, 212, 255, 0.1);
}

.icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ===== ABOUT SECTION ===== */
.about-section {
    padding: 6rem 0;
    background: rgba(0, 0, 0, 0.3);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 2rem 0 3rem;
    line-height: 1.8;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.social-link:hover {
    color: var(--primary);
}

/* RSS Link Styles */
.social-link.rss-link {
    background: linear-gradient(135deg, #ff6b00, #ff9500);
    color: white !important;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.social-link.rss-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
    background: linear-gradient(135deg, #ff7b10, #ffa510);
}

.social-link.rss-link svg {
    fill: white;
}

.social-link.rss-link span {
    color: white;
    font-weight: 500;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    margin: 5% auto;
    padding: 3rem;
    max-width: 900px;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.modal-post h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.modal-post .post-meta {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-post .post-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

/* ===== ADMIN STYLES ===== */
.admin-main {
    padding-top: 2rem;
}

.admin-header {
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.admin-title {
    font-size: 2.5rem;
    font-weight: 700;
}

.admin-actions {
    display: flex;
    gap: 1rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== FORM STYLES ===== */
.post-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
}

.form-input, .form-textarea {
    padding: 0.75rem 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: var(--font-mono);
    line-height: 1.6;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* ===== SAVED POSTS LIST ===== */
.saved-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.saved-post-item {
    padding: 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.saved-post-item:hover {
    border-color: var(--primary);
}

.saved-post-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.saved-post-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    flex: 1;
}

.saved-post-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.25rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 0.25rem;
    transition: all 0.3s;
}

.btn-icon:hover {
    color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
}

.btn-icon.delete:hover {
    color: var(--secondary);
    background: rgba(255, 0, 110, 0.1);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

.saved-post-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.empty-state-small {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(200%);
    transition: transform 0.3s;
    z-index: 3000;
}

.toast.show {
    transform: translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-icon {
    width: 24px;
    height: 24px;
    stroke: var(--primary);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-posts {
        order: 2;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .nav-link {
        font-size: 0.875rem;
    }
    
    .hero {
        padding: 3rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .modal-content {
        margin: 10% 1rem;
        padding: 2rem 1rem;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .toast {
        left: 1rem;
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .post-card {
        border-radius: 0.75rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .nav-menu {
        gap: 0.5rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

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

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

/* ===== COPY BUTTON EN CÓDIGO ===== */
.copy-code-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 0.375rem;
    color: var(--primary);
    font-family: var(--font-main);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    opacity: 0;
    transform: translateY(-4px);
    line-height: 1;
}

pre:hover .copy-code-btn {
    opacity: 1;
    transform: translateY(0);
}

.copy-code-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
}

.copy-code-btn:active {
    transform: translateY(0);
}

.copy-code-btn.copied {
    background: rgba(0, 255, 100, 0.15);
    border-color: rgba(0, 255, 100, 0.4);
    color: #00ff64;
}

.copy-code-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.copy-code-btn span {
    display: inline-block;
}

/* Responsive: ocultar texto en móvil */
@media (max-width: 640px) {
    .copy-code-btn span {
        display: none;
    }
    
    .copy-code-btn {
        padding: 0.5rem;
        gap: 0;
    }
}

/* Mejorar contraste en modo claro */
[data-theme="light"] .copy-code-btn {
    background: rgba(0, 153, 204, 0.1);
    border-color: rgba(0, 153, 204, 0.3);
    color: var(--primary);
}

[data-theme="light"] .copy-code-btn:hover {
    background: rgba(0, 153, 204, 0.2);
    border-color: rgba(0, 153, 204, 0.5);
}

[data-theme="light"] .copy-code-btn.copied {
    background: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.4);
    color: #198754;
}

/* ================================================
   BOOKMARKS SYSTEM
================================================ */

/* Botón de bookmark en posts */
.bookmark-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 0.5rem;
    color: #00d4ff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bookmark-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    transform: translateY(-2px);
}

.bookmark-btn:active {
    transform: translateY(0);
}

.bookmark-btn svg {
    flex-shrink: 0;
}

/* Notificación de bookmark */
.bookmark-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(0, 212, 255, 0.95);
    color: #0a0e27;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
}

.bookmark-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Página de bookmarks */
.bookmarks-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.bookmarks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.bookmarks-actions {
    display: flex;
    gap: 1rem;
}

.bookmarks-actions button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 0.5rem;
    color: #00d4ff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bookmarks-actions button:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

.bookmarks-list {
    display: grid;
    gap: 1.5rem;
}

.bookmark-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.bookmark-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateX(4px);
}

.bookmark-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.bookmark-item-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #00d4ff;
    text-decoration: none;
    margin: 0;
}

.bookmark-item-title:hover {
    text-decoration: underline;
}

.bookmark-remove-btn {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff3b30;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bookmark-remove-btn:hover {
    background: rgba(255, 59, 48, 0.2);
    border-color: #ff3b30;
}

.bookmark-item-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.75rem;
}

.bookmark-item-excerpt {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0;
}

.bookmarks-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.bookmarks-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.bookmarks-empty-title {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.bookmarks-empty-text {
    color: rgba(255, 255, 255, 0.4);
}

/* Light theme */
[data-theme="light"] .bookmark-btn {
    background: rgba(0, 122, 255, 0.1);
    border-color: rgba(0, 122, 255, 0.3);
    color: #007aff;
}

[data-theme="light"] .bookmark-btn:hover {
    background: rgba(0, 122, 255, 0.2);
    border-color: #007aff;
}

[data-theme="light"] .bookmark-notification {
    background: rgba(0, 122, 255, 0.95);
    color: #fff;
}

[data-theme="light"] .bookmark-item {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .bookmark-item:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 122, 255, 0.3);
}

[data-theme="light"] .bookmark-item-title {
    color: #007aff;
}

[data-theme="light"] .bookmark-item-meta,
[data-theme="light"] .bookmark-item-excerpt {
    color: rgba(0, 0, 0, 0.6);
}

/* Responsive */
@media (max-width: 640px) {
    .bookmarks-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .bookmarks-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .bookmark-btn span {
        display: none;
    }
    
    .bookmark-notification {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}

/* ================================================
   READER MODE
================================================ */

/* Botón toggle */
.reader-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 0.5rem;
    color: #00d4ff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.reader-mode-toggle:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    transform: translateY(-2px);
}

.reader-mode-toggle.active {
    background: rgba(0, 212, 255, 0.3);
    border-color: #00d4ff;
}

.reader-mode-toggle svg {
    flex-shrink: 0;
}

/* Notificación */
.reader-mode-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(0, 212, 255, 0.95);
    color: #0a0e27;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
}

.reader-mode-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* ================================================
   ESTILOS READER MODE ACTIVO
================================================ */

body.reader-mode {
    /* Ocultar elementos no esenciales */
}

body.reader-mode header,
body.reader-mode nav,
body.reader-mode .breadcrumbs,
body.reader-mode .share-buttons,
body.reader-mode .related-posts,
body.reader-mode .newsletter,
body.reader-mode .comments-section,
body.reader-mode footer,
body.reader-mode .sidebar,
body.reader-mode #sidebar-toc,
body.reader-mode .tags,
body.reader-mode .category-label,
body.reader-mode .post-meta,
body.reader-mode .reading-time,
body.reader-mode .pagination {
    display: none !important;
}

/* Contenedor principal centrado */
body.reader-mode main {
    max-width: 750px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

body.reader-mode .post,
body.reader-mode .post-content {
    max-width: 100%;
}

/* Tipografía optimizada */
body.reader-mode .post-content {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #e0e0e0;
}

body.reader-mode .post-title,
body.reader-mode h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    text-align: center;
}

body.reader-mode h2 {
    font-size: 1.875rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

body.reader-mode h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

body.reader-mode p {
    margin: 1.5em 0;
    text-align: justify;
}

/* Elementos inline */
body.reader-mode a {
    color: #00d4ff;
    text-decoration: underline;
    text-decoration-color: rgba(0, 212, 255, 0.4);
    text-underline-offset: 0.2em;
}

body.reader-mode a:hover {
    text-decoration-color: #00d4ff;
}

body.reader-mode code {
    background: rgba(0, 212, 255, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

body.reader-mode pre {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 2rem 0;
}

body.reader-mode blockquote {
    font-style: italic;
    font-size: 1.125rem;
    padding-left: 1.5rem;
    border-left: 4px solid rgba(0, 212, 255, 0.5);
    color: rgba(255, 255, 255, 0.8);
    margin: 2rem 0;
}

body.reader-mode img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

/* Listas */
body.reader-mode ul,
body.reader-mode ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

body.reader-mode li {
    margin: 0.75rem 0;
}

/* Tablas */
body.reader-mode table {
    font-size: 1rem;
    margin: 2rem 0;
}

/* Mantener visible los botones del post header */
body.reader-mode .post-header {
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.reader-mode .bookmark-btn {
    display: inline-flex !important;
}

body.reader-mode .reader-mode-toggle {
    display: inline-flex !important;
}

/* Light theme */
[data-theme="light"].reader-mode .post-content {
    color: #333;
}

[data-theme="light"] .reader-mode-toggle {
    background: rgba(0, 122, 255, 0.1);
    border-color: rgba(0, 122, 255, 0.3);
    color: #007aff;
}

[data-theme="light"] .reader-mode-toggle:hover {
    background: rgba(0, 122, 255, 0.2);
    border-color: #007aff;
}

[data-theme="light"] .reader-mode-notification {
    background: rgba(0, 122, 255, 0.95);
    color: #fff;
}

[data-theme="light"].reader-mode a {
    color: #007aff;
    text-decoration-color: rgba(0, 122, 255, 0.4);
}

[data-theme="light"].reader-mode code {
    background: rgba(0, 122, 255, 0.1);
}

[data-theme="light"].reader-mode pre {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"].reader-mode blockquote {
    color: rgba(0, 0, 0, 0.7);
    border-left-color: rgba(0, 122, 255, 0.5);
}

/* Responsive */
@media (max-width: 640px) {
    .reader-mode-toggle span {
        display: none;
    }
    
    body.reader-mode main {
        padding: 2rem 1rem;
    }
    
    body.reader-mode .post-title,
    body.reader-mode h1 {
        font-size: 2rem;
    }
    
    body.reader-mode .post-content {
        font-size: 1rem;
    }
    
    .reader-mode-notification {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}
