/**
 * Biblia Latinoamericana - Reader Styles Premium
 * Experiencia de lectura mejorada
 */

.reader-page {
    background: var(--bg-secondary);
    min-height: 100vh;
}

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

/* Header del Reader */
.reader-header {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.reader-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.reader-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

/* Controles del Reader */
.reader-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.reader-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.reader-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

/* Navegación de Capítulos */
.chapter-nav {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.chapter-selector {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chapter-selector:hover {
    border-color: var(--primary);
}

.chapter-selector:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Contenedor de Versículos */
.verses-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

/* Versículo Individual */
.verse-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    position: relative;
}

.verse-item:hover {
    background: var(--bg-secondary);
}

.verse-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.verse-item:hover::before {
    background: var(--accent);
}

.verse-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.verse-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    position: relative;
}

.verse-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.verse-text {
    flex: 1;
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--text-primary);
    font-family: var(--font-serif);
    padding-top: 0.5rem;
}

.verse-references {
    margin-left: 0.5rem;
}

.verse-references sup {
    display: inline-block;
    margin: 0 0.25rem;
    padding: 0.125rem 0.4rem;
    background: var(--accent);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: help;
    transition: all var(--transition-fast);
}

.verse-references sup:hover {
    background: var(--accent-dark);
    transform: scale(1.1);
}

/* Acciones del Versículo */
.verse-actions {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.verse-item:hover .verse-actions {
    opacity: 1;
}

.verse-action {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.verse-action:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.1);
}

.verse-action svg {
    width: 18px;
    height: 18px;
}

/* Referencias y Notas */
.references-notes-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--border-color);
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
}

.section-header .icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
}

/* Referencias Cruzadas */
.reference-item {
    background: linear-gradient(to right, rgba(231, 76, 60, 0.05), transparent);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all var(--transition-fast);
}

.reference-item:hover {
    background: linear-gradient(to right, rgba(231, 76, 60, 0.1), transparent);
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.reference-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    margin-right: 1rem;
    box-shadow: var(--shadow-sm);
}

.reference-verse-range {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.reference-targets {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Notas */
.note-item {
    background: linear-gradient(to right, rgba(102, 126, 234, 0.05), transparent);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all var(--transition-fast);
}

.note-item:hover {
    background: linear-gradient(to right, rgba(102, 126, 234, 0.1), transparent);
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.note-verse-range {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.note-text {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.8;
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .reader-container {
        padding: 1rem;
    }
    
    .reader-header {
        padding: 1.5rem;
    }
    
    .reader-title {
        font-size: 1.75rem;
    }
    
    .verses-container {
        padding: 1.5rem;
    }
    
    .verse-text {
        font-size: 1rem;
    }
    
    .chapter-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .verse-actions {
        opacity: 1;
        position: static;
        margin-top: 1rem;
    }
    
    .verse-content {
        flex-direction: column;
    }
    
    .references-notes-section {
        padding: 1.5rem;
    }
}
