/* Novelliste - Design System (Retro 2005 Theme) */

/* =========================================
   BOOTSTRAP 5 OVERRIDES (Retro Theme)
   ========================================= */
:root {
  /* Classic 2005 Colors */
  --bs-primary: #005a9c;
  --bs-primary-rgb: 0, 90, 156;
  --bs-secondary: #666666;
  --bs-secondary-rgb: 102, 102, 102;
  --bs-body-bg: #f2f2f2;
  --bs-body-color: #333333;

  /* Link hover is classic light blue */
  --bs-link-color: #005a9c;
  --bs-link-hover-color: #0099ff;

  /* Slightly tighter rounded corners, classic style */
  --bs-border-radius: 4px;
  --bs-border-radius-sm: 2px;
  --bs-border-radius-lg: 6px;
  --bs-border-radius-xl: 6px;
  --bs-border-radius-2xl: 8px;
  --bs-border-color: #cccccc;

  /* Fonts leaning towards classic web-safe */
  --bs-font-sans-serif: Verdana, "Segoe UI", Tahoma, Arial, sans-serif;
}

/* Base Body Styles */
body {
  font-family: var(--bs-font-sans-serif);
  background-color: var(--bs-body-bg) !important;
  color: var(--bs-body-color);
  letter-spacing: -0.2px;
}

/* Links (Always underline on hover - Classic Web 2.0) */
a {
  text-decoration: none;
  transition: color 0.1s;
}

a:hover {
  text-decoration: underline !important;
  color: var(--bs-link-hover-color);
}

/* Ensure utility classes keep their colors on hover */
a.text-dark:hover {
  color: var(--bs-body-color) !important;
}

a.text-muted:hover {
  color: var(--bs-secondary) !important;
}

a.text-secondary:hover {
  color: var(--bs-secondary) !important;
}

/* Buttons (Classic Gel/Pill Gradient) */
.btn-primary,
.btn-primary:not(:disabled):not(.disabled):active {
  background-color: var(--bs-primary) !important;
  background-image: linear-gradient(to bottom,
      #0073c4 0%,
      #005a9c 100%) !important;
  border: 1px solid #00457a !important;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
  color: #fff !important;
}

.btn-primary:hover {
  background-image: linear-gradient(to bottom,
      #0082de 0%,
      #006ebf 100%) !important;
  border-color: #003661 !important;
}

/* Cards & Content Boxes (Distinct borders, no floating shadows) */
.card,
.syo-box,
.syo-container {
  background-color: #ffffff;
  border: 1px solid var(--bs-border-color) !important;
  box-shadow: none !important;
}

/* Navbar (Defined bottom border) */
.navbar {
  border-bottom: 1px solid var(--bs-border-color) !important;
  background: linear-gradient(to bottom, #ffffff 0%, #f9f9f9 100%) !important;
}

/* ========================================= */

.hover-opacity-100:hover {
  opacity: 1 !important;
  transition: opacity 0.2s;
}

.italic {
  font-style: italic;
}

.transition-all {
  transition: all 0.2s ease-in-out;
}

.hover-bg-light:hover {
  background-color: rgba(0, 0, 0, 0.03) !important;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.no-caret::after {
  display: none !important;
}

:root {
  --syo-bg: #fdfdfd;
  --syo-border: #e2e2e2;
  --syo-sidebar: #f9f9f9;
  --syo-text: #333333;
  --syo-link: #005a9c;
  --syo-accent: #6c757d;
  --syo-danger: #c0392b;
  --syo-success: #27ae60;
}

body {
  background-color: #f7f7f7;
  color: var(--syo-text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Common Layout */
.syo-container {
  background: white;
  border: 1px solid var(--syo-border);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Typography */
h1,
h2,
h3,
h4 {
  color: #000;
  font-weight: 700;
}

.syo-page-title {
  font-size: 1.5rem;
  border-bottom: 2px solid var(--syo-accent);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.syo-section-title {
  font-size: 1.1rem;
  border-left: 4px solid var(--syo-link);
  padding-left: 0.75rem;
  margin-bottom: 1rem;
}

/* Tables [REMOVED syo-table] */
/* Components */
.syo-box {
  background: #fff;
  border: 1px solid #eee;
  padding: 1rem;
  margin-bottom: 1rem;
}

.syo-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  font-weight: normal;
  display: inline-block;
}

.btn-syo {
  font-size: 0.85rem;
  border-radius: 2px;
  padding: 0.4rem 1.2rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-syo-primary {
  background: var(--syo-link);
  color: white;
  border: 1px solid var(--syo-link);
}

.btn-syo-primary:hover {
  background: #004578;
  border-color: #004578;
  color: white;
}

.btn-syo-outline {
  background: white;
  color: var(--syo-link);
  border: 1px solid var(--syo-link);
}

.btn-syo-outline:hover {
  background: var(--syo-link);
  color: white;
}

/* Links and Interactive Elements */
a {
  color: var(--syo-link);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #004578;
  text-decoration: underline;
}

/* Specific novel title styling */
.novel-title-link {
  font-weight: 700;
  color: #000;
  display: inline-block;
  padding: 0.1rem 0;
  transition: border-color 0.2s;
}

.btn-link {
  color: var(--syo-link);
  text-decoration: none;
  font-weight: 600;
}

.btn-link:hover {
  color: #004578;
  text-decoration: underline;
}

/* Legacy placeholder hide removed */

/* Cards */
.syo-card {
  background: white;
  border: 1px solid var(--syo-border);
  transition: all 0.2s;
}

.syo-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.syo-card-body {
  padding: 1.25rem;
}

.syo-card-text {
  color: #555;
  line-height: 1.5;
}

/* Utility Classes */
.x-small {
  font-size: 0.75rem;
}

.small {
  font-size: 0.85rem;
}

/* Reader Styles */
.reader-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #222;
  max-width: 100%;
  word-wrap: break-word;
}

.reader-content p {
  margin-bottom: 1.2rem;
}

/* Comment Styles */
.comment-item {
  border-left: 2px solid var(--syo-border);
  padding-left: 1rem;
  margin-bottom: 1rem;
}

.comment-content {
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* Elo Badge Styles */
.tier-badge {
  padding: 0.5rem 0.8rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Elo Badge Tiers (Portuguese) */
.tier-bronze {
  background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
  color: white;
}

.tier-prata {
  background: linear-gradient(135deg, #c0c0c0 0%, #808080 100%);
  color: white;
}

.tier-ouro {
  background: linear-gradient(135deg, #ffd700 0%, #daa520 100%);
  color: #333;
}

.tier-platina {
  background: linear-gradient(135deg, #e5e4e2 0%, #b0b0b0 100%);
  color: #333;
}

.tier-diamante {
  background: linear-gradient(135deg, #b9f2ff 0%, #00bfff 100%);
  color: #333;
}

.tier-mestre-i {
  background: linear-gradient(135deg, #9370db 0%, #6a4fb8 100%);
  color: white;
}

.tier-mestre-ii {
  background: linear-gradient(135deg, #7b68ee 0%, #5a3fb8 100%);
  color: white;
}

.tier-mestre-iii {
  background: linear-gradient(135deg, #6a5acd 0%, #483d8b 100%);
  color: white;
}

.tier-grandmaster {
  background: linear-gradient(135deg, #ff1744 0%, #c51162 100%);
  color: white;
}

.tier-grandmaster {
  background: linear-gradient(135deg, #ff1744 0%, #c51162 100%);
  color: white;
}

/* Star Rating Component */
.syo-star-rating {
  display: inline-flex;
  gap: 1px;
  align-items: center;
}

.syo-star-rating .bi {
  line-height: 1;
}

.syo-star-half {
  position: relative;
  display: inline-block;
  line-height: 1;
  width: 1em;
  height: 1em;
}

.syo-star-half .bi-star-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  overflow: hidden;
  color: #ffd700;
  /* Gold/Yellow */
  z-index: 1;
}

.syo-star-half .bi-star {
  color: #dee2e6;
  opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
  .syo-container {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .syo-page-title {
    font-size: 1.25rem;
  }

  .syo-section-title {
    font-size: 1rem;
  }

  .reader-content {
    font-size: 1rem;
    line-height: 1.8;
  }

  .syo-table th {
    width: 100px;
    font-size: 0.75rem;
  }

  .syo-table td {
    font-size: 0.8rem;
  }

  /* Stack cards on mobile */
  .row-cols-md-3>* {
    margin-bottom: 1rem;
  }

  .display-4 {
    font-size: 2.2rem !important;
  }

  .novel-hero-bg {
    height: 450px !important;
  }

  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .text-lg-end {
    text-align: left !important;
  }

  .justify-content-lg-end {
    justify-content: flex-start !important;
  }

  /* Notifications Mobile Revamp */
  .list-group-item {
    margin-bottom: 0.75rem;
    border: 1px solid var(--syo-border) !important;
    border-radius: 12px !important;
    padding: 1.25rem !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  }

  .list-group-item.border-start-4 {
    border-left: 6px solid var(--syo-link) !important;
  }

  .notification-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
  }

  .notification-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .notification-actions .btn {
    width: auto !important;
    /* Override the global mobile btn width: 100% */
    flex: 1;
    margin-bottom: 0 !important;
  }

  /* Admin Mobile Utilities */
  .admin-mobile-card {
    background: #fff;
    border: 1px solid var(--syo-border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  }

  .admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #f8f9fa;
    padding-bottom: 0.5rem;
  }

  .admin-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .admin-info-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
  }

  .admin-info-label {
    color: var(--syo-accent);
    font-weight: 500;
  }

  .admin-info-value {
    color: var(--syo-text);
    font-weight: 600;
  }

  .admin-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .admin-card-actions .btn,
  .admin-card-actions form {
    flex: 1;
  }

  .admin-card-actions .btn {
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
  }

  .admin-responsive-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    text-align: center;
  }

  .admin-responsive-header .syo-page-title {
    margin-bottom: 0 !important;
    font-size: 1.2rem;
  }

  .admin-responsive-header form,
  .admin-responsive-header .btn,
  .admin-responsive-header .btn-group {
    width: 100% !important;
  }

  .admin-responsive-header .btn-group .btn {
    flex: 1;
  }

  /* Cookie Popup Mobile */
  .cookie-popup-card {
    bottom: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    border-radius: 4px;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 0.9rem;
  }

  .syo-container {
    padding: 0.75rem;
  }

  .btn-syo {
    font-size: 0.8rem;
    padding: 0.35rem 1rem;
  }

  .navbar-brand {
    font-size: 1.1rem;
  }

  /* Improve mobile navigation */
  .navbar-collapse {
    background: white;
    padding: 1rem;
    margin-top: 0.5rem;
    border: 1px solid var(--syo-border);
  }
}

/* Cookie Popup Card */
.cookie-popup-card {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 380px;
  background: #ffffff;
  border: 1px solid var(--bs-border-color);
  border-radius: 4px;
  box-shadow: none;
  z-index: 1060;
  overflow: hidden;
  animation: cookieSlideUp 0.4s ease-out;
}

.cookie-popup-inner {
  padding: 1.25rem;
}

.cookie-icon-wrapper {
  background: #eff6ff;
  color: var(--syo-link);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid var(--bs-border-color);
  flex-shrink: 0;
}

.cookie-text-content h6 {
  font-size: 0.95rem;
  letter-spacing: -0.2px;
}

@keyframes cookieSlideUp {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Print Styles */
@media print {

  .navbar,
  .btn,
  .comment-form,
  footer {
    display: none;
  }

  .reader-content {
    font-size: 12pt;
    line-height: 1.6;
  }

  .syo-container {
    border: none;
    box-shadow: none;
  }
}

/* Accessibility Improvements - Modern Focus */
.btn:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 90, 156, 0.2);
  border-color: var(--syo-link);
}

a:focus {
  outline: none;
}

/* Specific fix for navbar links */
.nav-link:focus,
.dropdown-item:focus {
  outline: none;
  box-shadow: none;
  background-color: #f8f9fa;
  /* Subtle background on focus */
  color: var(--syo-link);
}

/* Loading States */
.btn-syo:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Cooldown States */
.btn-cooldown {
  pointer-events: none;
  opacity: 0.6;
  filter: grayscale(0.5);
  cursor: not-allowed !important;
}

.btn-cooldown i {
  animation: btn-pulse 1.5s infinite ease-in-out;
}

@keyframes btn-pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection Color */
::selection {
  background: var(--syo-link);
  color: white;
}

.hover-danger:hover {
  color: #dc3545 !important;
}

.italic {
  font-style: italic;
}

/* Forms */
.form-control {
  border-radius: 2px;
  border: 1px solid var(--syo-border);
  font-size: 0.9rem;
  background-color: #ffffff !important;
}

.form-control:focus {
  border-color: var(--syo-link);
  box-shadow: none;
}

/* Disabled and Readonly Inputs - Enhanced Visibility */
.form-control:disabled,
.form-control[readonly],
.form-select:disabled,
.form-check-input:disabled {
  background-color: #f0f0f0 !important;
  color: #777 !important;
  border-color: #ddd !important;
  cursor: not-allowed;
  opacity: 0.8;
  filter: grayscale(0.5);
}

.form-control[readonly]:focus {
  border-color: #ddd;
  box-shadow: none;
}

/* Nav */
.syo-nav-path {
  font-size: 0.8rem;
  margin-bottom: 1rem;
  color: var(--syo-accent);
}

.syo-nav-path a {
  color: var(--syo-link);
  text-decoration: none;
}

.syo-nav-path a:hover {
  text-decoration: underline;
}

/* Tabs */
.nav-tabs .nav-link {
  border-radius: 0;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s;
  color: var(--syo-text);
  font-weight: 600;
  border: none;
  border-bottom: 3px solid transparent;
}

.nav-tabs .nav-link:hover {
  border-bottom-color: var(--syo-border);
}

.nav-tabs .nav-link.active {
  border-bottom-color: var(--syo-link) !important;
  color: var(--syo-link) !important;
  background: transparent !important;
}

/* Pagination Centering */
.pagination-bootstrap .pagination {
  margin-bottom: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
}

.pagination-bootstrap .page-link {
  border-radius: 4px !important;
  margin: 0 2px;
  color: var(--syo-text);
  border: 1px solid var(--syo-border);
}

.pagination-bootstrap .page-item.active .page-link {
  background-color: var(--syo-link);
  border-color: var(--syo-link);
  color: white;
}

/* Profile Tabs Mobile Fix */
@media (max-width: 991px) {
  .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    border-bottom: 1px solid var(--syo-border) !important;
  }

  .nav-tabs .nav-item {
    flex: 0 0 auto;
    margin-right: 10px;
  }

  .nav-tabs .nav-item:last-child {
    margin-right: 0;
  }

  .nav-tabs .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }
}

/* Lists */
.chapter-list {
  list-style: none;
  padding: 0;
}

.chapter-item {
  border-bottom: 1px dotted var(--syo-border);
  padding: 0.75rem 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
}

.chapter-item:hover {
  background-color: #fcfcfc;
}

/* Utilities */
.transition-all {
  transition: all 0.2s ease;
}

.hover-shadow:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.hover-underline:hover {
  text-decoration: underline;
}

/* Animations & Transitions */
.hover-translate-up {
  transition: transform 0.2s ease-out;
}

.hover-translate-up:hover {
  transform: translateY(-5px);
}

/* Utility Badges */
.badge.rounded-pill {
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Search Form Revamp */
.search-form-revamp .form-control-lg {
  font-size: 1.1rem;
}

.search-form-revamp .form-select-sm {
  font-size: 0.8rem;
  border-radius: 4px;
}

.search-form-revamp .btn-syo-primary {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.bg-light-subtle {
  background-color: #f8f9fa !important;
}

.hover-shadow-sm:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05) !important;
}

/* Home Page 2.0 Revamp Styles */
.news-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 25px;
  align-items: start;
}

.news-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--syo-border);
  display: block !important;
  text-decoration: none !important;
  /* Enforce 16:9 aspect ratio */
  aspect-ratio: 16 / 9;
}

.news-item:hover {
  transform: translateY(-4px);
  border-color: var(--syo-link);
}

.news-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.news-item:hover img {
  opacity: 0.6;
}

.news-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  color: white;
}

.news-item-main {
  grid-row: span 2;
  /* Height driven by the two stacked 16:9 small cards + gap */
}

.news-item-main .h5 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  color: white;
}

.news-item-small .h6 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  color: white;
}

/* Latest Updates Grid */
.novel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 1.5rem;
  padding: 0.5rem 0;
}

.novel-card-v {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--syo-border);
  position: relative;
  text-decoration: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.novel-card-v:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-6px);
  border-color: var(--syo-link);
}

.novel-cover-wrapper {
  position: relative;
  aspect-ratio: 2/3;
  background: #f8f9fa;
  overflow: hidden;
  border-bottom: 1px solid var(--syo-border);
}

.novel-cover-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block !important;
}

.novel-badge-new {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--syo-danger);
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.novel-info-v {
  padding: 0.75rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.novel-title-v {
  font-size: 0.85rem;
  font-weight: 700;
  color: #2d3436;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.4rem;
}

.novel-meta-v {
  font-size: 0.7rem;
  color: var(--syo-accent);
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.novel-meta-v .genre {
  color: var(--syo-link);
  font-weight: 600;
}

@media (max-width: 991px) {
  .news-grid {
    grid-template-columns: 1.5fr 1fr;
  }
}

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .news-item {
    aspect-ratio: 16 / 9;
    /* keep ratio on mobile too */
  }

  .news-item-main {
    grid-row: auto;
  }

  /* .news-item-small — aspect-ratio from .news-item applies */

  .novel-grid {
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
    gap: 1rem;
  }
}

/* Compact Updates List Styles */
#updates-list-container .list-group-item {
  transition: background-color 0.2s ease;
}

#updates-list-container .list-group-item:hover {
  background-color: #f8f9fa;
}

#updates-list-container .hover-underline:hover {
  text-decoration: underline !important;
}

.fw-600 {
  font-weight: 600;
}

/* News Grid Fallbacks */
.news-grid:has(.news-item-main:only-child) {
  grid-template-columns: 1fr;
}

.news-grid:has(.news-item-small:nth-child(2):last-child) {
  grid-template-columns: 1fr 1fr;
}

/* Mobile Visual Adjustments (Zero impact on Desktop) */
@media (max-width: 991.98px) {
  .navbar-brand {
    font-size: 1rem !important;
    padding-right: 0;
  }

  .navbar-nav {
    margin-top: 1rem;
    border-top: 1px solid var(--syo-border);
    padding-top: 0.5rem;
  }

  .nav-link {
    padding: 0.75rem 0 !important;
  }

  /* Fix notification dropdown on mobile */
  #notifDropdown+.dropdown-menu {
    position: fixed !important;
    top: auto !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    margin-top: 10px;
    z-index: 1050;
  }

  /* Improve spacing */
  .syo-container,
  .syo-box {
    padding: 1.25rem !important;
    margin-bottom: 1rem;
  }

  .display-4 {
    font-size: 2.25rem !important;
  }

  .display-5 {
    font-size: 1.75rem !important;
  }
}

@media (max-width: 576px) {
  .navbar-brand span {
    display: none;
    /* Hide 'NV' badge to save space if needed */
  }

  .navbar-brand {
    font-size: 0.9rem !important;
  }

  .syo-section-title {
    font-size: 1rem;
  }

  /* Improve news grid stacking on small mobiles */
  .news-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }

  .news-item-main {
    height: 180px !important;
  }

  .news-item-small {
    height: 100px !important;
  }

  /* Dashboard Adjustments */
  .avatar-placeholder {
    width: 64px !important;
    height: 64px !important;
  }

  .avatar-placeholder span {
    font-size: 1.25rem !important;
  }

  .avatar-placeholder span {
    font-size: 1.25rem !important;
  }

  /* Novel Page Polish */
  .novel-hero-bg {
    height: 250px !important;
  }

  .novel_title {
    font-size: 2.25rem !important;
    letter-spacing: -1px !important;
    line-height: 1.2 !important;
  }

  .novel-synopsis {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }

  .syo-star-rating {
    font-size: 0.85rem;
  }
}

/* Review System - Refined Layout */
.review-form-container {
  background: #f8f9fa;
  /* Light background */
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.review-card {
  background: #f8f9fa;
  /* Light background */
  border-radius: 16px;
  padding: 1rem;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.review-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.review-card.author-review {
  border-left: 6px solid #ffc107;
}

.review-card.critic-review {
  border-left: 6px solid #0dcaf0;
}

.review-content {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #444;
  /* Removed individual bg/padding as requested */
}

.review-score-badge {
  background: white;
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  font-weight: 800;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.review-impact-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  background: white;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.review-meta {
  font-size: 0.8rem;
  color: #777;
}

.review-user-name {
  font-weight: 700;
  color: #111;
  text-decoration: none;
}

.review-user-name:hover {
  color: var(--syo-link);
  text-decoration: underline;
}

.review-stars {
  display: flex;
  gap: 3px;
  font-size: 0.9rem;
}

/* =========================================
   Novelliste Utility Classes (Migrated)
   ========================================= */

/* Avatars & Dimensions */
.avatar-20 {
  width: 20px;
  height: 20px;
}

.avatar-24 {
  width: 24px;
  height: 24px;
}

.avatar-30 {
  width: 30px;
  height: 30px;
}

.avatar-32 {
  width: 32px;
  height: 32px;
}

.avatar-36 {
  width: 36px;
  height: 36px;
}

.avatar-40 {
  width: 40px;
  height: 40px;
}

.avatar-48 {
  width: 48px;
  height: 48px;
}

.avatar-52 {
  width: 52px;
  height: 52px;
}

.avatar-56 {
  width: 56px;
  height: 56px;
}

.avatar-64 {
  width: 64px;
  height: 64px;
}

.avatar-80 {
  width: 80px;
  height: 80px;
}

/* Max Widths */
.mw-250 {
  max-width: 250px;
}

.mw-300 {
  max-width: 300px;
}

.mw-400 {
  max-width: 400px;
}

.mw-450 {
  max-width: 450px;
}

.mw-500 {
  max-width: 500px;
}

.mw-600 {
  max-width: 600px;
}

.mw-650 {
  max-width: 650px;
}

.mw-800 {
  max-width: 800px;
}

.mw-860 {
  max-width: 860px;
}

.mw-900 {
  max-width: 900px;
}

/* Font Sizes */
.fs-tiny {
  font-size: 0.55rem;
}

.fs-xxs {
  font-size: 0.65rem;
}

.fs-xs {
  font-size: 0.75rem;
}

.fs-sm {
  font-size: 0.85rem;
}

/* Letter Spacing */
.ls-tight {
  letter-spacing: -0.5px;
}

.ls-sm {
  letter-spacing: 0.5px;
}

.ls-md {
  letter-spacing: 1px;
}

.ls-lg {
  letter-spacing: 1.5px;
}

/* Heights & Positioning */
.h-500px {
  height: 500px;
}

.mh-500 {
  max-height: 500px;
}

.top-20px {
  top: 20px;
}

/* Helpers */
.resize-none {
  resize: none;
}

.lh-24 {
  line-height: 24px;
}

.lh-32 {
  line-height: 32px;
}

/* Merit Badge Backgrounds */
.bg-merit-teal {
  background-color: #20c997 !important;
}

.bg-merit-indigo {
  background-color: #6610f2 !important;
}

@media (min-width: 576px) {
  .border-sm-start {
    border-left: 1px solid var(--syo-border) !important;
  }
}

/* Dashboard Stat Fix for Mobile (Side-by-side) */
@media (max-width: 576px) {
  .fs-xxs {
    font-size: 0.6rem !important;
  }

  .h6 {
    font-size: 0.9rem !important;
  }
}