/* ===== Bitácora CSS - Rediseño Completo Coherente con el Sitio Principal ===== */

/* ==== Variables CSS ==== */
:root {
    /* Colores principales coherentes con el sitio */
    --primary-color: #343434;
    --secondary-color: #f5f5f5;
    --accent-color: #ffffff;
    --text-color: #161616;
    --text-light: #666666;
    --border-radius: 20px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* Estados de ánimo */
    --mood-inspirado: #6a60a9;
    --mood-reflexivo: #3a7ca5;
    --mood-entusiasmado: #f6ae2d;
    --mood-desafiado: #f26419;
    --mood-agradecido: #43aa8b;
    --mood-neutral: #7c7c7c;
    
    /* Variables para tarjetas y elementos */
    --card-bg: #ffffff;
    --card-text: #161616;
    --input-bg: rgba(0, 0, 0, 0.05);
    --input-border: rgba(0, 0, 0, 0.1);
    --hover-bg: rgba(0, 0, 0, 0.05);
    --modal-bg: rgba(0, 0, 0, 0.9);
}

/* Variables para modo oscuro */
[data-theme="dark"] {
    --primary-color: #1e1e1e;
    --secondary-color: #2c2c2c;
    --accent-color: #121212;
    --text-color: #e0e0e0;
    --text-light: #a0a0a0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    
    /* Variables específicas para tarjetas y elementos en modo oscuro */
    --card-bg: #2c2c2c;
    --card-text: #e0e0e0;
    --input-bg: rgba(255, 255, 255, 0.08);
    --input-border: rgba(255, 255, 255, 0.15);
    --hover-bg: rgba(255, 255, 255, 0.1);
    --modal-bg: rgba(0, 0, 0, 0.95);
}

/* ==== Estructura Principal ==== */
.bitacora-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Comfortaa', sans-serif;
    color: var(--text-color);
    background-color: var(--accent-color);
    transition: var(--transition-normal);
}

/* ==== Sección Hero ==== */
.bitacora-hero {
    margin-bottom: 80px;
    padding: 60px 0;
    text-align: center;
}

.bitacora-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.bitacora-hero h1 {
    font-family: 'Bebas Neue', cursive;
    font-size: 90px;
    letter-spacing: 6px;
    margin-bottom: 30px;
    color: var(--primary-color);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

.bitacora-intro {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 50px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 0.3s;
}

/* ==== Estadísticas de Autenticidad ==== */
.authenticity-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 0.6s;
    flex-wrap: wrap;
}

.stat-item {
    background-color: var(--primary-color);
    border-radius: 12px;
    padding: 15px 20px;
    text-align: center;
    color: var(--accent-color);
    box-shadow: var(--shadow);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    min-width: 100px;
    flex: 0 0 auto;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stat-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-family: 'Bebas Neue', cursive;
    font-size: 24px;
    line-height: 1;
    margin-bottom: 3px;
}

.stat-label {
    font-size: 11px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==== Filtered Tag Display ==== */
.filtered-tag {
    background-color: var(--primary-color);
    color: var(--accent-color);
    border-radius: 50px;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 16px;
    box-shadow: var(--shadow);
}

.clear-filter {
    color: var(--accent-color);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.clear-filter:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* ==== Sección de Autenticidad ==== */
.authenticity-section {
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 60px 40px;
    margin-bottom: 80px;
    text-align: center;
}

.authenticity-content h2 {
    font-family: 'Bebas Neue', cursive;
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.authenticity-content p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.authenticity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.auth-card {
    background-color: var(--card-bg);
    color: var(--card-text);
    border-radius: 15px;
    padding: 30px 20px;
    box-shadow: var(--shadow);
    transition: var(--transition-normal);
    opacity: 0;
    transform: translateY(20px);
}

.auth-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.auth-card:nth-child(1).animate-in { animation-delay: 0.1s; }
.auth-card:nth-child(2).animate-in { animation-delay: 0.2s; }
.auth-card:nth-child(3).animate-in { animation-delay: 0.3s; }
.auth-card:nth-child(4).animate-in { animation-delay: 0.4s; }

.auth-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.auth-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), #5a5a5a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 24px;
}

.auth-card h3 {
    font-family: 'Comfortaa', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--card-text);
}

.auth-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* ==== Sección de Tags ==== */
.tags-section {
    margin-bottom: 60px;
}

.tags-section h3 {
    font-family: 'Comfortaa', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag-pill {
    background-color: var(--primary-color);
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.tag-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

.tag-pill:hover::before {
    left: 100%;
}

.tag-pill:hover {
    background-color: var(--card-bg);
    color: var(--card-text);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.tag-pill.small {
    padding: 6px 12px;
    font-size: 12px;
}

.tag-count {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* ==== Grid de Entradas ==== */
.entries-section {
    margin-bottom: 80px;
}

.entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* ==== Tarjetas de Entrada ==== */
.entry-card {
    background-color: var(--card-bg);
    color: var(--card-text);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition-slow);
    opacity: 0;
    transform: translateY(30px);
    position: relative;
}

.entry-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.entry-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.entry-card.expanded {
    grid-column: 1 / -1;
    max-width: none;
}

/* Card Header */
.card-header {
    position: relative;
}

.entry-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.entry-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.entry-card:hover .entry-image img {
    transform: scale(1.05);
}

.entry-meta {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.entry-meta time {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.entry-indicators {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.indicator {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(10px);
}

.media-indicator {
    background-color: rgba(0, 123, 255, 0.9);
}

.handwritten-indicator {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
}

.time-indicator {
    background-color: rgba(40, 167, 69, 0.9);
}

/* Card Content */
.card-content {
    padding: 25px;
}

.entry-title {
    font-family: 'Comfortaa', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--card-text);
    margin-bottom: 15px;
    line-height: 1.3;
}

.entry-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.entry-mood {
    margin-bottom: 15px;
}

.mood-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: white;
}

.mood-inspirado { background: linear-gradient(135deg, var(--mood-inspirado), #8b7bc7); }
.mood-reflexivo { background: linear-gradient(135deg, var(--mood-reflexivo), #5b9bc3); }
.mood-entusiasmado { background: linear-gradient(135deg, var(--mood-entusiasmado), #f8c965); }
.mood-desafiado { background: linear-gradient(135deg, var(--mood-desafiado), #f58547); }
.mood-agradecido { background: linear-gradient(135deg, var(--mood-agradecido), #68c2a9); }
.mood-neutral { background: linear-gradient(135deg, var(--mood-neutral), #9a9a9a); }

/* Card Actions */
.card-actions {
    padding: 0 25px 25px;
}

.btn-expand {
    background-color: var(--primary-color);
    color: var(--accent-color);
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-family: 'Comfortaa', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.btn-expand:hover {
    background-color: var(--hover-bg);
    color: var(--card-text);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-expand i {
    transition: var(--transition-normal);
}

.btn-expand:hover i {
    transform: translateX(3px);
}

/* ==== Contenido Expandido ==== */
.expanded-content {
    display: none;
    margin-top: 20px;
    padding: 30px;
    border-top: 1px solid var(--input-border);
    position: relative;
    animation: fadeIn 0.5s ease;
    background-color: var(--card-bg);
    color: var(--card-text);
}

.btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition-normal);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-close:hover {
    background-color: var(--hover-bg);
    color: var(--card-text);
    transform: scale(1.1);
}

.expanded-header {
    margin-bottom: 25px;
    padding-right: 50px;
}

.expanded-header h2 {
    font-family: 'Comfortaa', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--card-text);
    margin-bottom: 10px;
}

.expanded-header time {
    color: var(--text-light);
    font-size: 14px;
}

.full-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--card-text);
    margin-bottom: 30px;
}

/* ==== Secciones dentro del contenido expandido ==== */
.writing-stats,
.inspirations-section-inline,
.media-section {
    margin-bottom: 30px;
    padding: 25px;
    background-color: var(--secondary-color);
    border-radius: 15px;
}

.writing-stats h3,
.inspirations-section-inline h3,
.media-section h3 {
    font-family: 'Comfortaa', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--card-text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.authenticity-badge {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.stats-grid-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
}

.stat-mini {
    text-align: center;
    padding: 15px 10px;
    background-color: var(--card-bg);
    color: var(--card-text);
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1px solid var(--input-border);
}

.stat-mini i {
    font-size: 20px;
    color: var(--card-text);
    margin-bottom: 8px;
    display: block;
}

.stat-mini span {
    font-family: 'Bebas Neue', cursive;
    font-size: 24px;
    color: var(--card-text);
    display: block;
    line-height: 1;
}

.stat-mini small {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==== Inspiraciones ==== */
.inspirations-grid-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.inspiration-item {
    background-color: var(--card-bg);
    color: var(--card-text);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-normal);
    border: 1px solid var(--input-border);
}

.inspiration-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.inspiration-link,
.inspiration-note,
.inspiration-quote {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

.inspiration-item i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.inspiration-link i {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.inspiration-note i {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.inspiration-quote i {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
}

.inspiration-item strong {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--card-text);
}

.inspiration-item p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

.inspiration-quote blockquote {
    font-style: italic;
    margin: 0;
    color: var(--card-text);
}

.inspiration-quote cite {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-light);
    font-style: normal;
}

.inspiration-quote cite::before {
    content: "— ";
}

/* ==== Media Gallery ==== */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.media-item {
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    transition: var(--transition-normal);
    border: 1px solid var(--input-border);
}

.media-item:hover {
    transform: scale(1.02);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.media-item audio {
    width: 100%;
    padding: 10px;
}

.pdf-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    text-decoration: none;
    color: var(--card-text);
}

.pdf-preview i {
    font-size: 36px;
    color: #e74c3c;
    margin-bottom: 10px;
}

.media-description {
    padding: 10px;
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
}

/* ==== Tags de entrada ==== */
.entry-tags {
    margin-top: 20px;
}

.entry-tags h4 {
    font-size: 16px;
    color: var(--card-text);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ==== No entries ==== */
.no-entries {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    margin: 40px 0;
}

.no-entries-content i {
    font-size: 64px;
    color: var(--text-light);
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-entries-content h3 {
    font-family: 'Bebas Neue', cursive;
    font-size: 36px;
    color: var(--card-text);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.no-entries-content p {
    color: var(--text-light);
    font-size: 16px;
}

/* ==== Lightbox ==== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

#lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 25px;
    border-radius: 25px;
    max-width: 80%;
    backdrop-filter: blur(10px);
}

/* ==== Error Messages ==== */
.error-message {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
    padding: 20px 25px;
    border-radius: 10px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

/* Modo oscuro para mensajes de error */
[data-theme="dark"] .error-message {
    background-color: rgba(255, 235, 238, 0.1);
    color: #ff6b6b;
    border-left-color: #ff6b6b;
}

/* ==== Animaciones ==== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==== Responsive Design ==== */
@media (max-width: 768px) {
    .bitacora-main {
        padding: 15px;
    }
    
    .bitacora-hero {
        margin-bottom: 60px;
        padding: 40px 0;
    }
    
    .bitacora-hero h1 {
        font-size: 48px;
        letter-spacing: 3px;
    }
    
    .bitacora-intro {
        font-size: 16px;
    }
    
    .authenticity-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-item {
        padding: 20px 15px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .authenticity-section {
        padding: 40px 20px;
        margin-bottom: 60px;
    }
    
    .authenticity-content h2 {
        font-size: 36px;
    }
    
    .authenticity-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .entries-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .entry-card.expanded {
        margin: 20px -15px;
        border-radius: 0;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .entry-title {
        font-size: 20px;
    }
    
    .expanded-content {
        padding: 20px;
    }
    
    .expanded-header h2 {
        font-size: 24px;
    }
    
    .writing-stats,
    .inspirations-section-inline,
    .media-section {
        padding: 20px;
    }
    
    .stats-grid-inline {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .inspirations-grid-inline {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .media-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .tags-container {
        justify-content: center;
    }
    
    .lightbox-close {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    #lightbox-caption {
        bottom: 20px;
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .bitacora-hero h1 {
        font-size: 36px;
        letter-spacing: 2px;
    }
    
    .authenticity-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stats-grid-inline {
        grid-template-columns: 1fr;
    }
    
    .entry-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .entry-indicators {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* Transiciones suaves para cambios de tema */
.bitacora-main,
.entry-card,
.auth-card,
.stat-mini,
.inspiration-item,
.media-item,
.tag-pill,
.btn-expand,
.expanded-content,
.writing-stats,
.inspirations-section-inline,
.media-section,
.authenticity-section,
.no-entries,
.lightbox-overlay {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ===== CORRECCIONES ESPECÍFICAS PARA TEXTOS E ICONOS EN MODO OSCURO ===== */

/* Títulos principales */
[data-theme="dark"] .bitacora-hero h1 {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .bitacora-intro {
    color: #ffffff !important;
}

/* Títulos de secciones */
[data-theme="dark"] .authenticity-content h2,
[data-theme="dark"] .tags-section h3,
[data-theme="dark"] .writing-stats h3,
[data-theme="dark"] .inspirations-section-inline h3,
[data-theme="dark"] .media-section h3 {
    color: #e0e0e0 !important;
}

/* Texto de párrafos */
[data-theme="dark"] .authenticity-content p {
    color: #a0a0a0 !important;
}

/* Tarjetas de entrada - textos */
[data-theme="dark"] .entry-title {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .entry-excerpt {
    color: #a0a0a0 !important;
}

[data-theme="dark"] .full-content {
    color: #e0e0e0 !important;
}

/* Headers expandidos */
[data-theme="dark"] .expanded-header h2 {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .expanded-header time {
    color: #a0a0a0 !important;
}

/* Tarjetas de autenticidad - textos */
[data-theme="dark"] .auth-card h3,
[data-theme="dark"] .auth-card p {
    color: #e0e0e0 !important;
}

/* Texto de inspiraciones */
[data-theme="dark"] .inspiration-item strong {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .inspiration-item p {
    color: #a0a0a0 !important;
}

[data-theme="dark"] .inspiration-quote blockquote {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .inspiration-quote cite {
    color: #a0a0a0 !important;
}

/* Media descriptions */
[data-theme="dark"] .media-description {
    color: #a0a0a0 !important;
}

/* PDF preview */
[data-theme="dark"] .pdf-preview {
    color: #e0e0e0 !important;
}

/* Tags de entrada */
[data-theme="dark"] .entry-tags h4 {
    color: #e0e0e0 !important;
}

/* No entries content */
[data-theme="dark"] .no-entries-content h3 {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .no-entries-content p {
    color: #ffffff !important;
}

[data-theme="dark"] .no-entries-content i {
    color: #a0a0a0 !important;
}

/* ==== ICONOS ESPECÍFICOS ==== */

/* Iconos de autenticidad */
[data-theme="dark"] .auth-icon {
    color: #ffffff !important;
}

/* Iconos de estadísticas */
[data-theme="dark"] .stat-icon {
    color: #ffffff !important;
}

/* Iconos de secciones */
[data-theme="dark"] .tags-section h3 i,
[data-theme="dark"] .writing-stats h3 i,
[data-theme="dark"] .inspirations-section-inline h3 i,
[data-theme="dark"] .media-section h3 i,
[data-theme="dark"] .entry-tags h4 i {
    color: #e0e0e0 !important;
}

/* Botón de cerrar */
[data-theme="dark"] .btn-close {
    color: #a0a0a0 !important;
}

[data-theme="dark"] .btn-close:hover {
    color: #e0e0e0 !important;
}

/* ==== ELEMENTOS ESPECÍFICOS DE ESTADÍSTICAS ==== */

/* Texto en estadísticas mini */
[data-theme="dark"] .stat-mini span {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .stat-mini small {
    color: #a0a0a0 !important;
}

/* Iconos de estadísticas mini - forzar colores específicos */
[data-theme="dark"] .stat-mini i {
    color: #e0e0e0 !important;
    -webkit-text-fill-color: #e0e0e0 !important;
}

/* Colores específicos para cada stat-mini en modo oscuro */
[data-theme="dark"] .stat-mini:nth-child(1) i { 
    color: #28a745 !important; 
    -webkit-text-fill-color: #28a745 !important; 
}

[data-theme="dark"] .stat-mini:nth-child(2) i { 
    color: #17a2b8 !important; 
    -webkit-text-fill-color: #17a2b8 !important; 
}

[data-theme="dark"] .stat-mini:nth-child(3) i { 
    color: #6f42c1 !important; 
    -webkit-text-fill-color: #6f42c1 !important; 
}

[data-theme="dark"] .stat-mini:nth-child(4) i { 
    color: #ffc107 !important; 
    -webkit-text-fill-color: #ffc107 !important; 
}

/* ==== ELEMENTOS CON BACKGROUNDS OSCUROS ==== */

/* Asegurar que backgrounds oscuros tengan texto blanco */
[data-theme="dark"] .authenticity-section {
    background-color: #2c2c2c !important;
}

[data-theme="dark"] .writing-stats,
[data-theme="dark"] .inspirations-section-inline,
[data-theme="dark"] .media-section {
    background-color: #2c2c2c !important;
}

/* ==== CORRECCIONES PARA ELEMENTOS INTERACTIVOS ==== */

/* Tags hover */
[data-theme="dark"] .tag-pill {
    color: #ffffff !important;
}

[data-theme="dark"] .tag-pill:hover {
    background-color: #2c2c2c !important;
    color: #e0e0e0 !important;
}

/* Botones de expansión */
[data-theme="dark"] .btn-expand {
    color: #ffffff !important;
}

[data-theme="dark"] .btn-expand:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #e0e0e0 !important;
}

/* ==== LIGHTBOX EN MODO OSCURO ==== */
[data-theme="dark"] #lightbox-caption {
    color: #ffffff !important;
}

/* ==== FILTRO DE TAGS ==== */
[data-theme="dark"] .filtered-tag {
    color: #ffffff !important;
}

[data-theme="dark"] .clear-filter {
    color: #ffffff !important;
}

/* ==== ASEGURAR QUE LOS ICONOS SVG CAMBIEN DE COLOR ==== */
[data-theme="dark"] svg {
    fill: currentColor;
    stroke: currentColor;
}

/* Iconos de Font Awesome */
[data-theme="dark"] .fa,
[data-theme="dark"] .fas,
[data-theme="dark"] .far,
[data-theme="dark"] .fab {
    color: inherit !important;
}

/* ==== CORRECCIONES ADICIONALES PARA CASOS ESPECÍFICOS ==== */

/* Asegurar que todos los h1, h2, h3, h4, h5, h6 cambien en bitácora */
[data-theme="dark"] .bitacora-main h1,
[data-theme="dark"] .bitacora-main h2,
[data-theme="dark"] .bitacora-main h3,
[data-theme="dark"] .bitacora-main h4,
[data-theme="dark"] .bitacora-main h5,
[data-theme="dark"] .bitacora-main h6 {
    color: #e0e0e0 !important;
}

/* Asegurar que todos los párrafos cambien en bitácora */
[data-theme="dark"] .bitacora-main p {
    color: #a0a0a0 !important;
}

/* Texto en elementos con clase específica */
[data-theme="dark"] .bitacora-main .text-light {
    color: #a0a0a0 !important;
}

/* Elementos strong y em */
[data-theme="dark"] .bitacora-main strong {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .bitacora-main em {
    color: #e0e0e0 !important;
}

/* ==== OVERRIDE PARA CUALQUIER COLOR HARDCODEADO ==== */
[data-theme="dark"] .bitacora-main * {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Excluir elementos que ya tienen colores específicos correctos */
[data-theme="dark"] .bitacora-main .mood-badge,
[data-theme="dark"] .bitacora-main .indicator,
[data-theme="dark"] .bitacora-main .authenticity-badge,
[data-theme="dark"] .bitacora-main img,
[data-theme="dark"] .bitacora-main video,
[data-theme="dark"] .bitacora-main audio {
    border-color: initial !important;
}

/* ==== FORZAR COLORES EN CASOS EXTREMOS ==== */
[data-theme="dark"] .bitacora-main [style*="color"] {
    color: #e0e0e0 !important;
}

/* Excepciones para elementos que deben mantener su color original */
[data-theme="dark"] .bitacora-main .mood-badge[style*="color"],
[data-theme="dark"] .bitacora-main .indicator[style*="color"] {
    color: initial !important;
}

/* ===== CORRECCIONES ULTRA-ESPECÍFICAS PARA TEXTOS PROBLEMÁTICOS ===== */

/* ==== ESTADÍSTICAS DE AUTENTICIDAD (0 Entradas, 0h Tiempo Total, etc.) ==== */

/* Números de las estadísticas */
[data-theme="dark"] .authenticity-stats .stat-number,
[data-theme="dark"] .stat-item .stat-number {
    color: #ffffff !important;
}

/* Labels de las estadísticas */
[data-theme="dark"] .authenticity-stats .stat-label,
[data-theme="dark"] .stat-item .stat-label {
    color: #e0e0e0 !important;
}

/* Todo el contenido dentro de stat-item */
[data-theme="dark"] .stat-item * {
    color: #ffffff !important;
}

/* Información específica dentro de stat-info */
[data-theme="dark"] .stat-info .stat-number {
    color: #ffffff !important;
}

[data-theme="dark"] .stat-info .stat-label {
    color: #e0e0e0 !important;
}

/* ==== TEXTO DE INTRODUCCIÓN DE LA BITÁCORA ==== */

/* Párrafo dentro del hero content */
[data-theme="dark"] .bitacora-hero-content p {
    color: #ffffff !important;
}

/* ==== TEXTO "LA BITÁCORA ESTÁ ESPERANDO..." ==== */

/* Todo el texto dentro de no-entries-content */
[data-theme="dark"] .no-entries-content * {
    color: #ffffff !important;
}

/* ==== CORRECCIONES ADICIONALES PARA ASEGURAR VISIBILIDAD ==== */

/* Todos los spans dentro del hero */
[data-theme="dark"] .bitacora-hero span {
    color: #ffffff !important;
}

/* Todos los divs con texto en authenticity stats */
[data-theme="dark"] .authenticity-stats div {
    color: #ffffff !important;
}

/* Asegurar que todos los elementos de texto en stat-item sean blancos */
[data-theme="dark"] .stat-item span,
[data-theme="dark"] .stat-item div,
[data-theme="dark"] .stat-item p {
    color: #ffffff !important;
}

/* ==== CORRECCIONES PARA ELEMENTOS PADRE ==== */

/* Asegurar que el contenedor de stats tenga el color correcto */
[data-theme="dark"] .authenticity-stats {
    color: #ffffff !important;
}

/* Asegurar que el hero content tenga el color correcto */
[data-theme="dark"] .bitacora-hero-content {
    color: #ffffff !important;
}

/* Asegurar que no-entries tenga el color correcto */
[data-theme="dark"] .no-entries {
    color: #ffffff !important;
}

/* ==== OVERRIDE ULTRA-ESPECÍFICO ==== */

/* Para el caso de que haya estilos inline o muy específicos */
[data-theme="dark"] .bitacora-main .authenticity-stats * {
    color: #ffffff !important;
}

[data-theme="dark"] .bitacora-main .bitacora-intro {
    color: #ffffff !important;
}

[data-theme="dark"] .bitacora-main .no-entries-content * {
    color: #ffffff !important;
}

/* ==== REGLAS ESPECÍFICAS POR SELECTORES EXACTOS ==== */

/* Si los elementos tienen clases específicas que no hemos cubierto */
[data-theme="dark"] .stat-number {
    color: #ffffff !important;
}

[data-theme="dark"] .stat-label {
    color: #e0e0e0 !important;
}

/* Para párrafos dentro de hero */
[data-theme="dark"] .bitacora-hero p {
    color: #ffffff !important;
}

/* Para párrafos dentro de no-entries */
[data-theme="dark"] .no-entries p {
    color: #ffffff !important;
}

/* ==== CORRECCIÓN PARA CUALQUIER TEXTO HEREDADO ==== */

/* Forzar color blanco en todos los elementos de texto problemáticos */
[data-theme="dark"] .bitacora-main .authenticity-stats,
[data-theme="dark"] .bitacora-main .authenticity-stats *,
[data-theme="dark"] .bitacora-main .bitacora-intro,
[data-theme="dark"] .bitacora-main .no-entries-content,
[data-theme="dark"] .bitacora-main .no-entries-content * {
    color: #ffffff !important;
}

/* ==== REGLAS DE HERENCIA ESPECÍFICAS ==== */

/* Asegurar que no hay herencia de color de elementos padre */
[data-theme="dark"] .stat-item {
    color: #ffffff !important;
}

[data-theme="dark"] .stat-item > * {
    color: inherit !important;
}

[data-theme="dark"] .bitacora-hero-content {
    color: #ffffff !important;
}

[data-theme="dark"] .bitacora-hero-content > * {
    color: inherit !important;
}

/* ==== ÚLTIMA CORRECCIÓN EXTREMA ==== */

/* Si nada de lo anterior funciona, forzar con especificidad máxima */
[data-theme="dark"] body .bitacora-main .authenticity-stats .stat-item .stat-info .stat-number {
    color: #ffffff !important;
}

[data-theme="dark"] body .bitacora-main .authenticity-stats .stat-item .stat-info .stat-label {
    color: #e0e0e0 !important;
}

[data-theme="dark"] body .bitacora-main .bitacora-hero .bitacora-hero-content .bitacora-intro {
    color: #ffffff !important;
}

[data-theme="dark"] body .bitacora-main .no-entries .no-entries-content p {
    color: #ffffff !important;
}