/* Global Site Styles */
.page-card { background: #fff; border-radius: 6px; border: 1px solid #dfe3e7; margin-bottom: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); overflow: hidden; }
.page-card-body { padding: 25px; }

.ql-editor-content {
    color: #555;
    line-height: 1.7;
    font-weight: 400;
    font-size: 1.05rem;
}

.external-embed iframe {
    width: 100% !important;
    max-width: 100%;
}

/* Category Buttons (Shared) */
.music-categories, .cinema-categories, .blog-categories { display: flex; gap: 12px; margin-bottom: 35px; flex-wrap: wrap; justify-content: flex-start; }
.btn-category { padding: 10px 22px; border-radius: 25px; text-decoration: none; border: 1px solid #416f9d; color: #416f9d; transition: 0.3s; font-size: 0.95rem; font-weight: 500; background: #fff; }
.btn-category.active { background: #416f9d; color: #fff; box-shadow: 0 4px 10px rgba(65, 111, 157, 0.3); }

/* Специальный стиль для кнопки "Назад" в баннере */
a#back-btn-banner.btn-category.active {
    background: #416f9d !important;
    color: rgb(255 255 255 / 89%) !important;
    font-size: 0.8rem !important;
    padding: 6px 16px !important;
    white-space: nowrap !important;
    margin-left: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: none !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.2s ease-in-out !important;
}
a#back-btn-banner.btn-category.active:hover {
    background: #416f9d !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1 !important;
}

.btn-category:hover:not(.active) { background: #416f9d; color: #fff; }

/* Favorite button styling */
.btn-category.favorite-btn {
    border-color: #a07b59;
    color: #a07b59;
}
.btn-category.favorite-btn:hover, 
.btn-category.favorite-btn.active {
    background: #416f9d !important;
    color: #fff !important;
    border-color: #416f9d !important;
    box-shadow: 0 4px 10px rgba(65, 111, 157, 0.3) !important;
}

/* Header Social Icons Hover */
.social-hover-white:hover {
    opacity: 1 !important;
    color: #fff !important;
    transform: scale(1.1);
}

/* Calendar */
.calendar-main-layout { display: flex; gap: 30px; }
.day-card { background: #fff; border-radius: 8px; border: 1px solid #eee; min-height: 65px; padding: 8px; position: relative; transition: 0.2s ease; }
.day-card.today { background: #f0f7ff; border: 2px solid #416f9d; }
.holiday-name { font-size: 0.75rem; color: #e1b397; font-weight: bold; margin-top: auto; }

/* Breadcrumbs */
.breadcrumbs {
    background: #fdfdfd;
    padding: 8px 25px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.72rem;
    color: #999;
    display: flex;
    gap: 8px;
    align-items: center;
}
.breadcrumbs a {
    color: #416f9d;
    text-decoration: none;
    transition: 0.2s;
    font-size: inherit;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}
.breadcrumbs .separator {
    color: #ddd;
    font-size: 0.65rem;
}
.breadcrumbs .current {
    color: #666;
    font-weight: 500;
    font-size: inherit;
}

/* Hover effect for dynamic banner links */
#dynamic-banner a.ajax-link:hover {
    color: #c48d71 !important;
    text-shadow: none;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: #416f9d;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: none;
}
#back-to-top.show {
    opacity: 1;
    visibility: visible;
}
#back-to-top:hover {
    background: #345a82;
    transform: translateY(-5px);
}

#player-toggle {
    position: fixed;
    bottom: 160px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: #416f9d;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    border: none;
    box-shadow: 0 4px 15px rgba(65, 111, 157, 0.3);
    transition: all 0.3s ease;
}
#player-toggle i { font-size: 1.2rem; }

/* Скрытие кнопок на странице музыки и кино */
body.music-page #player-toggle,
body.cinema-page #player-toggle,
body.music-page #p-album-select { 
    display: none !important; 
}

/* Скрытие кнопки "Наверх" в режиме кинотеатра */
body.cinema-mode #back-to-top {
    display: none !important;
}

/* Lyrics Popup Styles (Restored) */
.lyrics-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.lyrics-modal.show { display: flex; opacity: 1; }
.lyrics-content {
    width: 90%; max-width: 800px; height: 80vh;
    background: #1a1a1a;
    border-radius: 20px;
    position: relative;
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.lyrics-header {
    padding: 20px 30px;
    background: #222;
    border-bottom: 1px solid #333;
    display: flex; justify-content: space-between; align-items: center;
}
.lyrics-body {
    flex: 1; overflow-y: auto; text-align: center; padding: 40px;
    scrollbar-width: none; scroll-behavior: smooth;
}
.lyrics-body::-webkit-scrollbar { display: none; }
.popup-lyric-line {
    font-size: 1.8rem; padding: 15px; opacity: 0.2;
    transition: all 0.6s ease; transform: scale(0.95); color: #fff;
}
.popup-lyric-line.active {
    opacity: 1; color: #416f9d; transform: scale(1.1); font-weight: bold;
    text-shadow: 0 0 20px rgba(65, 111, 157, 0.4);
}
.close-lyrics { font-size: 2rem; color: #888; cursor: pointer; transition: 0.3s; }
.close-lyrics:hover { color: #fff; transform: rotate(90deg); }

/* MOBILE OPTIMIZATION (General Layout Only) */
@media (max-width: 1200px) {
    .container { max-width: 100% !important; padding: 0 15px; }
    .cinema-layout { flex-direction: column !important; align-items: center !important; }
    .cinema-main { max-width: 100% !important; width: 100% !important; margin-right: 0 !important; }
    .cinema-sidebar { width: 100% !important; max-width: 100% !important; margin-top: 30px !important; }
    .video-container { height: auto !important; aspect-ratio: 16/9; }
}

@media (max-width: 768px) {
    body.site { max-width: 100% !important; border: none !important; margin: 0 !important; }
    header .container { height: auto !important; padding: 20px 10px !important; align-items: center !important; }
    header { min-height: auto !important; }
    .logo { margin-bottom: 20px !important; padding-top: 0 !important; }
    .logo img { max-height: 70px !important; }
    .mod-menu { border-radius: 4px !important; width: 100%; }
    .mod-menu ul { justify-content: center !important; flex-wrap: wrap !important; gap: 5px !important; padding: 10px !important; }
    .mod-menu a { font-size: 0.85rem !important; padding: 5px 8px !important; }
    
    /* Grids Adjustment */
    .blog-grid, .movie-grid { grid-template-columns: 1fr !important; }
    .blog-card { flex-direction: column !important; }
    .blog-card-img { width: 100% !important; height: 200px !important; }
    .album-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important; gap: 15px !important; }
    
    /* Nav Banner */
    .nav-banner .container { flex-direction: column !important; align-items: flex-start !important; gap: 10px !important; padding: 15px !important; }
    
    /* Buttons position */
    #back-to-top { bottom: 30px !important; right: 20px !important; }

    /* Центрируем категории в блоге, музыке и кино */
    .music-categories, .cinema-categories, .blog-categories { 
        justify-content: center !important; 
        gap: 8px !important; 
        margin-bottom: 25px !important; 
    }
    .btn-category { 
        padding: 8px 16px !important; 
        font-size: 0.85rem !important; 
    }
}

@media (max-width: 480px) {
    .album-grid { grid-template-columns: 1fr 1fr !important; }
    .page-card-body { padding: 15px !important; }
    h1 { font-size: 1.4rem !important; }
}
