/* Dashboard Layout */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-nav .nav-link {
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.sidebar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
}

.sidebar-nav .nav-link.active {
  background: var(--bs-primary) !important;
}

.sidebar-footer {
  margin-top: auto;
}

/* Dashboard Content */
.dashboard-content {
  flex: 1;
  margin-left: 250px;
  background: #f8f9fa;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Responsive Sidebar */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .dashboard-content {
    margin-left: 0;
  }
}

/* Landing Page Styles */
.hero-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 80vh;
}

.hero-illustration {
  padding: 2rem;
}

.comic-panel-stack {
  position: relative;
  display: inline-block;
}

.comic-panel {
  width: 150px;
  height: 200px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: -75px;
}

.comic-panel:nth-child(1) {
  position: relative;
  z-index: 1;
}

.comic-panel:nth-child(2) {
  top: 20px;
  z-index: 2;
}

.comic-panel:nth-child(3) {
  top: 40px;
  z-index: 3;
}

.comic-panel i {
  font-size: 3rem;
  color: var(--bs-primary);
}

/* Feature Icons */
.feature-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* Step List */
.step-number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Card Hover Effects */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Comic Grid */
.comic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.comic-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.comic-card:hover {
  transform: scale(1.02);
}

.comic-card .cover-image {
  aspect-ratio: 2/3;
  object-fit: cover;
  width: 100%;
}

.comic-card .cover-placeholder {
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.comic-card .status-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed #dee2e6;
  border-radius: 0.5rem;
  padding: 3rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.05);
}

.upload-zone.dragover {
  background: rgba(var(--bs-primary-rgb), 0.1);
}

/* Page Thumbnails */
.page-thumbnail {
  position: relative;
  aspect-ratio: 2/3;
  background: #f8f9fa;
  border-radius: 0.375rem;
  overflow: hidden;
  cursor: grab;
}

.page-thumbnail:active {
  cursor: grabbing;
}

.page-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-thumbnail .page-number {
  position: absolute;
  bottom: 0.25rem;
  left: 0.25rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.page-thumbnail .page-actions {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.page-thumbnail:hover .page-actions {
  opacity: 1;
}

/* Sortable Ghost */
.sortable-ghost {
  opacity: 0.4;
}

.sortable-chosen {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Forms */
.form-label {
  font-weight: 500;
}

.form-text {
  font-size: 0.8rem;
}

/* Tags Input */
.tags-input {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.375rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  min-height: 42px;
}

.tags-input .tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--bs-primary);
  color: white;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.tags-input .tag .remove {
  cursor: pointer;
  opacity: 0.7;
}

.tags-input .tag .remove:hover {
  opacity: 1;
}

.tags-input input {
  flex: 1;
  min-width: 100px;
  border: none;
  outline: none;
  padding: 0.25rem;
}

/* Loading States */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

/* Status Badges */
.status-draft {
  background: #6c757d;
}

.status-published {
  background: #198754;
}

.status-archived {
  background: #ffc107;
  color: #212529;
}

/* Preview Reader */
.reader-container {
  background: #1a1a1a;
  min-height: 100vh;
}

.reader-page {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
  .hero-section {
    text-align: center;
  }

  .hero-illustration {
    display: none;
  }

  .comic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
