body {
    font-family: Arial, sans-serif;
}

.grid a:hover {
    transform: scale(1.05);
}


.manga-card {
    display: inline-block;
    width: 200px;
    margin: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.manga-card img {
    width: 100%;
    border-radius: 5px;
}
.comment-box {
    border-left: 5px solid #3498db;
    padding: 10px;
    margin: 10px 0;
    background: #f8f8f8;
    border-radius: 5px;
}

.comment-box strong {
    color: #3498db;
}

.comment-box p {
    margin: 5px 0;
}

select {
    font-size: 16px;
    padding: 5px;
}

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
}

.delete-form {
    display: inline-block;
    margin-left: 10px;
}

.delete-form button {
    background: red;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

.delete-manga {
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    opacity: 1;
    pointer-events: auto;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    transition: background 0.2s, box-shadow 0.2s;
}
.delete-manga:hover {
    background: #b91c1c;
    box-shadow: 0 6px 16px rgba(220,38,38,0.4);
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    padding: 8px 0;
}
.chapter-grid-item {
    min-width: 0;
    min-height: 60px;
    max-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1rem;
    border-radius: 8px;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    padding: 6px 2px;
    word-break: break-all;
}
.chapter-grid-item:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255,255,255,0.08);
}
.chapter-num-small {
    font-size: 0.8em;
    font-weight: bold;
}
.chapter-title {
    font-size: 0.75em;
    color: #e5e7eb;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.reading-progress {
    width: 100%;
    height: 10px;
    background: #2d2d2d;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 4px;
    margin-bottom: 2px;
}
.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ec4899 0%, #f87171 100%);
    border-radius: 6px;
    transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* Poppins for manga titles */
.manga-title, .manga-card h2, .manga-card h3, .manga-title-modern {
  font-family: 'Poppins', Arial, Helvetica, sans-serif !important;
  font-weight: 700;
}

/* Open Sans for manga descriptions */
.manga-description, .manga-card p, .manga-card .description, .manga-description-modern {
  font-family: 'Open Sans', Arial, Helvetica, sans-serif !important;
  font-weight: 400;
}

/* Manga Classic Theme: Paper Fiber Background for Dashboard and Website */
.dashboard-theme-manga body,
.website-theme-manga body,
.website-theme-manga {
  background: url('https://www.transparenttextures.com/patterns/paper-fibers.png') repeat, var(--background-dark) !important;
}

/* Add or update this CSS for horizontal scrolling and overflow fix */
.bg-scroll-x-container {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 1rem;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: #b30000 #222;
  max-width: 100%;
  box-sizing: border-box;
}
.bg-scroll-x-container label {
  flex: 0 0 auto;
}
.bg-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: border 0.2s;
}
.bg-radio:checked + .bg-thumb,
.bg-thumb.selected {
  border: 2px solid #b30000;
}

/* On desktop, force hide all overflow and remove scroll */
@media (min-width: 768px) {
  .bg-scroll-x-container {
    overflow: hidden !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .bg-scroll-x-container::-webkit-scrollbar {
    display: none !important;
  }
}

/* Show sidebar on mobile for table views */
.show-sidebar-mobile {
  display: block !important;
}
@media (max-width: 640px) {
  .show-sidebar-mobile {
    width: 100%;
    max-width: 100vw;
    margin-bottom: 1rem;
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #1a1a2e;
    padding: 1rem 0.5rem;
  }
}
