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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: rgba(30, 41, 59, 0.6);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.2);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    background: var(--bg-darker);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(99, 102, 241, 0.15) 0px, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(148, 163, 184, 0.03) 2px, rgba(148, 163, 184, 0.03) 4px);
    pointer-events: none;
    z-index: 0;
}

/* Стили для списка загруженных глав */
#audio-files-list {
    margin-top: 15px;
}

#audio-files-list > div {
    scrollbar-width: thin;
    scrollbar-color: rgba(16, 185, 129, 0.5) rgba(16, 185, 129, 0.1);
}

#audio-files-list > div::-webkit-scrollbar {
    width: 8px;
}

#audio-files-list > div::-webkit-scrollbar-track {
    background: rgba(16, 185, 129, 0.1);
    border-radius: 4px;
}

#audio-files-list > div::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.5);
    border-radius: 4px;
}

#audio-files-list > div::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.7);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.header:hover {
    box-shadow: var(--shadow-lg);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.top-left {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.settings-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 6px;
}

.settings-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.top-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.icon-btn {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 18px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.main-nav {
    display: flex;
    gap: 30px;
    padding: 16px 20px;
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.main-nav a:hover::after {
    width: 80%;
}

/* Search Section */
.search-section {
    padding: 30px 0;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.genres-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.genre-btn {
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.genre-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.genre-btn:hover::before {
    width: 300px;
    height: 300px;
}

.genre-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.3);
}

.genre-btn.active {
    box-shadow: var(--shadow-xl);
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: var(--shadow-xl);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.5), var(--shadow-xl);
    }
}

.books-count {
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
}

.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.search-bar input {
    flex: 1;
    min-width: 250px;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-card-hover);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), var(--shadow-md);
    transform: translateY(-2px);
}

.search-bar button {
    padding: 14px 28px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.search-bar button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.search-bar button:hover::before {
    width: 300px;
    height: 300px;
}

#search-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

#search-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

#random-book-btn {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    box-shadow: var(--shadow-md);
}

#random-book-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    padding: 20px 0;
}

.books-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.book-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s;
}

.book-card:hover::before {
    left: 100%;
}

.book-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-xl);
    border-color: rgba(99, 102, 241, 0.3);
}

.book-cover-wrapper {
    position: relative;
}

.book-cover {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-color);
}

.card-fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.75);
    color: #facc15;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}
.card-fav-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
}

/* Sections on index */
.section-block {
    margin-top: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 22px;
}

.section-header select {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 12px;
}

.genres-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.genre-chip {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-primary);
    font-weight: 600;
    cursor: default;
}

.top-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.top-mini-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    align-items: center;
}

.top-mini-cover {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(148, 163, 184, 0.08);
}

.top-mini-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.top-mini-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.view-all:hover {
    text-decoration: underline;
}
.book-cover:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.book-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.book-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.book-meta-top {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.book-duration {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.book-tag-exclusive {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.book-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 5px;
}

.book-action-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid transparent;
}

.book-action-item:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.book-action-icon {
    font-size: 18px;
}

.book-action-count {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.book-views {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: -5px;
}

.view-icon {
    font-size: 16px;
}

.view-count {
    font-weight: 500;
}

.book-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.book-detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.book-detail-label {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-detail-value {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.book-title {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    line-height: 1.3;
}

.book-title:hover {
    transform: translateX(5px);
    filter: brightness(1.2);
}

.book-progress {
    font-size: 14px;
    color: #10b981;
    margin-bottom: 5px;
    font-weight: 600;
    display: inline-block;
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
}

.book-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.book-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.book-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.book-genre-tag {
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.book-genre-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.book-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 14px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid transparent;
}

.stat-item:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.view-count {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.sidebar-section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.sidebar-section h3 {
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 20px;
    font-weight: 700;
}

.update-item {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.update-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.update-item:hover {
    transform: translateX(5px);
}

.update-title {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.update-title:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    border-radius: 10px;
}

.progress-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 600;
}

.view-all {
    display: block;
    text-align: center;
    color: var(--primary-color);
    text-decoration: none;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 600;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.view-all:hover {
    background: rgba(99, 102, 241, 0.1);
    text-decoration: none;
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    margin: 10% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: var(--text-muted);
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 20px;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.close:hover {
    color: var(--text-primary);
    background: rgba(239, 68, 68, 0.1);
    transform: rotate(90deg);
}

.modal-content h2 {
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    font-weight: 700;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.modal-content input {
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: rgba(15, 23, 42, 0.8);
}

.modal-content button {
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    margin-top: 5px;
}

.modal-content button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.modal-content p {
    margin-top: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.modal-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-content a:hover {
    text-decoration: underline;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .book-card {
        grid-template-columns: 1fr;
    }
    
    .book-cover {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .main-nav {
        gap: 15px;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-bar input {
        width: 100%;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 5px;
    border: 2px solid var(--bg-darker);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Book Page Modern Layout */
.book-header-modern {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 40px;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.book-content-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.book-cover-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.book-cover-modern {
    width: 100%;
    max-width: 360px;
    height: 500px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.book-cover-modern:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.book-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
}

.action-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-icon {
    font-size: 24px;
    line-height: 1;
}

.action-count {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.book-content-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.book-title-section {
    margin-bottom: 10px;
}

.book-title-modern {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    line-height: 1.2;
}

.book-duration {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.duration-icon {
    font-size: 16px;
}

.audio-player-modern-container {
    margin: 0;
    min-height: 250px;
    width: 100%;
    background: var(--bg-card);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.audio-player-wrapper {
    min-height: 250px;
    width: 100%;
}

.book-meta-modern {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.meta-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    flex-shrink: 0;
}

.meta-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

.meta-value {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
}

.book-genres-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.genre-tag-modern {
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.genre-tag-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.book-description-section-modern {
    margin-bottom: 40px;
    padding: 30px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.description-text {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.narrator-section {
    margin-bottom: 40px;
    padding: 30px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.narrator-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.narrator-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.narrator-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.comments-section-modern {
    padding: 30px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.comment-form-modern {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.comment-input {
    padding: 15px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.comment-submit-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    align-self: flex-start;
}

.comment-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.comment-login-prompt {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

@media (max-width: 1024px) {
    .book-header-modern {
        grid-template-columns: 1fr;
    }
    
    .book-cover-section {
        align-items: center;
    }
    
    .book-cover-modern {
        max-width: 250px;
    }
}

/* Book page redesign */
.book-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.book-main {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
}
.book-top {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}
.book-cover-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px;
    box-shadow: var(--shadow-md);
}
.book-cover-card img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}
.book-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}
.action-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(148, 163, 184, 0.07);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}
.action-pill:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.4);
}
.book-stat-line {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 13px;
}
.book-player-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-md);
}
.book-title-block {
    margin-bottom: 12px;
}
.book-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}
.series-pill {
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
}
.book-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.meta-chip {
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.07);
    border: 1px solid var(--border-color);
    font-size: 13px;
}
.book-description-card,
.book-series-card,
.book-extra-card,
.support-card {
    margin-top: 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}
.book-description-card h2 {
    margin-bottom: 8px;
}
.book-description-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}
.series-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
}
.series-list {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.book-extra-card .extra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.extra-item {
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
}
.extra-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.support-card h3 {
    margin-bottom: 8px;
}
.support-text {
    color: var(--text-secondary);
    line-height: 1.6;
}
.empty-player {
    padding: 16px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
}

