/* css/bible-reader.css - Специальные стили для страниц чтения Библии */

/* =============== ОСНОВНЫЕ СТИЛИ ЧТЕНИЯ =============== */

.bible-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.bible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
    gap: 1rem;
}

.bible-title {
    color: var(--primary-gold);
    font-size: 2.5rem;
    margin: 0;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bible-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.bible-select {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bible-select:hover,
.bible-select:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
    outline: none;
}

.bible-select option {
    background: var(--dark-blue);
    color: var(--text-light);
}

.font-controls {
    display: flex;
    gap: 0.25rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.25rem;
}

.font-controls button {
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 32px;
    font-weight: bold;
}

.font-controls button:hover {
    background: rgba(255, 215, 0, 0.2);
    color: var(--primary-gold);
}

/* =============== НАВИГАЦИЯ =============== */

.bible-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-button {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-button:hover:not(:disabled) {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--primary-gold);
    color: var(--primary-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: var(--text-muted);
}

.nav-button:active {
    transform: translateY(0);
}

/* =============== СОДЕРЖИМОЕ ГЛАВЫ =============== */

.chapter-content {
    line-height: 2;
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

.verse {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border-left: 3px solid transparent;
}

.verse:hover {
    background: rgba(255, 215, 0, 0.1);
    border-left-color: var(--primary-gold);
    transform: translateX(5px);
}

.verse.selected {
    background: rgba(255, 215, 0, 0.15);
    border-left-color: var(--primary-gold);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.verse.bookmarked {
    border-right: 3px solid #4ECDC4;
}

.verse.bookmarked::after {
    content: '⭐';
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.verse-number {
    display: inline-block;
    background: var(--primary-gold);
    color: var(--dark-blue);
    font-weight: bold;
    font-size: 0.8rem;
    min-width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    margin-right: 0.75rem;
    vertical-align: top;
    flex-shrink: 0;
}

.verse-text {
    display: inline;
    line-height: inherit;
}

/* =============== МЕНЮ ДЕЙСТВИЙ СО СТИХОМ =============== */

.verse-menu {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--primary-gold);
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: fadeInScale 0.2s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.verse-menu button {
    background: transparent;
    color: var(--text-light);
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.verse-menu button:hover {
    background: rgba(255, 215, 0, 0.2);
    color: var(--primary-gold);
}

/* =============== ВЫДЕЛЕНИЕ ПОИСКА =============== */

.highlight {
    background: linear-gradient(120deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 237, 74, 0.3) 100%);
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    font-weight: 500;
}

/* =============== ПРОГРЕСС ЧТЕНИЯ =============== */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 10000;
    pointer-events: none;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-gold), var(--light-gold));
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* =============== ИНФОРМАЦИОННЫЕ ПАНЕЛИ =============== */

.chapter-info {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 237, 74, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.chapter-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.chapter-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.chapter-stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-gold);
}

.chapter-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* =============== АДАПТИВНОСТЬ =============== */

@media (max-width: 768px) {
    .bible-container {
        padding: 1rem;
        margin: 1rem;
        border-radius: 15px;
    }
    
    .bible-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .bible-title {
        font-size: 2rem;
    }
    
    .bible-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .bible-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-button {
        width: 100%;
        justify-content: center;
    }
    
    .chapter-content {
        font-size: 1rem;
        line-height: 1.8;
    }
    
    .verse {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .verse-number {
        font-size: 0.7rem;
        min-width: 20px;
        height: 20px;
        line-height: 20px;
    }
    
    .chapter-stats {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .bible-title {
        font-size: 1.5rem;
    }
    
    .bible-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .bible-select,
    .nav-button {
        width: 100%;
    }
    
    .verse {
        padding: 0.5rem;
    }
    
    .verse-menu {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .verse-menu button {
        width: 100%;
        text-align: left;
    }
}

/* =============== ПЕЧАТЬ =============== */

@media print {
    .bible-header,
    .bible-nav,
    .bible-controls,
    .nav-button,
    .verse-menu {
        display: none !important;
    }
    
    .bible-container {
        background: none;
        border: none;
        box-shadow: none;
        margin: 0;
        padding: 0;
    }
    
    .verse {
        background: none !important;
        border: none !important;
        margin-bottom: 0.5rem;
        padding: 0.25rem 0;
        break-inside: avoid;
    }
    
    .verse-number {
        background: #333;
        color: white;
    }
    
    .chapter-content {
        font-size: 12pt;
        line-height: 1.6;
        color: #000;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* =============== ТЕМЫ =============== */

/* Светлая тема для чтения */
.theme-light .bible-container {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
}

.theme-light .verse:hover {
    background: rgba(212, 175, 55, 0.1);
}

.theme-light .verse.selected {
    background: rgba(212, 175, 55, 0.15);
}

.theme-light .verse-number {
    background: var(--primary-gold);
    color: white;
}

.theme-light .bible-nav {
    background: rgba(0, 0, 0, 0.05);
}

/* =============== СПЕЦИАЛЬНЫЕ ЭФФЕКТЫ =============== */

/* Анимация появления стихов */
.verse {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.verse:nth-child(1) { animation-delay: 0.1s; }
.verse:nth-child(2) { animation-delay: 0.15s; }
.verse:nth-child(3) { animation-delay: 0.2s; }
.verse:nth-child(4) { animation-delay: 0.25s; }
.verse:nth-child(5) { animation-delay: 0.3s; }
.verse:nth-child(n+6) { animation-delay: 0.35s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Эффект при чтении */
.verse.reading {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 237, 74, 0.1));
    border-left-color: var(--primary-gold);
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

/* Плавное выделение при поиске */
.verse.search-result {
    animation: highlightPulse 2s ease-in-out;
    border-left-color: #4ECDC4;
}

@keyframes highlightPulse {
    0%, 100% {
        background: rgba(78, 205, 196, 0.1);
    }
    50% {
        background: rgba(78, 205, 196, 0.3);
    }
}

/* Индикатор загрузки */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-muted);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-top: 2px solid var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Уведомления */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-gold);
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: #4ECDC4;
}

.notification.error {
    border-left-color: #FF6B6B;
}

.notification.warning {
    border-left-color: #FFE66D;
}

/* Кнопки действий */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.action-button {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-button:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--primary-gold);
    color: var(--primary-gold);
    transform: translateY(-2px);
}

/* Панель быстрых действий (floating) */
.quick-actions {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-actions.show {
    opacity: 1;
}

.quick-action {
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--primary-gold);
    border-radius: 50%;
    color: var(--primary-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.quick-action:hover {
    background: var(--primary-gold);
    color: var(--dark-blue);
    transform: scale(1.1);
}

.quick-action.active {
    background: var(--primary-gold);
    color: var(--dark-blue);
}

/* Tooltip для quick actions */
.quick-action::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-right: 10px;
}

.quick-action::after {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-right: 5px;
}

.quick-action:hover::before,
.quick-action:hover::after {
    opacity: 1;
}

/* Скрытие quick actions на мобильных */
@media (max-width: 768px) {
    .quick-actions {
        display: none;
    }
}

/* Дополнительные анимации */
.bible-container {
    animation: slideInUp 0.6s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для режима фокуса (скрытие отвлекающих элементов) */
body.focus-mode .bible-header .bible-controls,
body.focus-mode .bible-nav,
body.focus-mode .action-buttons {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

body.focus-mode .bible-header .bible-controls:hover,
body.focus-mode .bible-nav:hover,
body.focus-mode .action-buttons:hover {
    opacity: 1;
}

/* Режим ночного чтения */
body.night-mode {
    --primary-gold: #B8860B;
    --light-gold: #DAA520;
    --text-light: #E0E0E0;
    --text-muted: #A0A0A0;
    --glass-bg: rgba(0, 0, 0, 0.8);
    --dark-blue: #000000;
}

body.night-mode .bible-container {
    background: rgba(0, 0, 0, 0.9);
}

body.night-mode .verse-number {
    background: #B8860B;
    color: #000;
}

/* Анимация для смены тем */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}