/* ==========================================================================
   DESIGN SYSTEM & THEME VARIABLES
   ========================================================================== */

:root {
  /* Font Family definitions */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Lora', Georgia, "Times New Roman", serif;
  --font-display: 'Playfair Display', Georgia, serif;

  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* Shared Light Mode Values */
  --light-bg-base: #f1f5f9;
  --light-bg-surface: rgba(255, 255, 255, 0.95);
  --light-text-primary: #090d16;
  --light-text-secondary: #2d3748;
  --light-text-muted: #64748b;
  --light-border: rgba(15, 23, 42, 0.12);
  --light-accent-glow: rgba(124, 77, 255, 0.18);

  /* Shared Dark Mode Values */
  --dark-bg-base: #03050c;
  --dark-bg-surface: rgba(8, 12, 28, 0.65);
  --dark-text-primary: #f8fafc;
  --dark-text-secondary: #cbd5e1;
  --dark-text-muted: #64748b;
  --dark-border: rgba(0, 240, 255, 0.15);
  --dark-accent-glow: rgba(0, 240, 255, 0.20);

  /* Accent Colors */
  --color-primary: #00F0FF;     /* Cosmic Cyan */
  --color-primary-hover: #00c8ff;
  --color-secondary: #FF007F;   /* Neon Magenta */
  --color-secondary-hover: #ff0055;
  --color-streak: #ff9100;      /* Fire orange */
  --color-danger: #ff1744;      /* Cyber red */
  --color-success: #00e676;     /* Matrix green */
  --color-warning: #ffea00;     /* Yellow alert */

  /* Default theme values (Dark theme active by default) */
  --bg-base: var(--dark-bg-base);
  --bg-surface: var(--dark-bg-surface);
  --text-primary: var(--dark-text-primary);
  --text-secondary: var(--dark-text-secondary);
  --text-muted: var(--dark-text-muted);
  --border-color: var(--dark-border);
  --accent-glow: var(--dark-accent-glow);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glass-blur: blur(16px);
}

/* Light Theme overrides */
[data-theme="light"] {
  --bg-base: var(--light-bg-base);
  --bg-surface: var(--light-bg-surface);
  --text-primary: var(--light-text-primary);
  --text-secondary: var(--light-text-secondary);
  --text-muted: var(--light-text-muted);
  --border-color: var(--light-border);
  --accent-glow: var(--light-accent-glow);
  --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.05);
  --glass-blur: blur(12px);
}

/* Webtoon Universe overrides */
[data-universe="webtoon"] {
  --color-primary: #FF007F;     /* Webtoon Neon Magenta */
  --color-primary-hover: #ff0055;
  --color-secondary: #00F0FF;   /* Roman Cosmic Cyan */
  --color-secondary-hover: #00c8ff;
  --dark-border: rgba(255, 0, 127, 0.15);
  --dark-accent-glow: rgba(255, 0, 127, 0.20);
}

/* ==========================================================================
   RESET & BASICS
   ========================================================================== */

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

body {
  font-family: var(--font-ui);
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.3s ease;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-secondary);
}

img {
  max-width: 100%;
  height: auto;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* ==========================================================================
   LAYOUT & HEADER
   ========================================================================== */

.app-header {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 30px);
  max-width: 1380px;
  height: 60px;
  z-index: 1000;
  background: rgba(8, 8, 16, 0.75);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 229, 255, 0.05);
  transition: var(--transition-smooth);
  
  /* Enforce flex centering vertically */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  line-height: 1.2 !important;
}

.header-container {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  margin: 0 auto !important;
  padding: 0 1.5rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  color: var(--color-primary);
  text-shadow: 0 0 10px var(--color-primary);
  animation: pulse 2s infinite alternate;
}

/* Navigation Links */
.nav-links {
  display: flex;
  gap: 1.1rem;
  align-items: center;
}

.nav-item {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.nav-item:hover, .nav-item.active {
  color: #00e5ff;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}
.nav-item::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  transition: var(--transition-smooth);
  border-radius: 2px;
}
.nav-item:hover::after, .nav-item.active::after {
  width: 80%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* App Main Content Wrap */
.app-main {
  margin-top: 95px;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 1.5rem;
}

/* ==========================================================================
   SEARCH SYSTEM
   ========================================================================== */

.search-container {
  position: relative;
  width: 250px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-container:focus-within {
  width: 360px;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  padding: 0.45rem 1.2rem;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
.search-box:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.25), inset 0 1px 2px rgba(0,0,0,0.2);
  background: rgba(10, 10, 20, 0.8);
}
.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  width: 100%;
}
.search-box input::placeholder {
  color: var(--text-muted);
}
.clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}
.clear-btn:hover {
  color: var(--text-primary);
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
  padding: 1rem;
  display: none;
  z-index: 1001;
}

.search-dropdown.active {
  display: block;
  animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-section h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  letter-spacing: 1px;
}

.dropdown-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dropdown-section li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}
.dropdown-section li a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
.dropdown-section li a span.badge {
  font-size: 0.75rem;
  background: var(--border-color);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 12px;
}

/* ==========================================================================
   BUTTONS & COMMON COMPONENTS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #b388ff);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124, 77, 255, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 77, 255, 0.45);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--text-muted);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}
.btn-danger:hover {
  background: #ff5252;
  box-shadow: 0 4px 12px rgba(255, 23, 68, 0.3);
}

.btn-success {
  background: var(--color-success);
  color: #000;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Streak Indicator */
.streak-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 145, 0, 0.1);
  border: 1px solid rgba(255, 145, 0, 0.3);
  color: var(--color-streak);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  animation: float 3s ease-in-out infinite;
}
.streak-icon {
  filter: drop-shadow(0 0 5px var(--color-streak));
  display: inline-block;
  animation: fireFlicker 1s steps(4) infinite;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: none; }

/* User Menu Button dropdown */
.user-menu-container {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 0.3rem 0.8rem 0.3rem 0.3rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
}
.user-profile-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-primary);
}
.user-profile-btn .arrow {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--glass-shadow);
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  z-index: 1002;
}
.profile-dropdown.active {
  display: flex;
  animation: slideDown 0.2s ease;
}
.profile-dropdown a, .profile-dropdown button {
  padding: 0.6rem 0.8rem;
  font-size: 0.88rem;
  border-radius: 6px;
  color: var(--text-secondary);
  text-align: left;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
}
.profile-dropdown a:hover, .profile-dropdown button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
.profile-dropdown hr {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 0.4rem 0;
}

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}
.modal-content.max-w-lg {
  max-width: 600px;
}
.modal-content.max-w-md {
  max-width: 500px;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}
.close-modal:hover {
  color: var(--text-primary);
}

.modal-content h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  color: var(--text-primary);
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: -0.8rem;
  margin-bottom: 1.2rem;
}

.form-group {
  margin-bottom: 1.2rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 8px var(--accent-glow);
  background: rgba(255, 255, 255, 0.05);
}
.form-group textarea {
  resize: vertical;
}

.modal-footer-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1.2rem;
}

/* ==========================================================================
   PAGE: EXPLORE / HOME
   ========================================================================== */

.page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
}

/* 3D Glass Hero Section */
.hero-section {
  position: relative;
  background: radial-gradient(circle at 10% 20%, rgba(124, 77, 255, 0.15) 0%, rgba(0, 0, 0, 0) 60%),
              radial-gradient(circle at 90% 80%, rgba(0, 229, 255, 0.1) 0%, rgba(0, 0, 0, 0) 60%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 3rem 2rem;
  margin-bottom: 3rem;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
}

.hero-content {
  max-width: 600px;
  margin-bottom: 2rem;
  z-index: 2;
  position: relative;
}
.hero-title-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.2), rgba(0, 229, 255, 0.2));
  border: 1px solid rgba(124, 77, 255, 0.3);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  color: var(--color-secondary);
}
.hero-content h1 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1.15;
  margin-bottom: 1rem;
  font-weight: 700;
}
.hero-content h1 span {
  background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-content p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Hero Top 10 slider */
.top-books-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 1rem 0.5rem 2rem 0.5rem;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}

.top-book-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: var(--transition-bounce);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.top-book-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--color-secondary);
  box-shadow: 0 10px 25px rgba(0, 229, 255, 0.25);
}

.card-number {
  position: absolute;
  top: -10px;
  left: 10px;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  font-style: italic;
  z-index: 10;
  color: rgba(255, 255, 255, 0.15);
  text-shadow: 1px 1px 0 var(--color-primary), -1px -1px 0 var(--color-primary);
  pointer-events: none;
}

.cover-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: #111;
}

.book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}
.top-book-card:hover .book-cover {
  transform: scale(1.08);
}

/* CSS Cover Generator styling */
.css-cover {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 1rem;
  position: relative;
  overflow: hidden;
  color: #fff;
  font-family: var(--font-display);
  background: linear-gradient(135deg, #1e1b4b 0%, #311042 100%);
}
.css-cover-bg-mesh {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(124, 77, 255, 0.3) 0%, transparent 60%);
  animation: rotateMesh 10s linear infinite;
  pointer-events: none;
}
.css-cover-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  margin-top: 1.5rem;
}
.css-cover-author {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-align: center;
  color: var(--color-secondary);
}

.card-details {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-author {
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.card-stats {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Category Based Carousel Container */
.category-section {
  margin-bottom: 3rem;
}
.category-section-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.6rem;
}

.category-tabs {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.category-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.category-tab:hover, .category-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 12px var(--accent-glow);
}

.horizontal-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0.5rem 0.2rem 1.5rem 0.2rem;
  scroll-behavior: smooth;
}

/* ==========================================================================
   PAGE: BOOK DETAIL
   ========================================================================== */

.book-detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  margin-top: 1.5rem;
}

.book-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.sidebar-cover {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--border-color);
  aspect-ratio: 2/3;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.book-main-info {
  display: flex;
  flex-direction: column;
}

.book-title-section {
  margin-bottom: 1.5rem;
}
.book-title-section h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.book-meta-inline {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.book-meta-inline .author-link {
  font-weight: 600;
  color: var(--color-primary);
}
.book-badge-tag {
  background: rgba(0, 229, 255, 0.1);
  color: var(--color-secondary);
  border: 1px solid rgba(0, 229, 255, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.book-stats-row {
  display: flex;
  gap: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-item .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-item .val {
  font-size: 1.1rem;
  font-weight: 700;
}

.book-description {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.detail-tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.detail-tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.8rem 0;
  cursor: pointer;
  position: relative;
}
.detail-tab-btn.active {
  color: var(--text-primary);
}
.detail-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-primary);
}

/* Chapter List Styles */
.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.chapter-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.8rem 1.2rem;
  transition: var(--transition-fast);
}
.chapter-list-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-primary);
  transform: translateX(4px);
}
.chapter-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.chapter-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.chapter-status-tag {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
}
.chapter-status-tag.scheduled { background: rgba(255, 145, 0, 0.1); color: var(--color-streak); }
.chapter-status-tag.draft { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }

/* World-Building wiki subgrid */
.world-wiki-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
}
.wiki-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  gap: 12px;
}
.wiki-card-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}
.wiki-card-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.wiki-card-cat {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--color-secondary);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.wiki-card-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   PAGE: READER MODE (THE CORE READER VIEW)
   ========================================================================== */

.reader-wrapper {
  position: relative;
  background: var(--bg-base);
  min-height: 100vh;
}

.reader-control-bar {
  position: sticky;
  top: 70px;
  z-index: 99;
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reader-book-meta h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}
.reader-book-meta p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.reader-toolbar-settings {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.reader-layout-control {
  display: flex;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px;
}
.reader-layout-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 4px;
}
.reader-layout-btn.active {
  background: var(--color-primary);
  color: #fff;
}

/* Font scale controls */
.font-scale-control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.scale-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Font choice dropdown */
.font-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  outline: none;
}

/* Reading container layout */
.reader-main-container {
  max-width: 800px;
  margin: 2rem auto 5rem auto;
  padding: 0 1.5rem;
}

.reader-header {
  text-align: center;
  margin-bottom: 3rem;
}
.reader-header h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.reader-content-paragraphs {
  font-family: var(--font-serif);
  font-size: 1.15rem; /* Base, scales dynamically */
  line-height: 1.8;
  letter-spacing: 0.01em;
}

/* Paragraph spacing and annotation targets */
.reader-content-paragraphs p {
  margin-bottom: 1.6rem;
  position: relative;
  padding-right: 35px; /* space for bubble */
  transition: var(--transition-fast);
}

.paragraph-bubble-btn {
  position: absolute;
  right: 0;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-family: var(--font-ui);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.2;
  transition: var(--transition-smooth);
}
.reader-content-paragraphs p:hover .paragraph-bubble-btn,
.paragraph-bubble-btn.has-comments {
  opacity: 1;
}
.paragraph-bubble-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  transform: scale(1.1);
}

/* Custom Highlight style for World building words */
.world-term-highlight {
  border-bottom: 1.5px dashed var(--color-primary);
  color: var(--color-primary);
  cursor: help;
  font-weight: 500;
  transition: var(--transition-fast);
}
.world-term-highlight:hover {
  color: var(--color-secondary);
  background: rgba(124, 77, 255, 0.08);
}

/* Reader navigation footer */
.reader-navigation-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  margin-top: 4rem;
}

/* Paragraph Annotations Drawer (side drawer or overlay) */
.annotations-drawer {
  position: fixed;
  top: 70px;
  right: -350px;
  width: 350px;
  bottom: 0;
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--glass-shadow);
  z-index: 101;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.annotations-drawer.active {
  right: 0;
}

.drawer-header {
  padding: 1.2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-header h3 {
  font-size: 1.1rem;
}
.close-drawer {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
}

.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}
.drawer-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  text-align: center;
}
.drawer-tab.active {
  color: var(--text-primary);
}
.drawer-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
}

.comments-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.8rem;
}
.comment-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.comment-user-info {
  display: flex;
  align-items: center;
  gap: 6px;
}
.comment-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}
.comment-username {
  font-size: 0.8rem;
  font-weight: 600;
}
.comment-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.comment-card p {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Spoiler blocker wrapper */
.spoiler-blocker {
  background: #333;
  color: transparent !important;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  user-select: none;
  transition: var(--transition-fast);
}
.spoiler-blocker:hover {
  background: #444;
}
.spoiler-blocker.revealed {
  background: transparent !important;
  color: inherit !important;
  user-select: auto;
}

.comment-input-area {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}
.comment-input-area textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  resize: none;
}
.comment-input-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.spoiler-toggle-container {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   PAGE: WRITER DASHBOARD & METIN EDITÖRÜ
   ========================================================================== */

.dashboard-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  min-height: calc(100vh - 120px);
}

.dashboard-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--border-color);
  padding-right: 1rem;
}
.db-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition-fast);
  cursor: pointer;
}
.db-nav-item:hover, .db-nav-item.active {
  background: rgba(124, 77, 255, 0.08);
  color: var(--color-primary);
}

.dashboard-content {
  display: flex;
  flex-direction: column;
}

/* Analytics cards grid */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}
.analytic-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--glass-shadow);
}
.analytic-card h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.analytic-card .val {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Drop-off chart design elements */
.drop-off-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.drop-off-table th, .drop-off-table td {
  padding: 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.drop-off-table th {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
.drop-off-bar-wrap {
  width: 100%;
  background: rgba(255,255,255,0.05);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}
.drop-off-bar-fill {
  background: linear-gradient(90deg, var(--color-danger), var(--color-streak));
  height: 100%;
}

/* Metin Editörü Layout */
.editor-layout {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  height: calc(100vh - 70px);
  overflow: hidden;
}

.editor-chapters-panel {
  border-right: 1px solid var(--border-color);
  background: rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}
.panel-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.editor-chapter-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.editor-chapter-item {
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editor-chapter-item:hover, .editor-chapter-item.active {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}
.editor-chapter-item.active {
  border-left: 3px solid var(--color-primary);
}

.editor-main {
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  overflow: hidden;
}

.editor-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.editor-title-input {
  background: none;
  border: none;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  outline: none;
  width: 60%;
}

.editor-body-wrap {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

/* The Rich text editor styling */
.rich-editor-area {
  min-height: 400px;
  outline: none;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-primary);
}
.rich-editor-area p {
  margin-bottom: 1.2rem;
}

/* Floating bubble popup for text selection */
.editor-selection-bubble {
  position: absolute;
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  box-shadow: var(--glass-shadow);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  gap: 4px;
  z-index: 1005;
  animation: scaleUp 0.15s ease;
}

.editor-world-drawer {
  border-left: 1px solid var(--border-color);
  background: rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   PAGE: INSTAGRAM EXPORT CANVAS
   ========================================================================== */

.instagram-modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.canvas-preview-container {
  width: 270px;
  height: 480px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--glass-shadow);
  margin: 1rem 0;
  background: #000;
}
#instagramCanvas {
  width: 100%;
  height: 100%;
}
.canvas-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.note-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   PAGE: ADMIN & MODERATOR PANEL
   ========================================================================== */

.admin-header {
  margin-bottom: 2rem;
}
.admin-header h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}
.admin-badge {
  background: var(--color-danger);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.admin-controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.admin-table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th, .admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.admin-table th {
  background: rgba(255,255,255,0.03);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
.admin-table tr:hover td {
  background: rgba(255,255,255,0.01);
}

/* Priority status indicators */
.badge-priority {
  font-size: 0.7rem;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}
.badge-priority.critical { background: rgba(255, 23, 68, 0.15); color: var(--color-danger); border: 1px solid rgba(255,23,68,0.3); }
.badge-priority.high { background: rgba(255, 145, 0, 0.15); color: var(--color-streak); border: 1px solid rgba(255,145,0,0.3); }
.badge-priority.medium { background: rgba(255, 234, 0, 0.15); color: #ffeb3b; border: 1px solid rgba(255,234,0,0.3); }
.badge-priority.low { background: rgba(0, 229, 255, 0.15); color: var(--color-secondary); border: 1px solid rgba(0,229,255,0.3); }

/* ==========================================================================
   ANIMATIONS & EFFECTS
   ========================================================================== */

@keyframes pulse {
  0% { transform: scale(1); text-shadow: 0 0 5px var(--color-primary); }
  100% { transform: scale(1.15); text-shadow: 0 0 15px var(--color-primary); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}

@keyframes fireFlicker {
  0% { transform: skewX(-2deg) scale(1); }
  25% { transform: skewX(2deg) scale(0.98); }
  50% { transform: skewX(-1deg) scale(1.05); }
  75% { transform: skewX(1deg) scale(1); }
  100% { transform: skewX(-2deg) scale(1.02); }
}

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

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

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Quantum Loading Spinner */
.quantum-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid transparent;
  border-top-color: var(--color-primary);
  border-bottom-color: var(--color-secondary);
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.53, 0.21, 0.29, 0.67) infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive adjust */
@media(max-width: 900px) {
  .book-detail-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-container {
    grid-template-columns: 1fr;
  }
  .dashboard-nav {
    border-right: none;
    padding-right: 0;
    flex-direction: row;
    overflow-x: auto;
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .editor-chapters-panel, .editor-world-drawer {
    display: none;
  }
  .search-container {
    width: 200px;
  }
}

/* Toast styling */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: var(--text-primary);
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  animation: slideInLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid var(--color-primary);
}
.toast.success { border-left-color: var(--color-success); }
.toast.danger { border-left-color: var(--color-danger); }
.toast.warning { border-left-color: var(--color-warning); }

@keyframes slideInLeft {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== HAMBURGER MENU — GLOBALLY HIDDEN (bottom nav handles mobile) ===== */
#mobileMenuBtn {
  display: none !important;
}
#mobileDropdownMenu {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

/* Mobile responsive enhancements */
@media (max-width: 1024px) {
  .app-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    height: 60px !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    background: rgba(10, 10, 20, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    z-index: 1000;
  }

  .header-container {
    flex-wrap: nowrap !important;
    gap: 0 !important;
    justify-content: space-between !important;
    padding: 0 1.25rem !important;
  }

  .logo {
    font-size: 1.25rem !important;
  }

  .app-main {
    margin-top: 75px !important;
    padding-bottom: 75px !important;
  }

  .search-container {
    display: none !important;
  }

  .nav-links {
    display: none !important;
  }

  .header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: auto !important;
  }

  #headerMissionsBtn,
  #streakBadge,
  #themeToggle,
  #quickCreateBookBtn,
  #authSection,
  #userMenuContainer {
    display: none !important;
  }
  
  #mobileMenuBtn {
    display: none !important;
  }
  #mobileDropdownMenu {
    display: none;
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100vh - 120px) !important;
    overflow-y: auto !important;
    z-index: 9999 !important;
    flex-direction: column !important;
    padding: 20px !important;
    gap: 15px !important;
    background: rgba(10, 10, 20, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-sizing: border-box !important;
  }
  #mobileDropdownMenu.active {
    display: flex !important;
  }

  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 60px !important;
    background: rgba(10, 10, 20, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    z-index: 1000 !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 5px 0 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
    box-sizing: border-box !important;
  }

  .mobile-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    gap: 3px !important;
    flex: 1 !important;
  }

  .mobile-nav-item .nav-icon {
    font-size: 1.2rem !important;
    transition: transform 0.2s ease !important;
  }

  .mobile-nav-item.active {
    color: var(--color-primary) !important;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.2) !important;
  }

  .mobile-nav-item.active .nav-icon {
    transform: translateY(-2px) scale(1.1) !important;
  }

  .profile-dropdown {
    width: auto !important;
    max-width: 90vw !important;
    right: 0 !important;
    left: auto !important;
  }

  .top-books-carousel-wrapper {
    padding: 0 !important;
  }

  .top-books-carousel-wrapper .carousel-arrow-btn {
    display: none !important;
  }
  
  /* Reader View layout fixes */
  .reader-wrapper {
    flex-direction: column !important;
  }
  
  #buddyDrawer {
    width: 100% !important;
    height: 250px !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-color) !important;
  }

  .reader-control-bar {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    padding: 12px;
    top: 60px !important; /* Below the top header */
  }
  .reader-toolbar-settings {
    justify-content: space-between;
    width: 100%;
  }

  #audiobookPlayerRow {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    align-items: stretch;
  }
  #audiobookPlayerRow input[type="range"] {
    width: 100%;
  }

  /* Grid layout collapses */
  .book-detail-grid, .analytics-grid, .world-wiki-grid {
    grid-template-columns: 1fr !important;
  }
  
  .book-sidebar {
    align-items: center;
  }
  
  .sidebar-cover {
    width: 160px;
    height: 240px;
  }

  /* Wallet details wrap */
  .wallet-grid {
    grid-template-columns: 1fr !important;
  }

  /* Wiki item modal adjustments */
  .modal-content {
    width: 92% !important;
    padding: 1.5rem !important;
  }
  .modal-content.max-w-md, .modal-content.max-w-lg {
    max-width: 92% !important;
  }

  /* Compact Header elements on Mobile/Tablet */
  .user-profile-btn .username,
  .user-profile-btn .arrow {
    display: none !important;
  }
  .user-profile-btn {
    padding: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #headerMissionsBtn {
    padding: 6px 8px !important;
    margin-right: 4px !important;
  }
  #headerMissionsBtn span {
    font-size: 0 !important;
  }
  #headerMissionsBtn span::before {
    content: "🌌 Lvl " !important;
    font-size: 0.75rem !important;
    font-weight: bold !important;
  }
  #headerLevelNum {
    font-size: 0.75rem !important;
    display: inline !important;
    font-weight: bold !important;
  }

  .streak-badge {
    font-size: 0 !important;
    padding: 0.35rem 0.5rem !important;
    margin-right: 4px !important;
  }
  .streak-badge .streak-icon {
    font-size: 0.85rem !important;
  }
  .streak-badge .streak-count {
    font-size: 0.85rem !important;
    display: inline !important;
  }

  .theme-toggle {
    width: 32px !important;
    height: 32px !important;
    padding: 6px !important;
  }
  .auth-section {
    gap: 6px !important;
  }
  .auth-section .btn {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.75rem !important;
  }

  .home-universe-tab {
    padding: 8px 16px !important;
    font-size: 0.8rem !important;
  }

  /* Responsive annotations drawer */
  .annotations-drawer {
    width: 100% !important;
    right: -100% !important;
    top: 60px !important;
    height: calc(100vh - 120px) !important;
    bottom: 60px !important;
    z-index: 1001 !important;
  }
  .annotations-drawer.active {
    right: 0 !important;
  }
}

/* Local AI Autocomplete box */
.ai-autocomplete-popup {
  position: absolute;
  z-index: 2000;
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  box-shadow: var(--glass-shadow);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  min-width: 140px;
}
.ai-autocomplete-item {
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
}
.ai-autocomplete-item.active {
  background: rgba(124, 77, 255, 0.1);
  color: var(--color-primary);
  font-weight: 600;
  border: 1px solid rgba(124, 77, 255, 0.2);
}
.ai-autocomplete-shortcut {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ==========================================================================
   NOVELHUB PREMIUM MODERN STYLE OVERRIDES v2.0
   ========================================================================== */

/* Custom Animations */
@keyframes ctxFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(-5px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 5px rgba(124, 77, 255, 0.2); }
  50% { box-shadow: 0 0 25px rgba(124, 77, 255, 0.6); }
  100% { box-shadow: 0 0 5px rgba(124, 77, 255, 0.2); }
}

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

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== Deep Premium Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.4), rgba(124, 77, 255, 0.4));
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.8), rgba(124, 77, 255, 0.8));
}

/* ===== Premium Body & Glowing Backgrounds ===== */
body {
  background: #02020a !important;
  background-image:
    radial-gradient(ellipse at 50% -20%, rgba(124, 77, 255, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 10% 30%, rgba(0, 229, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 70%, rgba(168, 85, 247, 0.06) 0%, transparent 40%) !important;
  color: #f8fafc !important;
}

[data-theme="light"] body {
  background: #f8fafc !important;
  background-image:
    radial-gradient(ellipse at 50% -20%, rgba(124, 77, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.03) 0%, transparent 30%) !important;
  color: #0f172a !important;
}

/* ===== Premium Header & Sticky Glassmorphism ===== */
.app-header {
  background: rgba(2, 2, 10, 0.7) !important;
  backdrop-filter: blur(24px) saturate(1.8) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.8) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="light"] .app-header {
  background: rgba(255, 255, 255, 0.8) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
}

/* ===== Premium Navigation Items ===== */
.nav-item {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  padding: 0.6rem 1rem !important;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.6) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.nav-item:hover {
  background: rgba(124, 77, 255, 0.08) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.nav-item.active {
  color: #00e5ff !important;
  background: rgba(0, 229, 255, 0.08) !important;
  border: 1px solid rgba(0, 229, 255, 0.15) !important;
}

.nav-item::after {
  display: none !important; /* Hide old underline */
}

/* ===== Premium Buttons ===== */
.btn {
  border-radius: 12px !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-primary {
  background: linear-gradient(135deg, #00e5ff 0%, #7c4dff 50%, #c084fc 100%) !important;
  background-size: 200% auto !important;
  color: #000 !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3) !important;
}

.btn-primary:hover {
  background-position: right center !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(124, 77, 255, 0.45) !important;
  color: #fff !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.02) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(0, 229, 255, 0.3) !important;
  color: #00e5ff !important;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.55rem 1.2rem !important;
  font-size: 0.82rem !important;
  border-radius: 10px !important;
}

/* ===== Premium Theme Toggle ===== */
.theme-toggle {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
}

.theme-toggle:hover {
  background: rgba(124, 77, 255, 0.1) !important;
  border-color: rgba(124, 77, 255, 0.25) !important;
  transform: rotate(15deg) scale(1.05) !important;
}

/* ===== Editorial Hero Spotlight Section ===== */
.hero-section {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.12) 0%, rgba(2, 2, 10, 0.6) 60%, rgba(0, 229, 255, 0.08) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 24px !important;
  padding: 4rem 3rem !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 992px) {
  .hero-section {
    grid-template-columns: 1fr;
    padding: 3rem 2rem !important;
  }
}

.hero-content h1 {
  font-family: 'Outfit', sans-serif !important;
  font-size: 3.2rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: -1px;
}

.hero-content h1 span {
  background: linear-gradient(135deg, #00e5ff, #c084fc, #7c4dff) !important;
  background-size: 200% auto !important;
  animation: gradientShift 4s ease infinite;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.hero-content p {
  font-size: 1.1rem !important;
  line-height: 1.7 !important;
  color: #94a3b8 !important;
}

.hero-title-badge {
  background: rgba(0, 229, 255, 0.08) !important;
  border: 1px solid rgba(0, 229, 255, 0.25) !important;
  color: #00e5ff !important;
  padding: 0.4rem 1.2rem !important;
  border-radius: 30px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
}

/* ===== Top 10 Book Cards & Covers ===== */
.top-book-card {
  position: relative !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.02) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

.top-book-card:hover {
  transform: translateY(-8px) scale(1.03) !important;
  border-color: rgba(0, 229, 255, 0.35) !important;
  box-shadow: 0 20px 40px rgba(0, 229, 255, 0.12), 0 5px 15px rgba(0,0,0,0.3) !important;
}

.top-book-card .card-number {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #00e5ff 0%, #7c4dff 100%) !important;
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  color: #000 !important;
  font-style: normal !important;
  z-index: 15 !important;
}

/* Stunning 3D Hardcover Book styling for css-cover */
.css-cover {
  background: linear-gradient(135deg, #0f0f1b 0%, #1e1b4b 60%, #090910 100%) !important;
  position: relative !important;
  box-shadow: inset 10px 0 10px -5px rgba(0, 0, 0, 0.8), 0 4px 15px rgba(0,0,0,0.4) !important;
  border-radius: 10px !important;
  border-left: 6px solid #7c4dff !important;
}

.css-cover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 100%;
  background: linear-gradient(90deg, rgba(0,0,0,0.4) 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
  z-index: 5;
}

.css-cover-bg-mesh {
  background: radial-gradient(circle at center, rgba(0, 229, 255, 0.3) 0%, transparent 70%) !important;
}

.css-cover-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  color: #fff !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8) !important;
  padding: 0 0.75rem;
}

.css-cover-author {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  color: #00e5ff !important;
  background: rgba(0, 229, 255, 0.08) !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(0, 229, 255, 0.2) !important;
}

/* ===== Genre Pill Tabs ===== */
.category-tabs .genre-tab {
  border-radius: 30px !important;
  padding: 0.55rem 1.4rem !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  color: #94a3b8 !important;
  transition: all 0.3s ease !important;
}

.category-tabs .genre-tab:hover {
  background: rgba(0, 229, 255, 0.05) !important;
  border-color: rgba(0, 229, 255, 0.2) !important;
  color: #fff !important;
}

.category-tabs .genre-tab.active {
  background: linear-gradient(135deg, #00e5ff, #7c4dff) !important;
  color: #000 !important;
  font-weight: 700 !important;
  border-color: transparent !important;
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3) !important;
}

/* ===== Premium Modals ===== */
.modal-content {
  border-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6) !important;
  background: rgba(2, 2, 10, 0.95) !important;
  backdrop-filter: blur(30px) !important;
}

/* ===== Cosy & Immersive Reader View ===== */
.reader-content-container {
  background: rgba(10, 10, 18, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.04) !important;
  border-radius: 24px !important;
  padding: 3rem !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5) !important;
  max-width: 800px !important;
  margin: 2rem auto !important;
}

[data-theme="light"] .reader-content-container {
  background: #fdfdfb !important; /* Soft parchment color */
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
}

.read-paragraphs-container p {
  font-family: 'Lora', 'Georgia', serif !important;
  font-size: 1.25rem !important;
  line-height: 1.85 !important;
  margin-bottom: 2rem !important;
  color: #cbd5e1 !important;
}

[data-theme="light"] .read-paragraphs-container p {
  color: #2d3748 !important;
}

/* ===== Distraction-free AI Autocomplete pill ===== */
.ai-autocomplete-popup {
  border-radius: 12px !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(0, 229, 255, 0.2) !important;
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.15) !important;
  backdrop-filter: blur(16px) !important;
}

.ai-autocomplete-item {
  padding: 0.6rem 1rem !important;
  font-weight: 500 !important;
}

.ai-autocomplete-item.active {
  background: rgba(0, 229, 255, 0.1) !important;
  color: #00e5ff !important;
}

/* ===== Profile Menu Container ===== */
.user-profile-btn {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 30px !important;
  padding: 0.45rem 1rem !important;
}

.user-profile-btn:hover {
  background: rgba(0, 229, 255, 0.08) !important;
  border-color: rgba(0, 229, 255, 0.3) !important;
}

.profile-dropdown {
  background: rgba(2, 2, 10, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 15px 45px rgba(0,0,0,0.5) !important;
  backdrop-filter: blur(20px) !important;
}

/* ==========================================================================
   SPACE THEME, MARKET, SEARCH PAGE & READER THEMES ENHANCEMENTS
   ========================================================================== */

/* Space starry background */
#space-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -999;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

[data-theme="light"] #space-bg {
  opacity: 0;
}

/* Glassmorphism card tweaks for cosmic look */
.glass {
  background: rgba(13, 10, 31, 0.5) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(0, 229, 255, 0.1) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
}

/* 2-Column Search Layout */
.search-page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 2rem;
}

@media (min-width: 1025px) {
  .search-page-layout {
    grid-template-columns: 2.2fr 1fr;
  }
}

.search-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-widget {
  padding: 20px;
  border-radius: 16px;
}

.sidebar-widget h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  color: var(--color-secondary);
}

.sidebar-trending-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: var(--transition-fast);
}

.sidebar-trending-item:last-child {
  border-bottom: none;
}

.sidebar-trending-item:hover {
  transform: translateX(4px);
}

.sidebar-trending-cover {
  width: 45px;
  height: 65px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.sidebar-trending-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-trending-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sidebar-trending-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.2;
}

.sidebar-trending-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Market Page Styles */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 1.5rem;
}

.market-card {
  padding: 20px;
  border-radius: 16px;
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.market-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-secondary) !important;
  box-shadow: 0 10px 25px rgba(0, 229, 255, 0.15) !important;
}

.market-card-top {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.market-cover-wrap {
  width: 85px;
  height: 125px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.market-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.market-info-wrap {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.market-book-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #fff;
}

.market-book-author {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.market-price-badge {
  background: rgba(0, 229, 255, 0.1);
  color: var(--color-secondary);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  display: inline-block;
  align-self: flex-start;
}

.market-card-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Beautiful Reader Themes */
.reader-wrapper {
  transition: all 0.4s ease;
  min-height: 100vh;
}

/* Deep Space Reader (🌌) */
.theme-deepspace {
  background: radial-gradient(circle at top, #06051c 0%, #020108 100%) !important;
  color: #e2e8f0 !important;
}

.theme-deepspace .reader-control-bar {
  background: rgba(13, 10, 31, 0.75) !important;
  border-bottom: 1px solid rgba(0, 229, 255, 0.15) !important;
}

.theme-deepspace .reader-main-container h1,
.theme-deepspace .reader-main-container {
  color: #f8fafc !important;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}

.theme-deepspace .reader-content-paragraphs p {
  color: #cbd5e1 !important;
  line-height: 1.95;
  letter-spacing: 0.02em;
}

/* Cyberpunk Neon Reader (💖) */
.theme-cyberpunk {
  background: #000000 !important;
  color: #39ff14 !important; /* Neon / cyber green */
}

.theme-cyberpunk .reader-control-bar {
  background: rgba(10, 0, 15, 0.9) !important;
  border-bottom: 2px solid #ff007f !important;
}

.theme-cyberpunk .reader-book-meta h3,
.theme-cyberpunk .reader-book-meta p {
  color: #ff007f !important;
  text-shadow: 0 0 5px #ff007f;
}

.theme-cyberpunk .reader-main-container h1 {
  color: #00e5ff !important;
  text-shadow: 0 0 8px #00e5ff;
}

.theme-cyberpunk .reader-content-paragraphs p {
  color: #e0e0e0 !important;
  line-height: 1.9;
}

.theme-cyberpunk .paragraph-bubble-btn {
  background: rgba(255, 0, 127, 0.1);
  border-color: #ff007f;
  color: #ff007f;
}

/* Classic Sepia Reader (📖) */
.theme-sepia {
  background: #f4ecd8 !important;
  color: #5c4033 !important;
}

.theme-sepia .reader-control-bar {
  background: #eae0c8 !important;
  border-bottom: 1px solid #dcd1b4 !important;
}

.theme-sepia .reader-book-meta h3,
.theme-sepia .reader-book-meta p,
.theme-sepia .reader-main-container h1 {
  color: #4a2e1b !important;
}

.theme-sepia .reader-content-paragraphs p {
  color: #3e2723 !important;
  line-height: 1.85;
}

.theme-sepia .paragraph-bubble-btn {
  background: rgba(92, 64, 51, 0.05);
  border-color: rgba(92, 64, 51, 0.2);
  color: #5c4033;
}

/* Classic Light Reader (☀️) */
.theme-light {
  background: #ffffff !important;
  color: #1a1a1a !important;
}

.theme-light .reader-control-bar {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.theme-light .reader-book-meta h3,
.theme-light .reader-book-meta p,
.theme-light .reader-main-container h1 {
  color: #0f172a !important;
}

.theme-light .reader-content-paragraphs p {
  color: #334155 !important;
  line-height: 1.8;
}

.theme-light .paragraph-bubble-btn {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.08);
  color: #64748b;
}

/* General Reader Upgrades */
.reader-progress-bar-container {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 999;
}

.reader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
  transition: width 0.1s ease;
}

/* ==========================================================================
   COSMIC SPACE THEME & WEBTOON LAYOUTS
   ========================================================================== */

/* 1. Header & Switcher Styles */
.nav-universe-btn {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  transition: var(--transition-bounce);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-universe-btn.novel-mode {
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.05);
}
.nav-universe-btn.novel-mode.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2) 0%, rgba(0, 200, 255, 0.4) 100%);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.nav-universe-btn.webtoon-mode {
  border-color: rgba(255, 0, 127, 0.3);
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.05);
}
.nav-universe-btn.webtoon-mode.active {
  background: linear-gradient(135deg, rgba(255, 0, 127, 0.2) 0%, rgba(255, 0, 85, 0.4) 100%);
  color: #fff;
  border-color: var(--color-secondary);
  box-shadow: 0 0 15px rgba(255, 0, 127, 0.3);
}

/* User Avatar Astronaut Helmet Ring */
.avatar-helmet-ring {
  position: relative;
  display: inline-block;
  border-radius: 50%;
  padding: 3px;
  transition: var(--transition-smooth);
}
/* Levels Glow Colors */
.avatar-helmet-ring.level-1-2 { box-shadow: 0 0 8px #cd7f32; border: 2px solid #cd7f32; }
.avatar-helmet-ring.level-3-5 { box-shadow: 0 0 10px #c0c0c0; border: 2px solid #c0c0c0; }
.avatar-helmet-ring.level-6-8 { box-shadow: 0 0 12px #ffd700; border: 2px solid #ffd700; }
.avatar-helmet-ring.level-9-10 { box-shadow: 0 0 16px var(--color-primary); border: 2px solid var(--color-primary); animation: cosmicPulse 2s infinite ease-in-out; }

@keyframes cosmicPulse {
  0% { box-shadow: 0 0 8px var(--color-primary), 0 0 4px var(--color-secondary); }
  50% { box-shadow: 0 0 20px var(--color-primary), 0 0 10px var(--color-secondary); }
  100% { box-shadow: 0 0 8px var(--color-primary), 0 0 4px var(--color-secondary); }
}

/* Toggle Switcher on Home Page */
.home-universe-switcher {
  display: flex;
  background: rgba(8, 12, 28, 0.6);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: 30px;
  width: max-content;
  margin: 0 auto 2rem auto;
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
}

.home-universe-tab {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 25px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.home-universe-tab.active.novel-tab {
  background: var(--color-primary);
  color: #03050c;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.home-universe-tab.active.webtoon-tab {
  background: var(--color-secondary);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 0, 127, 0.4);
}

.home-universe-tab.audio-tab:hover {
  background: rgba(124, 77, 255, 0.18);
  color: #fff;
}

.home-universe-tab.active.audio-tab {
  background: linear-gradient(135deg, #7c4dff, #00e5ff);
  color: #03050c;
  box-shadow: 0 0 15px rgba(124, 77, 255, 0.4);
}

/* 2. Hero Black Hole Orbit Slider */
.blackhole-hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 3rem;
  background: radial-gradient(circle at center, rgba(10, 15, 36, 0.8) 0%, rgba(3, 5, 12, 0.95) 100%);
  border: 1px solid var(--border-color);
}

.blackhole-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blackhole-core {
  position: absolute;
  width: 70px;
  height: 70px;
  background: #000;
  border-radius: 50%;
  box-shadow: 0 0 35px 5px rgba(0, 240, 255, 0.5), 0 0 60px 15px rgba(255, 0, 127, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.8);
  z-index: 10;
  animation: blackholePulse 3s infinite ease-in-out;
}

.blackhole-disc {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top: 4px solid var(--color-primary);
  border-bottom: 4px solid var(--color-secondary);
  filter: blur(2px);
  animation: rotateDisc 8s infinite linear;
}

@keyframes blackholePulse {
  0% { transform: scale(1); box-shadow: 0 0 35px 5px rgba(0, 240, 255, 0.5), 0 0 60px 15px rgba(255, 0, 127, 0.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 45px 8px rgba(0, 240, 255, 0.6), 0 0 80px 25px rgba(255, 0, 127, 0.5); }
  100% { transform: scale(1); box-shadow: 0 0 35px 5px rgba(0, 240, 255, 0.5), 0 0 60px 15px rgba(255, 0, 127, 0.4); }
}

@keyframes rotateDisc {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 3. Planets Category Selector */
.planet-categories-grid {
  display: flex;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 24px;
  margin: 1.5rem 0;
  padding: 15px 30px;
  width: 100%;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.planet-categories-grid::-webkit-scrollbar {
  height: 6px;
}
.planet-categories-grid::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

.planet-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-bounce);
  width: 120px;
}

.planet-sphere {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin-bottom: 12px;
  background: radial-gradient(circle at 30% 30%, #fff 0%, rgba(255, 255, 255, 0.2) 20%, rgba(0, 0, 0, 0.8) 100%);
  transition: var(--transition-bounce);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.4);
}

/* Unique Planet Colorings */
.planet-fantasy { background: radial-gradient(circle at 30% 30%, #00ffff 0%, #0088cc 40%, #03050c 100%); box-shadow: 0 0 15px rgba(0, 240, 255, 0.5); }
.planet-scifi { background: radial-gradient(circle at 30% 30%, #a855f7 0%, #581c87 40%, #03050c 100%); box-shadow: 0 0 15px rgba(168, 85, 247, 0.5); }
.planet-romance { background: radial-gradient(circle at 30% 30%, #ff007f 0%, #990033 40%, #03050c 100%); box-shadow: 0 0 15px rgba(255, 0, 127, 0.5); }
.planet-thriller { background: radial-gradient(circle at 30% 30%, #374151 0%, #111827 40%, #000 100%); box-shadow: 0 0 12px rgba(255, 255, 255, 0.2); }
.planet-action { background: radial-gradient(circle at 30% 30%, #f97316 0%, #c2410c 40%, #03050c 100%); box-shadow: 0 0 15px rgba(249, 115, 22, 0.5); }

.planet-card:hover {
  transform: translateY(-8px);
}

.planet-card:hover .planet-sphere {
  box-shadow: 0 0 25px currentColor;
}

.planet-name {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.planet-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* 4. Nebula Search Screen */
.nebula-search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 2rem;
  text-align: center;
  position: relative;
}

.nebula-search-box {
  width: 100%;
  max-width: 600px;
  position: relative;
  margin-bottom: 2rem;
}

.nebula-search-input {
  width: 100%;
  padding: 18px 24px;
  border-radius: 40px;
  border: 1px solid var(--border-color);
  background: rgba(8, 12, 28, 0.7);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 1.1rem;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.1), inset 0 0 10px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}

.nebula-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.3), inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.meteorite-trends {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 600px;
}

.meteorite-tag {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-bounce);
}

.meteorite-tag:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--color-primary);
  color: #fff;
  transform: scale(1.08) rotate(2deg);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

/* 5. Webtoon Reader Layout */
.webtoon-reader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #03050c;
  min-height: 100vh;
}

.webtoon-side-gradient-left,
.webtoon-side-gradient-right {
  display: none; /* Stacks on tablet/mobile */
}

@media(min-width: 992px) {
  .webtoon-reader-container {
    position: relative;
    padding: 0 20%;
    background: linear-gradient(90deg, #020409 0%, #03050c 20%, #03050c 80%, #020409 100%);
  }
}

.webtoon-panels-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 800px;
}

.webtoon-panel-img {
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  height: auto;
}

.laser-progress-line {
  position: fixed;
  top: 70px;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
  box-shadow: 0 0 8px var(--color-secondary);
  z-index: 1000;
  transition: width 0.1s ease;
}

/* 6. Webtoon Drag & Drop Uploader (Editor) */
.webtoon-upload-zone {
  border: 2px dashed rgba(255, 0, 127, 0.4);
  background: rgba(255, 0, 127, 0.02);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-bottom: 2rem;
}

.webtoon-upload-zone:hover, .webtoon-upload-zone.dragover {
  border-color: var(--color-secondary);
  background: rgba(255, 0, 127, 0.06);
  box-shadow: 0 0 15px rgba(255, 0, 127, 0.1);
}

.webtoon-panels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
  margin-top: 2rem;
}

.uploader-panel-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  aspect-ratio: 2/3;
  background: #080c1c;
  cursor: grab;
  box-shadow: var(--glass-shadow);
}

.uploader-panel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.uploader-panel-card:hover .panel-card-overlay {
  opacity: 1;
}

.panel-delete-btn {
  background: var(--color-danger);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.panel-number-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(3, 5, 12, 0.85);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: bold;
  border: 1px solid var(--border-color);
}

/* 7. Constellation Wiki Map */
.constellation-wiki-view {
  position: relative;
  width: 100%;
  height: 450px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: radial-gradient(circle at center, #0a0f24 0%, #03050c 100%);
  overflow: hidden;
}

.constellation-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.constellation-node {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px #fff;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: var(--transition-bounce);
  z-index: 5;
}

.constellation-node:hover {
  transform: translate(-50%, -50%) scale(1.4);
  box-shadow: 0 0 20px var(--color-primary);
  background: var(--color-primary);
}

.constellation-node-label {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(3, 5, 12, 0.85);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.constellation-node:hover .constellation-node-label {
  opacity: 1;
}

/* 8. Instagram Webtoon Panel Crop Overlay */
.webtoon-panel-wrapper {
  position: relative;
  cursor: pointer;
}

.webtoon-panel-share-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(3, 5, 12, 0.8);
  border: 1px solid var(--border-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.webtoon-panel-wrapper:hover .webtoon-panel-share-icon {
  opacity: 1;
}

.webtoon-panel-share-icon:hover {
  transform: scale(1.1);
  background: var(--color-secondary);
  border-color: var(--color-secondary);
}

/* 9. Cosmic Missions (Rewards) Card Grid */
.missions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 1.5rem 0;
}

@media (min-width: 1025px) {
  .missions-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.mission-card {
  background: rgba(10, 15, 36, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

.mission-card.completed {
  border-color: var(--color-success);
  background: rgba(0, 230, 118, 0.03);
}

.mission-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mission-title {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.mission-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mission-reward-badge {
  font-size: 0.75rem;
  font-weight: bold;
  background: rgba(0, 240, 255, 0.1);
  color: var(--color-primary);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(0, 240, 255, 0.2);
  width: max-content;
}

.mission-reward-badge.tokens {
  background: rgba(255, 145, 0, 0.1);
  color: var(--color-streak);
  border-color: rgba(255, 145, 0, 0.2);
}

/* Popular Writers Carousel */
.popular-writers-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 1.5rem;
}

.popular-writer-card {
  background: rgba(8, 12, 28, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-bounce);
  cursor: pointer;
}

.popular-writer-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.popular-writer-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
}

.popular-writer-name {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.popular-writer-followers {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   WEBTOON DRAWING STUDIO WORKSPACE (FULLSCREEN)
   ========================================================================== */

#drawingModal.active {
  display: flex !important;
}

#drawingModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #0d0e12;
  z-index: 2000 !important;
  display: none;
  align-items: stretch;
  justify-content: stretch;
}

.drawing-studio-wrapper {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  grid-template-rows: 60px 1fr;
  width: 100%;
  height: 100%;
  color: #f3f4f6;
  font-family: var(--font-ui);
}

.drawing-studio-header {
  grid-column: 1 / -1;
  background: #13141c;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 60px;
}

.drawing-studio-sidebar-left {
  background: #111218;
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
}

.drawing-studio-sidebar-right {
  background: #111218;
  border-left: 1px solid rgba(255,255,255,0.06);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.drawing-studio-workbench {
  background: #1a1c23;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  position: relative;
  padding: 20px;
}

.drawing-studio-canvas-container {
  position: relative;
  background: #ffffff;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  border-radius: 4px;
}

.drawing-studio-canvas-container canvas {
  display: block;
}

.studio-tool-btn {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: #d1d5db;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-size: 0.85rem;
}

.studio-tool-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.studio-tool-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #000;
  font-weight: 700;
}

.studio-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 700;
}

.studio-layer-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  margin-bottom: 6px;
}

.studio-layer-item.active {
  border-color: var(--color-secondary);
  background: rgba(255, 0, 127, 0.1);
}

/* Zen Odaklanma Modu (Zen Mode) */
.drawing-studio-wrapper.zen-active {
  grid-template-columns: 1fr !important;
}

/* Gelismis Editor ve Yazim Alani Tasarimlari */
.editor-header {
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 2rem;
  backdrop-filter: blur(10px);
}

.editor-title-input {
  border-bottom: 2px solid transparent;
  padding: 8px 4px;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  font-size: 1.4rem;
  transition: all 0.3s ease;
}

.editor-title-input:focus {
  border-bottom-color: var(--color-primary);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.editor-actions select {
  background: rgba(10, 10, 20, 0.8) !important;
  border: 1px solid var(--border-color) !important;
  color: #fff !important;
  border-radius: 20px !important;
  padding: 6px 12px !important;
  outline: none;
  cursor: pointer;
  font-size: 0.8rem;
  transition: border-color 0.2s;
}

.editor-actions select:focus {
  border-color: var(--color-primary) !important;
}

.editor-actions input[type="datetime-local"] {
  background: rgba(10, 10, 20, 0.8);
  border: 1px solid var(--border-color);
  color: #fff;
  border-radius: 20px;
  padding: 6px 12px;
  outline: none;
  font-size: 0.8rem;
}

/* Webtoon Uploader Drag and Drop */
.webtoon-uploader-container {
  background: rgba(10, 10, 20, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

.webtoon-upload-zone {
  border: 2px dashed rgba(0, 240, 255, 0.25) !important;
  background: rgba(255, 255, 255, 0.01);
  border-radius: 12px;
  padding: 40px 20px;
  transition: all 0.3s ease;
}

.webtoon-upload-zone:hover {
  border-color: var(--color-primary) !important;
  background: rgba(0, 240, 255, 0.02);
  box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.05);
}

/* ==========================================================================
   LIGHT THEME DESIGN SYSTEM POLISH & OVERRIDES
   ========================================================================== */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] strong,
[data-theme="light"] b,
[data-theme="light"] .card-title,
[data-theme="light"] .planet-name,
[data-theme="light"] .hero-content h1,
[data-theme="light"] .category-section-title h3,
[data-theme="light"] .popular-writers-section h3,
[data-theme="light"] .announcements-section h3,
[data-theme="light"] .announcements-section strong,
[data-theme="light"] .detail-title,
[data-theme="light"] .chapter-title,
[data-theme="light"] .writer-dashboard h2,
[data-theme="light"] .editor-header h3,
[data-theme="light"] .panel-header h4,
[data-theme="light"] .reader-book-meta h3,
[data-theme="light"] .modal-content h3 {
  color: var(--text-primary) !important;
}

[data-theme="light"] p,
[data-theme="light"] span:not(.nav-icon):not(.streak-icon):not(.badge-count):not(.card-number),
[data-theme="light"] .text-secondary,
[data-theme="light"] .card-author,
[data-theme="light"] .planet-name,
[data-theme="light"] .announcements-section p,
[data-theme="light"] .note-text,
[data-theme="light"] .book-sidebar span {
  color: var(--text-secondary) !important;
}

/* Light Theme Navigation Overrides */
[data-theme="light"] .nav-item {
  color: rgba(15, 23, 42, 0.6) !important;
}
[data-theme="light"] .nav-item:hover {
  color: #000 !important;
  background: rgba(124, 77, 255, 0.05) !important;
}
[data-theme="light"] .nav-item.active {
  color: var(--color-primary) !important;
  background: rgba(0, 229, 255, 0.08) !important;
  border-color: rgba(0, 229, 255, 0.15) !important;
}

/* Light Theme Mobile Bottom Navbar */
[data-theme="light"] .mobile-bottom-nav {
  background: rgba(248, 250, 252, 0.9) !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .mobile-nav-item {
  color: var(--text-secondary) !important;
}
[data-theme="light"] .mobile-nav-item.active {
  color: var(--color-primary) !important;
}

/* Light Theme Trending Book Cards */
[data-theme="light"] .top-book-card {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04) !important;
}
[data-theme="light"] .top-book-card:hover {
  border-color: var(--color-primary) !important;
  box-shadow: 0 12px 30px rgba(124, 77, 255, 0.12) !important;
}
[data-theme="light"] .top-book-card .card-details {
  background: rgba(255, 255, 255, 0.95) !important;
  border-top: 1px solid rgba(15, 23, 42, 0.05) !important;
}

/* Light Theme Hero Section Gradient */
[data-theme="light"] .blackhole-hero-section {
  background: radial-gradient(circle at center, rgba(241, 245, 249, 0.9) 0%, rgba(226, 232, 240, 0.95) 100%) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

/* Light Theme Form Controls */
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea,
[data-theme="light"] .form-group select {
  background: rgba(0, 0, 0, 0.02) !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  color: var(--text-primary) !important;
}
[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group textarea:focus,
[data-theme="light"] .form-group select:focus {
  background: rgba(255, 255, 255, 1) !important;
  border-color: var(--color-primary) !important;
}

/* Light Theme Dropdowns */
[data-theme="light"] .profile-dropdown {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .profile-dropdown a, 
[data-theme="light"] .profile-dropdown button {
  color: var(--text-secondary) !important;
}
[data-theme="light"] .profile-dropdown a:hover, 
[data-theme="light"] .profile-dropdown button:hover {
  background: rgba(124, 77, 255, 0.05) !important;
  color: var(--color-primary) !important;
}

/* Light Theme Loader and Background tweaks */
[data-theme="light"] #space-bg {
  opacity: 0.15 !important;
}

/* ===== Fullscreen Drawing Modal & Centered Scrolling Workbench ===== */
#drawingModal {
  padding: 0 !important;
}

.drawing-studio-workbench {
  background: #1a1c23 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  overflow: auto !important;
  position: relative !important;
  padding: 40px !important;
}

.drawing-studio-canvas-container {
  margin: auto !important;
  flex-shrink: 0 !important;
}

/* Grid guide lines pattern */
.drawing-studio-canvas-container.show-grid::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 100;
}

/* ===== Webtoon Panel Comments Button ===== */
.webtoon-panel-comment-icon {
  position: absolute;
  top: 15px;
  right: 60px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(3, 5, 12, 0.8);
  border: 1px solid var(--border-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.webtoon-panel-wrapper:hover .webtoon-panel-comment-icon {
  opacity: 1;
}

.webtoon-panel-comment-icon:hover {
  transform: scale(1.1);
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* ===== Premium Comments Textarea input style ===== */
.drawer-input-container textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--border-color) !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  outline: none !important;
  font-family: inherit !important;
  font-size: 0.85rem !important;
  resize: none !important;
  transition: all 0.3s ease !important;
}

.drawer-input-container textarea:focus {
  border-color: var(--color-primary) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1) !important;
}

/* ==========================================================================
   VISUAL UPGRADE 2026 — COSMOSCROLL PREMIUM DESIGN SYSTEM
   ========================================================================== */

/* ── Body & Background ─────────────────────────────────────────────────── */
body {
  background-attachment: fixed;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(124, 77, 255, 0.10) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 85% 75%, rgba(0, 240, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255, 0, 127, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Header — Stronger Glow & Sharper Glass ──────────────────────────── */
.app-header {
  background: rgba(8, 10, 22, 0.82) !important;
  border: 1px solid rgba(0, 240, 255, 0.18) !important;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 1px 0 rgba(0, 240, 255, 0.12) inset !important;
}

.logo-text {
  background: linear-gradient(135deg, #ffffff 0%, #00F0FF 60%, #FF007F 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.nav-item {
  font-size: 0.92rem;
  letter-spacing: 0.3px;
}
.nav-item:hover,
.nav-item.active {
  color: #fff !important;
}
.nav-item::after {
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary)) !important;
  height: 2px !important;
  border-radius: 2px !important;
}

/* Desktop Menü Dropdown */
.nav-menu-btn {
  font-size: 0.92rem;
  letter-spacing: 0.3px;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.nav-menu-btn:hover {
  color: #fff !important;
}
.nav-menu-item:hover {
  background: rgba(124, 77, 255, 0.12);
  color: var(--color-secondary) !important;
  padding-left: 24px !important;
}

/* ── Primary Button — Vivid Gradient + Shimmer ───────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, #00c8ff 0%, #7c4dff 50%, #FF007F 100%) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 20px rgba(124, 77, 255, 0.4) !important;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: rgba(255, 255, 255, 0.15);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
  pointer-events: none;
}
.btn-primary:hover::after {
  left: 130%;
}
.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 28px rgba(124, 77, 255, 0.55) !important;
}

/* ── Secondary Button ────────────────────────────────────────────────── */
.btn-secondary {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(4px);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.10) !important;
  border-color: rgba(0, 240, 255, 0.3) !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1) !important;
}

/* ── Universe Switcher — More Premium ────────────────────────────────── */
.home-universe-switcher {
  background: rgba(6, 8, 20, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,240,255,0.05) inset !important;
}
.home-universe-tab {
  letter-spacing: 0.4px;
}
.home-universe-tab.active.novel-tab {
  background: linear-gradient(135deg, #00c8ff, #00F0FF) !important;
  color: #040818 !important;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5), 0 2px 8px rgba(0, 240, 255, 0.3) !important;
  text-shadow: none !important;
}
.home-universe-tab.active.webtoon-tab {
  background: linear-gradient(135deg, #ff0070, #FF007F) !important;
  color: #fff !important;
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.5), 0 2px 8px rgba(255, 0, 127, 0.3) !important;
}
.home-universe-tab.audio-tab:hover {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.35), rgba(124, 77, 255, 0.15)) !important;
  color: #fff !important;
}
.home-universe-tab.active.audio-tab {
  background: linear-gradient(135deg, #7c4dff, #00e5ff) !important;
  color: #040818 !important;
  box-shadow: 0 0 20px rgba(124, 77, 255, 0.5), 0 2px 8px rgba(0, 229, 255, 0.3) !important;
  text-shadow: none !important;
}

/* ── Hero Section — More Atmospheric ────────────────────────────────── */
.blackhole-hero-section {
  background:
    radial-gradient(circle at 50% 60%, rgba(0, 240, 255, 0.07) 0%, transparent 55%),
    radial-gradient(circle at 30% 40%, rgba(124, 77, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at center, rgba(10, 15, 36, 0.9) 0%, rgba(3, 5, 12, 0.98) 100%) !important;
  border: 1px solid rgba(0, 240, 255, 0.14) !important;
  box-shadow: 0 0 60px rgba(0, 240, 255, 0.05) inset, 0 20px 60px rgba(0,0,0,0.5) !important;
}
.blackhole-hero-section h1 {
  background: linear-gradient(135deg, #ffffff 0%, #a5f3fc 40%, #e879f9 80%, #ff007f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2.6rem !important;
  letter-spacing: -0.5px;
  text-shadow: none !important;
}

/* ── Section Titles — Gradient Text ─────────────────────────────────── */
.category-section-title,
.category-section .category-section-title {
  border-bottom: 1px solid rgba(0, 240, 255, 0.15) !important;
}
.category-section-title h3,
.category-section h3[style] {
  background: linear-gradient(135deg, #ffffff 0%, #a5f3fc 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

/* ── Book Cover Cards (CSS) — Richer Gradients ───────────────────────── */
.css-cover {
  background: linear-gradient(145deg, #110e2e 0%, #1e0a38 40%, #0c1a3a 100%) !important;
}
.css-cover-bg-mesh {
  background: radial-gradient(circle, rgba(124, 77, 255, 0.4) 0%, rgba(0, 240, 255, 0.1) 50%, transparent 70%) !important;
}
.css-cover-title {
  font-size: 1.05rem !important;
  text-shadow: 0 0 20px rgba(124, 77, 255, 0.6) !important;
}
.css-cover-author {
  color: #00F0FF !important;
  letter-spacing: 2px !important;
}

/* ── Book Card Wrapper (Horizontal Carousel Cards) ───────────────────── */
.horizontal-book-card {
  border-radius: 14px !important;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(8, 12, 28, 0.7) !important;
  backdrop-filter: blur(8px);
}
.horizontal-book-card:hover {
  transform: translateY(-6px) scale(1.01) !important;
  border-color: rgba(0, 240, 255, 0.3) !important;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(0, 240, 255, 0.12),
    0 0 0 1px rgba(0, 240, 255, 0.1) !important;
}

/* ── Planet Cards — Larger & More Atmospheric ────────────────────────── */
.planet-card {
  width: 110px !important;
  gap: 0 !important;
}
.planet-sphere {
  width: 80px !important;
  height: 80px !important;
  margin-bottom: 10px !important;
  box-shadow:
    inset 0 0 15px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(0, 0, 0, 0.5) !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.planet-card:hover .planet-sphere {
  transform: scale(1.12) !important;
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.4),
    0 0 35px currentColor,
    0 0 60px rgba(0, 0, 0, 0.6) !important;
}
.planet-card:hover {
  transform: translateY(-10px) !important;
}
.planet-name {
  font-size: 0.82rem !important;
  letter-spacing: 0.3px;
}

/* Planet colors — more vivid */
.planet-fantasy {
  background: radial-gradient(circle at 28% 28%, #00ffee 0%, #0077cc 35%, #001a40 85%, #03050c 100%) !important;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.6), 0 0 40px rgba(0, 120, 200, 0.3) !important;
}
.planet-scifi {
  background: radial-gradient(circle at 28% 28%, #d946ef 0%, #7c3aed 35%, #1e1b4b 85%, #03050c 100%) !important;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.6), 0 0 40px rgba(124, 58, 237, 0.3) !important;
}
.planet-romance {
  background: radial-gradient(circle at 28% 28%, #ff6b9d 0%, #c0045d 35%, #3d0020 85%, #03050c 100%) !important;
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.6), 0 0 40px rgba(192, 4, 93, 0.3) !important;
}
.planet-thriller {
  background: radial-gradient(circle at 28% 28%, #9ca3af 0%, #374151 40%, #111827 85%, #000 100%) !important;
  box-shadow: 0 0 15px rgba(156, 163, 175, 0.3), 0 0 30px rgba(255, 255, 255, 0.1) !important;
}
.planet-action {
  background: radial-gradient(circle at 28% 28%, #fbbf24 0%, #ea580c 35%, #431407 85%, #03050c 100%) !important;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.6), 0 0 40px rgba(234, 88, 12, 0.3) !important;
}

/* ── Glass Cards — More Polished ─────────────────────────────────────── */
.glass {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
}

/* ── Scrollbar — Thinner & Branded ───────────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* ── Modal — Better Entry Animation ─────────────────────────────────── */
.modal.active .modal-content {
  animation: modalSlideIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-content {
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 25px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(0, 240, 255, 0.06) inset !important;
}

/* ── Toast Notifications — More Vivid ───────────────────────────────── */
.toast {
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  backdrop-filter: blur(16px) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05) inset !important;
  font-size: 0.87rem !important;
}

/* ── Input & Form Fields ─────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  border-color: rgba(0, 240, 255, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.08), 0 0 15px rgba(0, 240, 255, 0.08) !important;
  outline: none !important;
}

/* ── Footer — Cleaner & More Premium ────────────────────────────────── */
.app-footer {
  background: rgba(4, 6, 16, 0.92) !important;
  border-top: 1px solid rgba(0, 240, 255, 0.12) !important;
  backdrop-filter: blur(20px) !important;
}
.app-footer h4 {
  letter-spacing: 0.5px;
  font-size: 0.95rem !important;
  color: #fff !important;
}
.app-footer p,
.app-footer li {
  font-size: 0.83rem !important;
}

/* ── Mobile Bottom Nav — More Premium ────────────────────────────────── */
.mobile-bottom-nav {
  background: rgba(4, 6, 18, 0.92) !important;
  border-top: 1px solid rgba(0, 240, 255, 0.15) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5) !important;
}
.mobile-nav-item {
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.2px;
  gap: 4px !important;
}
.mobile-nav-item .nav-icon {
  font-size: 1.15rem !important;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.mobile-nav-item.active .nav-icon {
  transform: scale(1.15) !important;
  filter: drop-shadow(0 0 6px var(--color-primary));
}
.mobile-nav-item.active {
  color: var(--color-primary) !important;
}

/* ── Book Detail Sidebar Cover — Nicer Shadow ─────────────────────────── */
.sidebar-cover {
  border-radius: 16px !important;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  border: none !important;
}

/* ── Profile/Avatar Ring — Glow Effect ──────────────────────────────── */
.avatar-helmet-ring {
  border-radius: 50%;
  transition: box-shadow 0.3s ease;
}
.level-9-10 {
  box-shadow: 0 0 0 2px #ffd700, 0 0 16px rgba(255, 215, 0, 0.6) !important;
}
.level-6-8 {
  box-shadow: 0 0 0 2px var(--color-primary), 0 0 12px rgba(0, 240, 255, 0.5) !important;
}
.level-3-5 {
  box-shadow: 0 0 0 2px #7c4dff, 0 0 10px rgba(124, 77, 255, 0.4) !important;
}
.level-1-2 {
  box-shadow: 0 0 0 2px #00ff88, 0 0 8px rgba(0, 255, 136, 0.4) !important;
}

/* ── Admin Panel — Polished Table ────────────────────────────────────── */
.admin-table th {
  background: rgba(0, 240, 255, 0.04) !important;
  letter-spacing: 0.4px !important;
}
.admin-table tr:hover td {
  background: rgba(0, 240, 255, 0.03) !important;
}

/* ── Announcement & Info Cards — Better look ─────────────────────────── */
.announcements-section {
  border: 1px solid rgba(0, 240, 255, 0.10) !important;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.04) 0%, rgba(0, 229, 255, 0.04) 100%) !important;
}

/* ── Quantum Spinner (loader) — More vivid ────────────────────────────── */
.quantum-spinner {
  border-top-color: var(--color-primary) !important;
  border-right-color: rgba(0, 240, 255, 0.2) !important;
  border-bottom-color: var(--color-secondary) !important;
  border-left-color: rgba(255, 0, 127, 0.2) !important;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2) !important;
}

/* ── Selection Color ─────────────────────────────────────────────────── */
::selection {
  background: rgba(0, 240, 255, 0.25);
  color: #fff;
}
::-moz-selection {
  background: rgba(0, 240, 255, 0.25);
  color: #fff;
}

/* ── Popular Writers Card ─────────────────────────────────────────────── */
.popular-writer-card {
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  transition: all 0.3s ease !important;
}
.popular-writer-card:hover {
  border-color: rgba(0, 240, 255, 0.25) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 16px rgba(0, 240, 255, 0.08) !important;
  transform: translateY(-4px) !important;
}

/* ── Streak Badge — More Vibrant ─────────────────────────────────────── */
.streak-badge {
  background: rgba(255, 145, 0, 0.12) !important;
  border: 1px solid rgba(255, 145, 0, 0.35) !important;
  box-shadow: 0 0 12px rgba(255, 145, 0, 0.15) !important;
}

/* ── Light Theme Overrides ───────────────────────────────────────────── */
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(124, 77, 255, 0.06) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 85% 75%, rgba(0, 180, 230, 0.06) 0%, transparent 60%);
}
[data-theme="light"] .app-header {
  background: rgba(248, 250, 255, 0.88) !important;
  border: 1px solid rgba(124, 77, 255, 0.18) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12) !important;
}
[data-theme="light"] .logo-text {
  background: linear-gradient(135deg, #1e0a4e 0%, #7c4dff 50%, #FF007F 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
[data-theme="light"] .blackhole-hero-section {
  background:
    radial-gradient(circle at 50% 60%, rgba(0, 180, 230, 0.06) 0%, transparent 55%),
    linear-gradient(160deg, rgba(240, 244, 255, 0.95) 0%, rgba(225, 230, 255, 0.98) 100%) !important;
  border: 1px solid rgba(124, 77, 255, 0.15) !important;
}
[data-theme="light"] .blackhole-hero-section h1 {
  background: linear-gradient(135deg, #1e0a4e 0%, #7c4dff 50%, #FF007F 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* ==========================================================================
   LIGHT THEME — COMPREHENSIVE FIXES
   ========================================================================== */

/* Buttons in light mode */
[data-theme="light"] .btn-secondary {
  background: rgba(15, 23, 42, 0.06) !important;
  color: var(--text-primary) !important;
  border: 1px solid rgba(15, 23, 42, 0.15) !important;
}
[data-theme="light"] .btn-secondary:hover {
  background: rgba(15, 23, 42, 0.1) !important;
  border-color: rgba(15, 23, 42, 0.25) !important;
}
[data-theme="light"] .btn-secondary.active {
  background: var(--color-primary) !important;
  color: #fff !important;
  border-color: var(--color-primary) !important;
}

/* User profile button */
[data-theme="light"] .user-profile-btn {
  background: rgba(15, 23, 42, 0.05) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: var(--text-primary) !important;
}
[data-theme="light"] .user-profile-btn:hover {
  background: rgba(15, 23, 42, 0.08) !important;
}

/* Category tabs */
[data-theme="light"] .category-tab {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  color: var(--text-secondary) !important;
}
[data-theme="light"] .category-tab:hover,
[data-theme="light"] .category-tab.active {
  background: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: #fff !important;
}

/* Font scale buttons in reader (light mode) */
[data-theme="light"] .scale-btn {
  background: rgba(15, 23, 42, 0.05) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: var(--text-primary) !important;
}
[data-theme="light"] .font-select {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: var(--text-primary) !important;
}

/* Admin table in light mode */
[data-theme="light"] .admin-table th {
  background: rgba(15, 23, 42, 0.05) !important;
  color: var(--text-primary) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}
[data-theme="light"] .admin-table td {
  border-color: rgba(15, 23, 42, 0.05) !important;
  color: var(--text-primary) !important;
}
[data-theme="light"] .admin-table tr:hover td {
  background: rgba(124, 77, 255, 0.03) !important;
}
[data-theme="light"] .admin-header h1 {
  color: var(--text-primary) !important;
}

/* Search box */
[data-theme="light"] .search-box {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}
[data-theme="light"] .search-box:focus-within {
  background: #fff !important;
  border-color: var(--color-primary) !important;
}

/* Modal content */
[data-theme="light"] .modal-content {
  background: rgba(255, 255, 255, 0.97) !important;
}

/* Theme toggle */
[data-theme="light"] .theme-toggle {
  color: var(--text-primary) !important;
}
[data-theme="light"] .theme-toggle:hover {
  background: rgba(15, 23, 42, 0.07) !important;
}

/* Reader toolbar in light mode */
[data-theme="light"] .reader-control-bar {
  background: rgba(248, 250, 252, 0.96) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  backdrop-filter: blur(12px) !important;
}

/* ==========================================================================
   DARK THEME — ENHANCED SPACE AESTHETICS
   ========================================================================== */

/* Improved header glow in dark mode */
[data-theme="dark"] .app-header {
  background: rgba(3, 5, 18, 0.75) !important;
  border: 1px solid rgba(0, 240, 255, 0.12) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 240, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

/* Deeper glass cards in dark mode */
[data-theme="dark"] .top-book-card {
  background: rgba(8, 12, 28, 0.7) !important;
  border: 1px solid rgba(0, 240, 255, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="dark"] .top-book-card:hover {
  border-color: rgba(0, 240, 255, 0.35) !important;
  box-shadow: 0 12px 35px rgba(0, 240, 255, 0.12), 0 0 0 1px rgba(0, 240, 255, 0.2) !important;
}

/* ==========================================================================
   READING MODES — NEW THEMES
   ========================================================================== */

/* Night Blue Reader (🌙) */
.theme-nightblue {
  background: linear-gradient(180deg, #06081a 0%, #080f2e 100%) !important;
  color: #c8d6f0 !important;
}
.theme-nightblue .reader-control-bar {
  background: rgba(6, 10, 36, 0.88) !important;
  border-bottom: 1px solid rgba(100, 140, 255, 0.2) !important;
}
.theme-nightblue .reader-book-meta h3,
.theme-nightblue .reader-book-meta p {
  color: #93b4ff !important;
}
.theme-nightblue .reader-main-container h1 {
  color: #bdd4ff !important;
  text-shadow: 0 0 20px rgba(100, 140, 255, 0.25);
}
.theme-nightblue .reader-content-paragraphs p {
  color: #c8d6f0 !important;
  line-height: 1.92;
  letter-spacing: 0.015em;
}
.theme-nightblue .paragraph-bubble-btn {
  background: rgba(100, 140, 255, 0.08);
  border-color: rgba(100, 140, 255, 0.2);
  color: #93b4ff;
}
.theme-nightblue .reader-navigation-footer {
  border-top-color: rgba(100, 140, 255, 0.15) !important;
}

/* Forest Reader (🌿) */
.theme-forest {
  background: linear-gradient(180deg, #0a1a0e 0%, #061208 100%) !important;
  color: #c6ddc9 !important;
}
.theme-forest .reader-control-bar {
  background: rgba(10, 22, 12, 0.88) !important;
  border-bottom: 1px solid rgba(50, 180, 80, 0.18) !important;
}
.theme-forest .reader-book-meta h3,
.theme-forest .reader-book-meta p {
  color: #7dc888 !important;
}
.theme-forest .reader-main-container h1 {
  color: #a8d8b0 !important;
  text-shadow: 0 0 18px rgba(50, 180, 80, 0.2);
}
.theme-forest .reader-content-paragraphs p {
  color: #c6ddc9 !important;
  line-height: 1.9;
  font-size: 1.02em;
}
.theme-forest .paragraph-bubble-btn {
  background: rgba(50, 180, 80, 0.08);
  border-color: rgba(50, 180, 80, 0.2);
  color: #7dc888;
}
.theme-forest .reader-navigation-footer {
  border-top-color: rgba(50, 180, 80, 0.12) !important;
}

/* ==========================================================================
   ADMIN PANEL — VISUAL IMPROVEMENTS
   ========================================================================== */

.admin-header {
  margin-bottom: 1.8rem;
}
.admin-header h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  vertical-align: middle;
}
.admin-controls-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.admin-controls-bar .btn-secondary.active {
  background: var(--color-primary) !important;
  color: #fff !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}
.admin-table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.admin-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}
.admin-table tr:last-child td {
  border-bottom: none;
}
.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease;
}




/* ==========================================================================
   AUDIOBOOK HUB — Sesli Kitap Merkezi
   ========================================================================== */

.audiobook-page {
  padding-bottom: 120px;
}

.audiobook-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.audiobook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.ab-book-card {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ab-book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.ab-card-cover-wrap {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124,77,255,0.3), rgba(0,229,255,0.2));
}
.ab-card-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ab-card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  padding: 12px;
  text-align: center;
}
.ab-card-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,229,255,0.9);
  color: #000;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.ab-card-info {
  padding: 16px;
}
.ab-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 4px;
}
.ab-card-author {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.ab-card-category {
  font-size: 0.75rem;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.ab-chapter-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.ab-chapter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  gap: 8px;
  cursor: pointer;
}
.ab-chapter-item:hover {
  background: rgba(124,77,255,0.08);
  border-color: rgba(124,77,255,0.2);
}
.ab-chapter-item.playing {
  background: rgba(0,229,255,0.1);
  border-color: rgba(0,229,255,0.3);
}

.ab-ch-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.ab-ch-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-primary);
  min-width: 18px;
}
.ab-ch-title {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ab-ch-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ab-offline-dot {
  font-size: 0.9rem;
}

/* Sticky bottom audio player bar */
.ab-player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: auto;
  background: rgba(6, 5, 16, 0.97);
  border-top: 1px solid rgba(0,229,255,0.2);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 9990;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  transition: transform 0.3s ease;
}
.ab-player-bar.minimized {
  transform: translateY(calc(100% - 52px));
}

.ab-player-cover {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(124,77,255,0.3);
  flex-shrink: 0;
  overflow: hidden;
}
.ab-player-info {
  flex: 1;
  min-width: 0;
}
.ab-player-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ab-player-chapter {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ab-player-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ab-ctrl-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: #fff;
  transition: all 0.2s ease;
  padding: 0;
}
.ab-ctrl-btn:hover {
  background: rgba(0,229,255,0.15);
  border-color: rgba(0,229,255,0.4);
}
.ab-play-btn {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border: none;
  font-size: 1rem;
  color: #000;
}

.ab-player-seek-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 2;
  min-width: 160px;
}
.ab-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: monospace;
  white-space: nowrap;
}
.ab-seek-slider {
  flex: 1;
  accent-color: var(--color-primary);
  height: 4px;
  cursor: pointer;
}

.ab-player-extra {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ab-speed-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 8px;
  padding: 4px 6px;
  font-size: 0.78rem;
  cursor: pointer;
}

/* ==========================================================================
   NOTES PAGE
   ========================================================================== */

.notes-page {
  padding-bottom: 40px;
}

.notes-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.note-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.note-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

/* ==========================================================================
   MOBILE EDITOR FIXES
   ========================================================================== */

@media (max-width: 900px) {
  .editor-layout {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - 95px) !important;
    overflow: hidden !important;
    position: relative !important;
  }

  /* Hide side panels on mobile by default, show content. Do not use !important here so JS style.display can override it */
  .editor-chapters-panel,
  .editor-world-drawer {
    display: none;
  }

  /* When side panels are shown by JS on mobile, style them as fixed overlays */
  .editor-chapters-panel[style*="display: flex"],
  .editor-chapters-panel[style*="display: block"],
  .editor-world-drawer[style*="display: flex"],
  .editor-world-drawer[style*="display: block"] {
    display: flex !important;
    position: fixed !important;
    top: 140px !important; /* height of header + mobile toggle bar */
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 140px) !important;
    z-index: 1001 !important;
    background: #080c1c !important;
    border: none !important;
    padding: 16px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8) !important;
    overflow-y: auto !important;
    flex-direction: column !important;
  }

  .editor-main {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .editor-header {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 12px !important;
    background: rgba(6,5,16,0.98) !important;
    border-bottom: 1px solid var(--border-color) !important;
    position: static !important; /* Not sticky, flows inside editor-main */
    z-index: 100 !important;
  }

  .editor-title-input {
    width: 100% !important;
    font-size: 1rem !important;
  }

  /* CRITICAL: Make editor actions always visible on mobile */
  .editor-actions,
  #editorActions {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 6px !important;
    padding-bottom: 4px !important;
    width: 100% !important;
    align-items: center !important;
  }
  #editorActions::-webkit-scrollbar { display: none !important; }

  #editorActions .btn,
  #editorActions select,
  #editorActions input,
  #editorActions div {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  /* Editor toolbar — scrollable horizontal on mobile */
  #editorToolbar,
  .editor-toolbar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 6px !important;
    padding: 8px !important;
  }
  .editor-toolbar::-webkit-scrollbar,
  #editorToolbar::-webkit-scrollbar { display: none !important; }

  .editor-body-wrap {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 12px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .rich-editor-area {
    flex: 1 !important;
    min-height: 250px !important;
    font-size: 1rem !important;
    padding: 12px !important;
  }

  /* Publish button always visible */
  #editorSaveBtn {
    display: inline-flex !important;
    flex-shrink: 0 !important;
  }

  /* Mobile toggle buttons for side panels */
  .editor-mobile-toggle-bar {
    display: flex !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    background: rgba(0,0,0,0.3) !important;
    border-bottom: 1px solid var(--border-color) !important;
    overflow-x: auto !important;
  }
}

@media (min-width: 901px) {
  .editor-mobile-toggle-bar { display: none !important; }
}

/* ==========================================================================
   PROFILE PAGE IMPROVEMENTS
   ========================================================================== */

.detail-tab-btn.active {
  color: var(--color-primary) !important;
  border-bottom: 2px solid var(--color-primary) !important;
  font-weight: 600 !important;
}

.profile-hero-card {
  background: linear-gradient(135deg, rgba(124,77,255,0.1) 0%, rgba(0,229,255,0.05) 100%);
  border: 1px solid rgba(124,77,255,0.2);
}

/* ==========================================================================
   AUDIOBOOK PAGE — RESPONSIVE MOBILE
   ========================================================================== */

@media (max-width: 768px) {
  .audiobook-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .audiobook-page-header {
    flex-direction: column;
  }
  .audiobook-page-header h1 {
    font-size: 1.5rem !important;
  }

  .ab-player-bar {
    flex-wrap: nowrap;
    overflow-x: hidden;
    gap: 8px;
    padding: 8px 12px;
  }
  .ab-player-bar .ab-player-seek-wrap {
    min-width: 100px;
    flex: 1;
  }
  .ab-player-bar .ab-player-extra {
    display: none;
  }
  .ab-player-bar .ab-ctrl-btn:not(.ab-play-btn):not(#abPlay) {
    display: none;
  }
  #abRewind, #abForward, #abPrev, #abNext {
    display: flex !important;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }
  .notes-page-header {
    flex-direction: column;
    gap: 12px;
  }
}

/* ==========================================================================
   DASHBOARD — AUDIO STUDIO TAB
   ========================================================================== */

@media (max-width: 768px) {
  .dashboard-container {
    flex-direction: column !important;
  }
  .dashboard-nav {
    flex-direction: row !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    gap: 4px !important;
    padding: 8px !important;
    scrollbar-width: none !important;
  }
  .dashboard-nav::-webkit-scrollbar { display: none !important; }
  .db-nav-item {
    flex-shrink: 0 !important;
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
  }
  #dbCreateBookBtn {
    flex-shrink: 0 !important;
    margin-top: 0 !important;
    width: auto !important;
  }
}

/* ==========================================================================
   MOBILE BOTTOM NAV — stays above audio player
   ========================================================================== */

.mobile-bottom-nav {
  z-index: 9991 !important;
}

/* When audio player is active, shift bottom nav up */
body.audio-playing .mobile-bottom-nav {
  bottom: 80px !important;
}

/* ==========================================================================
   WRITING ASSISTANT MOBILE FIX
   ========================================================================== */

@media (max-width: 900px) {
  .ai-assistant-panel,
  #aiAssistantPanel,
  .ai-writing-assistant {
    position: fixed !important;
    bottom: 80px !important;
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    width: auto !important;
    z-index: 9998 !important;
    max-height: 60vh !important;
    overflow-y: auto !important;
    border-radius: 16px !important;
  }
}


/* ==========================================================================
   STORYTEL-LIKE AUDIOBOOK PLAYER OVERLAY & SPINNING VINYL
   ========================================================================== */
.ab-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #03050c;
  z-index: 9995;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  color: #fff;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.ab-detail-blur-bg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(50px) brightness(0.2);
  z-index: 1;
  opacity: 0.6;
  pointer-events: none;
}
.ab-detail-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 500px;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}
.ab-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px;
}
.ab-detail-back {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.1rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
}
.ab-detail-back:hover {
  background: rgba(255, 255, 255, 0.15);
}
.ab-detail-menu-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.1rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
}
.ab-detail-menu-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
.ab-detail-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 16px 0;
}

/* Vinyl disk */
.ab-vinyl-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 15px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.ab-vinyl-glow {
  position: absolute;
  width: 285px;
  height: 285px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.3) 0%, transparent 70%);
  filter: blur(15px);
  z-index: 1;
  transition: transform 0.5s ease;
}
.ab-vinyl-disk {
  position: relative;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: radial-gradient(circle, #2c2c2c 0%, #0d0d0d 100%);
  box-shadow: 0 12px 36px rgba(0,0,0,0.6), inset 0 0 1px rgba(255,255,255,0.2);
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.ab-vinyl-disk.playing {
  animation: spin 20s linear infinite;
}
.ab-vinyl-disk.paused {
  animation: spin 20s linear infinite;
  animation-play-state: paused;
}
.ab-vinyl-grooves {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle,
    rgba(0, 0, 0, 0.8) 0px,
    rgba(0, 0, 0, 0.8) 1px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(0, 0, 0, 0.8) 3px
  );
  pointer-events: none;
  opacity: 0.8;
}
.ab-vinyl-center-label {
  position: relative;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--color-primary);
  border: 3px solid #000;
  z-index: 3;
  box-shadow: 0 0 10px rgba(0,0,0,0.8);
}
.ab-vinyl-center-hole {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #03050c;
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 4;
}

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

.ab-detail-meta {
  text-align: center;
  width: 100%;
}
.ab-detail-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 6px 0;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ab-detail-author {
  font-size: 0.95rem;
  color: var(--color-secondary);
  margin: 0 0 10px 0;
  font-weight: 500;
}
.ab-detail-chapter {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  padding: 4px 14px;
  border-radius: 20px;
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.05);
}

.ab-detail-progress-section {
  width: 100%;
  margin-top: 10px;
}
.ab-detail-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-bottom: 6px;
}
.ab-detail-seek-slider {
  width: 100%;
  accent-color: var(--color-primary);
  background: rgba(255,255,255,0.1);
  height: 5px;
  border-radius: 99px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.ab-detail-seek-slider::-webkit-slider-runnable-track {
  height: 5px;
}
.ab-detail-seek-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px var(--color-primary);
  margin-top: -4px;
}

.ab-detail-extra-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 16px;
  border-radius: 12px;
}
.ab-detail-icon-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
}
.ab-detail-icon-btn:hover {
  background: rgba(255,255,255,0.05);
}

.ab-detail-controls-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 15px;
}
.ab-detail-ctrl-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.1rem;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}
.ab-detail-ctrl-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.3);
  transform: scale(1.05);
}
.ab-detail-play-btn {
  width: 62px;
  height: 62px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border: none;
  color: #000;
  font-size: 1.4rem;
  box-shadow: 0 8px 24px rgba(124, 77, 255, 0.3);
}
.ab-detail-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 30px rgba(124, 77, 255, 0.5);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

/* Chapter List Drawer inside Modal */
.ab-detail-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: rgba(10, 8, 20, 0.96);
  border-top: 1px solid rgba(0, 229, 255, 0.2);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  backdrop-filter: blur(20px);
  z-index: 5;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.8);
}
.ab-detail-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.ab-detail-drawer-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ab-detail-drawer-item {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: .2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
}
.ab-detail-drawer-item:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.2);
}
.ab-detail-drawer-item.active {
  background: rgba(124, 77, 255, 0.15);
  border-color: rgba(124, 77, 255, 0.3);
  font-weight: bold;
}
.ab-detail-sleep-timer-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff1744;
  color: #fff;
  border-radius: 50%;
  font-size: 0.65rem;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}


/* ==========================================================================
   NOVEL EDITOR THEMES & ZEN MODE
   ========================================================================== */
.rich-editor-area {
  transition: all 0.3s ease;
}
.rich-editor-area.theme-violet {
  background: linear-gradient(135deg, #120b24, #05020c) !important;
  color: #e9d5ff !important;
  border-color: rgba(168, 85, 247, 0.4) !important;
  box-shadow: inset 0 0 20px rgba(168, 85, 247, 0.1);
}
.rich-editor-area.theme-nebula {
  background: linear-gradient(135deg, #02121e, #01060d) !important;
  color: #ccfbf1 !important;
  border-color: rgba(0, 229, 255, 0.3) !important;
  box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.08);
}
.rich-editor-area.theme-sepia {
  background: #fbf0d9 !important;
  color: #433422 !important;
  border-color: #d2c1a5 !important;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.02) !important;
  text-shadow: none !important;
}

/* Zen Mode Active Layout Class */
.editor-layout.zen-active #editorChaptersPanel,
.editor-layout.zen-active #editorWorldDrawer,
.editor-layout.zen-active #editorAiPanel {
  display: none !important;
}
.editor-layout.zen-active main.editor-main {
  flex: 1 !important;
  max-width: 800px !important;
  margin: 0 auto !important;
  padding: 10px 24px !important;
  background: transparent !important;
}
.editor-layout.zen-active .editor-body-wrap {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* ==========================================================================
   RESPONSIVE OVERRIDES (MOBILE & TABLET)
   ========================================================================== */

/* Novel Editor Layout collapse on Mobile */
@media (max-width: 991px) {
  .editor-layout {
    flex-direction: column !important;
    height: auto !important;
    min-height: 100vh !important;
  }
  #editorChaptersPanel,
  #editorWorldDrawer,
  #editorAiPanel {
    width: 100% !important;
    border-right: none !important;
    border-left: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    max-height: 350px !important;
    overflow-y: auto !important;
  }
  main.editor-main {
    padding: 16px !important;
  }
}

/* Drawing Studio (Webtoon Studio) Mobile responsive */
@media (max-width: 900px) {
  .drawing-studio-wrapper {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto 1fr !important;
  }
  .drawing-studio-sidebar-left {
    position: fixed !important;
    left: -240px;
    top: 60px;
    bottom: 0;
    width: 230px !important;
    z-index: 9999 !important;
    background: rgba(10, 8, 20, 0.98) !important;
    border-right: 1px solid var(--border-color) !important;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .drawing-studio-sidebar-left.active {
    left: 0 !important;
  }
  .drawing-studio-sidebar-right {
    position: fixed !important;
    right: -240px;
    top: 60px;
    bottom: 0;
    width: 230px !important;
    z-index: 9999 !important;
    background: rgba(10, 8, 20, 0.98) !important;
    border-left: 1px solid var(--border-color) !important;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .drawing-studio-sidebar-right.active {
    right: 0 !important;
  }
  
  /* Make sure header button wrap works nicely on mobile */
  .drawing-studio-header {
    flex-direction: column !important;
    height: auto !important;
    padding: 12px !important;
    gap: 10px !important;
  }
  .drawing-studio-header div:last-child {
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
}

/* Sound Studio (Ses Stüdyosu) responsive grids */
@media (max-width: 900px) {
  #studioLayoutGrid {
    grid-template-columns: 1fr !important;
  }
  #studioChapterListDrawer {
    border-right: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    max-height: 250px !important;
    overflow-y: auto !important;
  }
  #studioMainContentArea {
    padding: 16px !important;
  }
}

/* Storytel audiobook detail modal responsive layout tweaks */
@media (max-width: 480px) {
  .ab-detail-container {
    padding: 16px !important;
  }
  .ab-vinyl-wrapper {
    width: 220px !important;
    height: 220px !important;
  }
  .ab-vinyl-glow {
    width: 225px !important;
    height: 225px !important;
  }
  .ab-vinyl-disk {
    width: 210px !important;
    height: 210px !important;
  }
  .ab-vinyl-center-label {
    width: 80px !important;
    height: 80px !important;
  }
  .ab-detail-title {
    font-size: 1.25rem !important;
  }
  .ab-detail-ctrl-btn {
    width: 40px !important;
    height: 40px !important;
    font-size: 1rem !important;
  }
  .ab-detail-play-btn {
    width: 54px !important;
    height: 54px !important;
    font-size: 1.2rem !important;
  }
}

/* ==========================================================================
   RPG SPACE MAP & CHARACTER SIDEBAR EXTENSIONS
   ========================================================================== */

#charactersSidebar {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.3s ease;
}

#charactersSidebar:not(.active) {
  width: 0 !important;
  border-right: none !important;
  overflow: hidden;
}

.character-guide-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.character-guide-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.15);
  border-color: var(--color-primary) !important;
}

.character-card-img {
  transition: transform 0.3s ease;
}

.character-guide-card:hover .character-card-img {
  transform: scale(1.04);
}

/* Galaxy map planet node styling */
.planet-system-node {
  transition: transform 0.2s ease;
}

.planet-sphere-glow {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.planet-sphere-glow:hover {
  transform: scale(1.18);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.6) !important;
}

/* Spaceship hover animation */
@keyframes spaceshipHover {
  0% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-10px); }
  100% { transform: translate(-50%, -50%) translateY(0); }
}

/* Pulse Glow for claimable planet */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.85), 0 0 35px rgba(0, 229, 255, 0.4);
    transform: scale(1.08);
  }
  100% {
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    transform: scale(1);
  }
}

.pulse-glow {
  animation: pulseGlow 2s infinite ease-in-out;
}

@media (max-width: 768px) {
  #charactersSidebar {
    position: fixed !important;
    top: 70px;
    left: -280px;
    height: calc(100vh - 70px);
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: rgba(10, 10, 20, 0.98) !important;
    backdrop-filter: blur(15px);
  }
  #charactersSidebar.active {
    left: 0 !important;
    width: 280px !important;
  }
  #closeCharactersSidebarBtn {
    display: inline-block !important;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
  }
}

/* ==========================================================================
   CO-READING GUILDS, WORMHOLE & DASHBOARD STYLES
   ========================================================================== */

.wormhole-visual {
  transition: transform 0.5s ease;
}

@media (max-width: 900px) {
  .dashboard-nav {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    gap: 10px !important;
    padding: 8px 4px !important;
    border-bottom: 1px solid var(--border-color) !important;
    scrollbar-width: thin !important;
    border-right: none !important;
    margin-bottom: 1.5rem !important;
  }
  .db-nav-item {
    flex-shrink: 0 !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    background: rgba(255, 255, 255, 0.02) !important;
    font-size: 0.85rem !important;
    margin: 0 !important;
  }
  .db-nav-item.active {
    background: rgba(0, 229, 255, 0.1) !important;
    border-color: #00e5ff !important;
    color: #00e5ff !important;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2) !important;
  }
  #dbCreateBookBtn {
    display: none !important;
  }
}

/* ==========================================================================
   AUDIO GALAXY (SES GALAKSISI) PREMIUM STYLES
   ========================================================================== */

.blackhole-hero-section {
  background: radial-gradient(circle at center, rgba(12, 10, 28, 0.6) 0%, rgba(3, 2, 10, 0.9) 100%), 
              url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%237c4dff' fill-opacity='0.08'%3E%3Cpath fill-rule='evenodd' d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zM11 61c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm74-2c0 3.866-3.134 7-7 7s-7-3.134-7-7 3.134-7 7-7 7 3.134 7 7zM34 38c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 31c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zM68 68c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zM53 15c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm-20 6c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm40 18c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3z'/%3E%3C/g%3E%3C/svg%3E");
  border: 1px solid rgba(124, 77, 255, 0.25) !important;
  box-shadow: 0 0 30px rgba(124, 77, 255, 0.15), inset 0 0 20px rgba(0, 229, 255, 0.05) !important;
  padding: 50px 30px !important;
  border-radius: 24px !important;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.blackhole-hero-section h1 {
  background: linear-gradient(135deg, #fff 30%, #00e5ff 70%, #7c4dff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  text-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
  letter-spacing: 1px;
}

.ab-featured-card {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ab-featured-card:hover {
  border-color: rgba(0, 229, 255, 0.4) !important;
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.15) !important;
}

/* Vinyl disk rotating & glow effects */
.ab-vinyl-wrapper {
  position: relative;
  width: 250px;
  height: 250px;
  margin: 0 auto 20px auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ab-vinyl-glow {
  position: absolute;
  width: 256px;
  height: 256px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,255,0.15) 0%, rgba(124,77,255,0.15) 50%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}

.ab-vinyl-disk {
  position: relative;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: #0d0e12;
  border: 4px solid #1a1c23;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  z-index: 2;
  overflow: hidden;
}

/* Vinyl rotation animation state triggers */
.ab-vinyl-disk.playing {
  animation: spinVinyl 12s linear infinite;
}

.ab-vinyl-disk.paused {
  animation-play-state: paused;
}

@keyframes spinVinyl {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Eclipse animation for vinyl disk wrapper background */
.ab-vinyl-disk.playing ~ .ab-vinyl-glow {
  animation: pulseEclipse 6s ease-in-out infinite alternate;
}

@keyframes pulseEclipse {
  0% {
    transform: scale(0.95);
    background: radial-gradient(circle, rgba(0,229,255,0.2) 0%, rgba(124,77,255,0.15) 50%, transparent 70%);
  }
  100% {
    transform: scale(1.05);
    background: radial-gradient(circle, rgba(124,77,255,0.25) 0%, rgba(0,229,255,0.2) 50%, transparent 75%);
  }
}

/* Soundwave Equalizer visualizer */
.ab-visualizer-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  height: 35px;
  margin: 15px auto;
  opacity: 0.7;
}

.ab-visual-bar {
  width: 3px;
  height: 4px;
  background: #00e5ff;
  border-radius: 2px;
  box-shadow: 0 0 5px #00e5ff;
  transition: height 0.15s ease;
}

.ab-visualizer-container.playing .bar-1 { animation: bounceBar1 0.8s ease-in-out infinite alternate; }
.ab-visualizer-container.playing .bar-2 { animation: bounceBar2 1.1s ease-in-out infinite alternate; }
.ab-visualizer-container.playing .bar-3 { animation: bounceBar3 0.9s ease-in-out infinite alternate; }
.ab-visualizer-container.playing .bar-4 { animation: bounceBar4 1.3s ease-in-out infinite alternate; }
.ab-visualizer-container.playing .bar-5 { animation: bounceBar2 1s ease-in-out infinite alternate; }
.ab-visualizer-container.playing .bar-6 { animation: bounceBar1 1.2s ease-in-out infinite alternate; }
.ab-visualizer-container.playing .bar-7 { animation: bounceBar3 0.85s ease-in-out infinite alternate; }
.ab-visualizer-container.playing .bar-8 { animation: bounceBar4 0.95s ease-in-out infinite alternate; }

/* Different heights for natural bounce */
@keyframes bounceBar1 { 0% { height: 4px; } 100% { height: 28px; } }
@keyframes bounceBar2 { 0% { height: 6px; } 100% { height: 32px; } }
@keyframes bounceBar3 { 0% { height: 3px; } 100% { height: 22px; } }
@keyframes bounceBar4 { 0% { height: 5px; } 100% { height: 35px; } }

/* Global Premium Styling Polish */
/* Sleek custom scrollbars for webkit engines */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 10, 20, 0.4);
}
::-webkit-scrollbar-thumb {
  background: rgba(124, 77, 255, 0.25);
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.1);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.4);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* Premium Card hover glow overrides */
.glass {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s, box-shadow 0.25s !important;
}
.glass:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 229, 255, 0.18) !important;
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.08) !important;
}

/* Premium input focus glows */
.form-control:focus, select:focus {
  border-color: #00e5ff !important;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

/* Pulsing premium button glows */
.btn-primary {
  background: linear-gradient(135deg, #7c4dff, #00e5ff) !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.15) !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.35) !important;
}

/* ==========================================================================
   COMPREHENSIVE MOBILE FIXES — All Pages & Sections
   Applied at max-width: 1024px (all mobile & small tablet sizes)
   ========================================================================== */
@media (max-width: 1024px) {

  /* ── Mobile Dropdown Menu Link Styles ── */
  .mobile-nav-link {
    display: block !important;
    color: #fff !important;
    text-decoration: none !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    transition: background 0.2s, border-color 0.2s, color 0.2s !important;
  }
  .mobile-nav-link:hover,
  .mobile-nav-link:active {
    background: rgba(0, 229, 255, 0.08) !important;
    border-color: rgba(0, 229, 255, 0.2) !important;
    color: #00e5ff !important;
  }

  /* ── User action buttons inside Menü ── */
  #mobileMenuUserActions .btn {
    width: 100% !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
    font-size: 0.9rem !important;
    text-align: left !important;
  }
  #mobileMenuUserActions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  /* ── Profile page: horizontal scrollable tabs ── */
  .detail-tabs-header {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 0 !important;
    gap: 4px !important;
    white-space: nowrap !important;
  }
  .detail-tabs-header::-webkit-scrollbar { display: none !important; }
  .detail-tab-btn {
    flex-shrink: 0 !important;
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
  }

  /* ── Profile header info: wrap cleanly ── */
  .profile-header-wrap {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 12px !important;
  }
  .profile-stats-row {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  /* ── Book cards in grid: max 2 columns ── */
  .books-grid,
  .home-books-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* ── Planet categories: hide native scrollbars, keep touch scroll ── */
  .planet-categories-grid {
    padding: 10px 0 !important;
  }

  /* ── Popular writers: horizontal scroll single row ── */
  .popular-writers-list {
    grid-template-columns: unset !important;
    display: flex !important;
    overflow-x: auto !important;
    gap: 12px !important;
    padding-bottom: 10px !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .popular-writers-list::-webkit-scrollbar { display: none !important; }
  .popular-writer-card {
    flex: 0 0 120px !important;
    min-width: 120px !important;
  }

  /* ── Home universe tab switcher ── */
  .home-universe-switcher {
    gap: 6px !important;
    padding: 6px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .home-universe-switcher::-webkit-scrollbar { display: none !important; }
  .home-universe-tab {
    flex-shrink: 0 !important;
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
    white-space: nowrap !important;
  }

  /* ── Blackhole hero section ── */
  .blackhole-hero-section {
    padding: 20px 15px !important;
    border-radius: 12px !important;
    margin-bottom: 1.5rem !important;
  }
  .blackhole-hero-section h1 {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }

  /* ── Reader view: remove sidebar on mobile ── */
  .reader-main {
    padding: 12px !important;
  }
  .reading-content {
    font-size: 1rem !important;
    padding: 12px !important;
  }

  /* ── Dashboard analytics card layout ── */
  .analytics-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .analytics-stat-box {
    padding: 16px !important;
  }

  /* ── Dashboard writer panel: single column ── */
  .dashboard-content-area {
    padding: 12px !important;
  }
  .book-list-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* ── Modal content: full-width on small screens ── */
  .modal-content {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    margin: 12px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    border-radius: 16px !important;
  }

  /* ── Footer: single column ── */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .app-footer {
    display: none !important;
  }

  /* ── Page container padding ── */
  .page-container {
    padding: 12px !important;
  }

  /* ── Contest cards ── */
  .contests-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* ── Market / Token store ── */
  .token-packages-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* ── Search result layout ── */
  .search-results-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── Audio studio topbar: wrap neatly ── */
  .studio-topbar {
    flex-wrap: nowrap !important;
    padding: 10px 14px !important;
    gap: 10px !important;
  }
  .studio-topbar h2 {
    font-size: 0.95rem !important;
  }
  .studio-topbar #studioSaveBtn {
    flex-shrink: 0 !important;
    padding: 7px 14px !important;
    font-size: 0.78rem !important;
  }

  /* ── Audiobook player bar: compact on mobile ── */
  .ab-player-bar {
    flex-wrap: wrap !important;
    padding: 8px 10px !important;
    gap: 6px !important;
    height: auto !important;
  }
  .ab-player-extra {
    gap: 8px !important;
  }

  /* ── Space bg canvas: don't overflow ── */
  #space-bg {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: -1 !important;
  }
}

/* ==========================================================================
   SMALL PHONE SPECIFIC — max-width: 480px
   ========================================================================== */
@media (max-width: 480px) {

  /* Book cards: single column on tiny screens */
  .books-grid,
  .home-books-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  /* Top 10 book card size */
  .top-book-card {
    flex: 0 0 130px !important;
    width: 130px !important;
  }

  /* Token packages: 1 column */
  .token-packages-grid {
    grid-template-columns: 1fr !important;
  }

  /* Mobile nav icons: slightly smaller */
  .mobile-nav-item .nav-icon {
    font-size: 1.1rem !important;
  }
  .mobile-nav-item .nav-label {
    font-size: 0.62rem !important;
  }

  /* Planet category names: shorter text */
  .planet-category-card {
    padding: 10px 8px !important;
    font-size: 0.72rem !important;
  }
}

/* ==========================================================================
   NEON AVATAR FRAMES & JETON MARKET
   ========================================================================== */

/* Wrapper for profile images to apply frames */
.avatar-frame-wrap {
  position: relative;
  display: inline-block;
  border-radius: 50%;
  padding: 3px;
  background: transparent;
  transition: all 0.3s ease;
}

/* 1. Supernova (Neon Red) Frame */
.frame-supernova {
  background: linear-gradient(135deg, #ff0055, #ff5500);
  box-shadow: 0 0 10px #ff0055, inset 0 0 5px rgba(255, 85, 0, 0.5);
  animation: pulseFrameSupernova 2s infinite alternate;
}

@keyframes pulseFrameSupernova {
  0% { transform: scale(1); box-shadow: 0 0 8px #ff0055; }
  100% { transform: scale(1.03); box-shadow: 0 0 16px #ff5500, 0 0 4px #ff0055; }
}

/* 2. Saturn Ring (Glow Gold) Frame */
.frame-saturn {
  background: linear-gradient(135deg, #ffd700, #ff8c00, #ffd700);
  background-size: 200% 200%;
  box-shadow: 0 0 10px #ffd700, inset 0 0 4px rgba(255, 215, 0, 0.4);
  animation: rotateSaturnFrame 4s linear infinite;
}

@keyframes rotateSaturnFrame {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 3. Comet Pulse (Aqua/Violet Gradient) Frame */
.frame-comet {
  background: linear-gradient(135deg, #00e5ff, #7c4dff, #ff007f);
  background-size: 300% 300%;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.8), 0 0 5px rgba(124, 77, 255, 0.5);
  animation: cometSpinFrame 5s linear infinite;
}

@keyframes cometSpinFrame {
  0% { background-position: 0% 50%; filter: hue-rotate(0deg); }
  50% { background-position: 100% 50%; filter: hue-rotate(180deg); }
  100% { background-position: 0% 50%; filter: hue-rotate(360deg); }
}

/* Shop frame preview layout */
.frame-preview-card {
  padding: 15px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.frame-preview-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   KOZMİK AKIŞ (SOCIAL TWITTER-LIKE FEED) STYLE
   ========================================================================== */

.social-feed-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 15px;
}

.social-composer {
  background: rgba(8, 10, 24, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(15px);
}

.social-composer-header {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.social-composer-textarea {
  flex: 1;
  background: transparent;
  border: none;
  resize: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  min-height: 80px;
}
.social-composer-textarea::placeholder {
  color: var(--text-muted);
}

.social-composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

.social-char-counter {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.social-char-counter.warning {
  color: #ffb300;
}
.social-char-counter.danger {
  color: #ff1744;
}

/* Feed post cards */
.post-card {
  background: rgba(8, 10, 24, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.post-card:hover {
  border-color: rgba(0, 229, 255, 0.15);
}

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

.post-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.post-author-name {
  font-weight: bold;
  color: #fff;
  font-size: 0.92rem;
}
.post-author-name:hover {
  color: var(--color-primary);
}

.post-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.post-content {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 16px;
  text-align: left;
}

.post-actions {
  display: flex;
  gap: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 12px;
}

.post-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-family: inherit;
  transition: color 0.15s ease, transform 0.15s ease;
  padding: 4px 8px;
  border-radius: 6px;
}
.post-action-btn:hover {
  background: rgba(255, 255, 255, 0.03);
}
.post-action-btn.like-btn:hover, .post-action-btn.like-btn.liked {
  color: #ff007f;
}
.post-action-btn.like-btn.liked svg {
  fill: #ff007f;
}
.post-action-btn.comment-btn:hover {
  color: #00e5ff;
}
.post-action-btn.delete-btn:hover {
  color: #ff1744;
}

/* Replies / comments drawer layout inside modal or expander */
.social-comments-drawer {
  margin-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 15px;
}

.social-comment-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.social-comment-details {
  flex: 1;
  text-align: left;
}

.social-comment-user {
  font-size: 0.8rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 4px;
}

.social-comment-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  word-break: break-word;
}

/* Premium Vinyl Record Card Style */
.ab-vinyl-container {
  position: relative;
  width: 100%;
  height: 180px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(8, 10, 24, 0.95), rgba(16, 20, 48, 0.95));
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ab-sleeve {
  position: relative;
  width: 120px;
  height: 120px;
  z-index: 2;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  transform: translateX(-20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ab-vinyl-record {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, #222 2px, #050505 4px, #1a1a1a 12px, #080808 20px, #2a2a2a 28px, #111 38px, #222 45px, #000 100%);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.1);
  z-index: 1;
  transform: translateX(15px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), rotate 10s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ab-vinyl-record::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 2px, transparent 3px, transparent 6px);
  pointer-events: none;
}

.ab-vinyl-label {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid #000;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2);
}

/* Hover effects */
.ab-book-card:hover .ab-sleeve {
  transform: translateX(-35px);
}

.ab-book-card:hover .ab-vinyl-record {
  transform: translateX(35px);
  animation: spinRecord 6s linear infinite;
}

@keyframes spinRecord {
  from { transform: translateX(35px) rotate(0deg); }
  to { transform: translateX(35px) rotate(360deg); }
}

.ab-detail-chapter-row:hover {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(0,229,255,0.3) !important;
  box-shadow: 0 4px 20px rgba(0,229,255,0.08);
}

.ab-detail-sleep-timer-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #eab308;
  color: #000;
  font-size: 0.68rem;
  font-weight: bold;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 5px rgba(234, 179, 8, 0.5);
  animation: pulse 1.5s infinite;
}

/* Floating Widget Button */
.floating-widget-btn {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border: none;
  color: #000;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9980;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.4), 0 0 0 2px rgba(255,255,255,0.1);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.floating-widget-btn:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 6px 24px rgba(0, 229, 255, 0.6), 0 0 15px var(--color-secondary);
}

/* Widget Drawer Layout */
.widget-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100vh;
  background: rgba(6, 5, 16, 0.98);
  border-left: 1px solid rgba(0, 229, 255, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9995;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}
.widget-drawer.active {
  right: 0;
}

.widget-drawer-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.widget-drawer-header h3 {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0;
}
#cosmoWidgetDrawerCloseBtn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.widget-drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Individual Widget Boxes */
.cosmo-widget {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.cosmo-widget h4 {
  font-size: 0.85rem;
  color: var(--color-primary);
  margin-top: 0;
  margin-bottom: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Circular Goal Tracker */
.widget-goal-container {
  display: flex;
  align-items: center;
  gap: 16px;
}
.widget-progress-circle {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(var(--color-primary) 0deg, rgba(255,255,255,0.05) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.widget-progress-circle::after {
  content: '';
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #080a18;
}
#widgetGoalPct {
  position: relative;
  z-index: 2;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

/* Mini Vinyl Disk */
.widget-mini-vinyl {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, #222 2px, #050505 4px, #1a1a1a 8px, #000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  animation: spinRecord 6s linear infinite;
  animation-play-state: paused;
  flex-shrink: 0;
}
.widget-mini-vinyl.playing {
  animation-play-state: running;
}
.widget-mini-label {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
}

