@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Kantumruy+Pro:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-hover: #f1f5f9;
  
  --primary: #1a73e8;
  --primary-hover: #1557b0;
  --primary-light: #e8f0fe;
  --accent: #0f9d58;
  --accent-light: #e6f4ea;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-dark: #0f172a;
  
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  --font-family: 'Outfit', 'Kantumruy Pro', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
}

/* App Container */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Sidebar Styling */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 100;
  transition: transform var(--transition-normal);
}

.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: 0 4px 10px rgba(26, 115, 232, 0.2);
}

.sidebar-title {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-dark);
  letter-spacing: 0.5px;
}

.sidebar-menu {
  flex: 1;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.menu-item:hover {
  background-color: var(--bg-hover);
  color: var(--text-dark);
}

.menu-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border-left: 3px solid var(--primary);
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* Main Content Workspace */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  position: relative;
}

/* App Header */
.app-header {
  height: 70px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-dark);
  font-size: 20px;
  cursor: pointer;
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: var(--bg-hover);
  border: 1px solid transparent;
  border-radius: 30px;
  padding: 8px 18px;
  width: 320px;
  transition: all var(--transition-fast);
}

.search-bar:focus-within {
  background-color: var(--bg-secondary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
  width: 380px;
}

.search-bar input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-dark);
  margin-left: 10px;
  font-size: 14px;
  width: 100%;
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.notification-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
  padding: 6px;
  border-radius: 50%;
}

.notification-btn:hover {
  color: var(--text-dark);
  background-color: var(--bg-hover);
}

.badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background-color: #ea4335;
  border-radius: 50%;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
}

/* Page Containers */
.page {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn var(--transition-normal);
}

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

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(15, 157, 88, 0.08) 100%);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(26, 115, 232, 0.15) 0%, transparent 70%);
  filter: blur(40px);
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 24px;
  max-width: 500px;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  margin-top: 12px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  position: relative;
  padding-left: 14px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background-color: var(--primary);
  border-radius: 2px;
}

.show-more {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.show-more:hover {
  color: var(--primary-hover);
}

/* Horizontal Book Grid */
.book-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 32px;
}

.book-row .book-card {
  width: 180px;
  flex-shrink: 0;
}

/* Grid layout for search and collections */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

/* Book Card */
.book-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 320px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.book-card:hover {
  transform: translateY(-6px);
  border-color: rgba(26, 115, 232, 0.3);
  box-shadow: var(--shadow-lg);
}

.book-cover-container {
  height: 200px;
  background-color: var(--bg-hover);
  position: relative;
  overflow: hidden;
}

.book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.book-card:hover .book-cover {
  transform: scale(1.04);
}

.book-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.book-badge {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.book-badge.pdf {
  color: #ea4335;
  border-left: 2px solid #ea4335;
}

.book-badge.audio {
  color: #0f9d58;
  border-left: 2px solid #0f9d58;
}

.favorite-btn-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.favorite-btn-overlay:hover {
  color: #ea4335;
  transform: scale(1.1);
}

.favorite-btn-overlay.active {
  color: #ea4335;
}

.book-details {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
  color: var(--text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}

.book-author {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
}

.book-views {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Category Chips Grid */
.categories-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.category-chip {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.category-chip:hover, .category-chip.active {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: rgba(26, 115, 232, 0.4);
  transform: translateY(-1px);
}

/* Bottom Split Section */
.split-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

/* Flat Info List (last read, favorites) */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  display: flex;
  align-items: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  gap: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.history-item:hover {
  transform: translateX(4px);
  border-color: var(--primary);
}

.history-cover {
  width: 50px;
  height: 65px;
  border-radius: 6px;
  object-fit: cover;
  background-color: var(--bg-hover);
}

.history-details {
  flex: 1;
}

.history-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.progress-container {
  width: 100%;
  height: 4px;
  background-color: var(--bg-hover);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary);
  border-radius: 3px;
  transition: width var(--transition-normal);
}

/* Detail Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  animation: fadeIn var(--transition-fast);
}

.modal-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 850px;
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp var(--transition-normal);
}

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

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-dark);
}

.modal-body {
  padding: 32px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
}

.modal-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-cover {
  width: 100%;
  height: 350px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-hover);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
}

.btn-secondary:hover {
  background-color: var(--bg-hover);
}

.btn-secondary.active {
  border-color: #ea4335;
  color: #ea4335;
}

.modal-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
}

.detail-author {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  background-color: var(--bg-hover);
  padding: 20px;
  border-radius: 12px;
}

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

.meta-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.detail-desc-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.detail-description {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  max-height: 160px;
  overflow-y: auto;
}

/* Reader Split Workspace */
.reader-workspace {
  flex: 1;
  display: none;
  background-color: var(--bg-primary);
  overflow: hidden;
}

.reader-workspace.active {
  display: flex;
}

.reader-header {
  height: 60px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background-color: var(--bg-secondary);
}

.reader-back {
  background: none;
  border: none;
  color: var(--text-dark);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reader-layout {
  display: flex;
  height: calc(100% - 60px);
  width: 100%;
}


/* Audio Playlist Player Panel */
.audio-panel {
  width: 360px;
  background-color: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.audio-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-dark);
}

.audio-player-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.vinyl-container {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, #e2e8f0 30%, #94a3b8 70%, #1e293b 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  border: 4px solid var(--bg-hover);
}

.vinyl-cover {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
}

/* Rotation animation class */
.rotate-vinyl {
  animation: rotate 12s linear infinite;
}

.rotate-vinyl.paused {
  animation-play-state: paused;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.audio-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-author {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Audio Wave Visualizer */
.wave-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  margin-bottom: 16px;
}

.wave-bar {
  width: 3px;
  background-color: var(--primary);
  border-radius: 2px;
  transition: height 0.1s ease;
  height: 3px;
}

.wave-visualizer.playing .wave-bar {
  animation: bounce 1s ease-in-out infinite alternate;
}

.wave-visualizer.playing .wave-bar:nth-child(1) { animation-delay: 0.1s; height: 18px; }
.wave-visualizer.playing .wave-bar:nth-child(2) { animation-delay: 0.3s; height: 12px; }
.wave-visualizer.playing .wave-bar:nth-child(3) { animation-delay: 0.5s; height: 22px; }
.wave-visualizer.playing .wave-bar:nth-child(4) { animation-delay: 0.2s; height: 14px; }
.wave-visualizer.playing .wave-bar:nth-child(5) { animation-delay: 0.4s; height: 20px; }

@keyframes bounce {
  0% { transform: scaleY(0.2); }
  100% { transform: scaleY(1); }
}

.audio-controls {
  width: 100%;
}

.slider-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 16px;
  gap: 8px;
}

.audio-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--border-color);
  outline: none;
  cursor: pointer;
}

.audio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.audio-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.control-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.btn-ctrl {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-ctrl:hover {
  color: var(--text-dark);
  transform: scale(1.1);
}

.btn-ctrl.play-pause {
  width: 44px;
  height: 44px;
  background-color: var(--primary);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 8px rgba(26, 115, 232, 0.25);
}

.btn-ctrl.play-pause:hover {
  background-color: var(--primary-hover);
  transform: scale(1.05);
}

/* Playlist Menu */
.playlist-panel {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.playlist-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.playlist-tracks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.track-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background-color: var(--bg-hover);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  gap: 12px;
}

.track-item:hover {
  background-color: var(--border-color);
}

.track-item.active {
  background-color: var(--primary-light);
  border-color: rgba(26, 115, 232, 0.2);
  color: var(--primary);
}

.track-index {
  font-size: 12px;
  font-weight: 600;
  width: 20px;
  text-align: center;
  color: var(--text-muted);
}

.track-item.active .track-index {
  color: var(--primary);
}

.track-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-duration {
  font-size: 12px;
  color: var(--text-muted);
}

.track-item.active .track-duration {
  color: var(--primary);
}

/* Skeletons */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: loading-pulse 1.5s infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-card {
  height: 320px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

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

/* Connection Error State */
.connection-error {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 32px;
  background-color: var(--bg-card);
  border: 1px dashed #ea4335;
  border-radius: 12px;
}

.connection-error-icon {
  font-size: 48px;
  color: #ea4335;
  margin-bottom: 16px;
}

.connection-error h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.connection-error p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 480px;
}

/* Empty State Styling */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  background-color: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  grid-column: 1 / -1;
  width: 100%;
}

.empty-state svg {
  font-size: 40px;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 14px;
}

/* Floating Notification toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #0f9d58;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  font-size: 14px;
  z-index: 2000;
  display: none;
  animation: slideInUp var(--transition-fast);
}

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

/* Responsive Rules */
@media (max-width: 1024px) {
  .modal-container {
    width: 100%;
  }
}

@media (max-width: 850px) {
  .sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .menu-toggle {
    display: block;
  }
  
  .split-sections {
    grid-template-columns: 1fr;
  }
  
  .modal-body {
    grid-template-columns: 1fr;
  }
  
  .detail-cover {
    height: 240px;
  }
  
  .reader-layout {
    flex-direction: column;
  }
  
  .audio-panel {
    width: 100%;
    height: 350px;
  }
}
