/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #334155;
  line-height: 1.6;
  transition: opacity 0.3s ease;
}

body.fade-out {
  opacity: 0;
}

/* Login Page Specific Styles */
body.login-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  position: relative;
  transform: translateY(20px);
  animation: slideUpFadeIn 0.6s ease forwards;
}

@keyframes slideUpFadeIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.login-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="10" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="40" cy="15" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.login-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.login-header p {
  opacity: 0.9;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

.login-form {
  padding: 2.5rem 2rem;
}

.password-container {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.password-toggle:hover {
  color: #374151;
  background: rgba(0, 0, 0, 0.05);
}

.password-toggle .eye-icon {
  width: 20px;
  height: 20px;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-links {
  text-align: center;
  margin-top: 1.5rem;
}

.form-links a {
  color: #667eea;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.form-links a:hover {
  color: #4f46e5;
  text-decoration: underline;
}

.demo-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.demo-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 1rem;
}

.demo-credentials {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.demo-btn {
  padding: 0.75rem;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.demo-btn:hover {
  background: #f3f4f6;
  border-color: #667eea;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Enhanced Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 280px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-right: 1px solid rgba(226, 232, 240, 0.6);
}

.sidebar.hidden {
  transform: translateX(-100%);
}

.sidebar-header {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(45deg, #ffffff, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  padding: 2rem 0;
}

.nav-section {
  margin-bottom: 2.5rem;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 1.5rem;
  margin-bottom: 1rem;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  color: #64748b;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 3px solid transparent;
  margin: 0.25rem 1rem;
  border-radius: 12px;
  font-weight: 500;
}

.nav-item:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #334155;
  transform: translateX(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-item.active {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border-left-color: #1d4ed8;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.nav-item svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 1rem;
}

/* SIDEBAR NAVIGATION FIX - This is the key addition! */
.nav-sub-item svg,
.nav-sub-item svg * {
  pointer-events: none !important;
}

.nav-sub-item {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Enhanced hover and active states for sub-items */
.nav-sub-item:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
  color: #334155 !important;
  transform: translateX(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-sub-item.active {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
  color: white !important;
  border-left-color: #7c3aed;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

/* Main content */
.main-content {
  margin-left: 280px;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 100vh;
}

.main-content.expanded {
  margin-left: 0;
}

.header {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.menu-toggle {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  color: #334155;
  transform: scale(1.05);
}

/* Enhanced User Menu - Fixed Size */
.user-menu {
  position: relative;
}

.user-menu-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #e2e8f0;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-size: 0.875rem;
}

.user-menu-button:hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-self: flex-start;
}

.user-role-badge.admin {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.user-role-badge.user {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  border: 1px solid #e2e8f0;
  min-width: 12rem;
  z-index: 1000;
  overflow: hidden;
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-dropdown:not(.hidden) {
  transform: translateY(0);
  opacity: 1;
}

.user-dropdown.dropdown-enter {
  animation: dropdownEnter 0.3s ease forwards;
}

.user-dropdown.dropdown-exit {
  animation: dropdownExit 0.2s ease forwards;
}

@keyframes dropdownEnter {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dropdownExit {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
}

.user-dropdown a {
  display: block;
  padding: 1rem 1.5rem;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.user-dropdown a:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #1e293b;
}

.user-dropdown .logout {
  color: #dc2626;
  border-top: 1px solid #f3f4f6;
}

.user-dropdown .logout:hover {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #991b1b;
}

/* Content area */
.content {
  padding: 2.5rem;
  animation: fadeInUp 0.6s ease forwards;
}

.content-header {
  margin-bottom: 2rem;
}

.content-title {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.content-subtitle {
  color: #64748b;
  font-size: 1.1rem;
  font-weight: 400;
}

/* Enhanced Cards */
.card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(226, 232, 240, 0.6);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.15);
}

/* Compact Stat Cards - Updated for dashboard */
.stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(226, 232, 240, 0.6);
  position: relative;
  overflow: hidden;
  min-height: auto;
}

.stat-card.compact {
  padding: 1rem;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.stat-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.2);
}

/* Compact stat icons */
.stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.stat-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
}

.stat-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: white;
  position: relative;
  z-index: 1;
}

.stat-icon.blue {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.stat-icon.green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.stat-icon.yellow {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.stat-icon.purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

/* Compact stat content */
.stat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.25rem;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

/* Action Cards */
.action-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.action-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  position: relative;
  overflow: hidden;
}

.action-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
}

.action-icon svg {
  width: 2rem;
  height: 2rem;
  color: white;
  position: relative;
  z-index: 1;
}

.action-icon.user {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
}

.action-icon.media {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.4);
}

.action-icon.settings {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
}

.action-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.75rem;
}

.action-description {
  color: #64748b;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Enhanced Tables */
.table-container {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.6);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 1.5rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.table th {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  font-weight: 700;
  color: #374151;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Enhanced Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.login-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.login-page .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}

.login-page .btn-primary:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #374151;
  border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  border-color: #d1d5db;
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

.btn-ghost {
  background: transparent;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.btn-ghost:hover {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-color: #9ca3af;
  transform: translateY(-1px);
}

/* Enhanced Forms */
.form-group {
  margin-bottom: 2rem;
}

.form-label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: #374151;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #fafafa 0%, #f8fafc 100%);
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: white;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.form-select {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Form Radio Button Styles - ADD THESE */
.form-radio {
    width: 16px;
    height: 16px;
    accent-color: #8b5cf6;
    margin-right: 8px;
}

.form-radio:checked + span {
    font-weight: 600;
}

/* Radio button container styling */
.form-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.form-radio-item {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.form-radio-item:hover {
    background: rgba(139, 92, 246, 0.05);
    border-radius: 6px;
    padding: 4px;
    margin: -4px;
}

/* Enhanced Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal:not(.hidden) {
  opacity: 1;
}

.modal.fade-in {
  opacity: 1;
}

.modal.fade-out {
  opacity: 0;
}

.modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 32rem;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal:not(.hidden) .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  padding: 1rem 2rem 2rem;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* Genre tags */
.genre-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  color: #475569;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.genre-tag:hover {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.genre-tag.selected {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border-color: #1d4ed8;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

/* Enhanced Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner.large {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Enhanced Alerts */
.alert {
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
}

.alert-success {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #166534;
  border-color: #bbf7d0;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.2);
}

.alert-error {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  color: #991b1b;
  border-color: #fecaca;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}

.alert-warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fed7aa 100%);
  color: #92400e;
  border-color: #fed7aa;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

.alert-info {
  background: linear-gradient(135deg, #eff6ff 0%, #bfdbfe 100%);
  color: #1e40af;
  border-color: #bfdbfe;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.2);
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.loading-content {
  background: white;
  padding: 3rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.loading-content p {
  margin-top: 1rem;
  font-weight: 600;
  color: #374151;
}

/* Mobile Overlay */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Animation Classes */
.animate-slide-up {
  animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tab Navigation Styles */
.tab-navigation {
  display: flex;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 12px 24px;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  font-weight: 500;
  color: #6b7280;
}

.tab-btn:hover {
  color: #4b5563;
}

.tab-btn.active {
  color: #8b5cf6;
  border-bottom-color: #8b5cf6;
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Song Table Specific Styles - FIXED IMAGE SIZING */

/* Song thumbnail styling - FIXED SIZE */
.song-thumbnail,
.episode-thumbnail {
  width: 48px !important;
  height: 48px !important;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.song-thumbnail:hover,
.episode-thumbnail:hover {
  transform: scale(1.05);
  border-color: #8b5cf6;
}

/* Placeholder for songs without images */
.song-thumbnail-placeholder,
.episode-thumbnail-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
  border: 2px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Song info container */
.song-info {
  min-width: 0;
  flex: 1;
}

.song-title {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.875rem;
  line-height: 1.2;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-info .text-sm {
  color: #6b7280;
  font-size: 0.75rem;
}

/* Play button styling */
.play-button {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.2s ease;
  font-weight: 500;
}

.play-button:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Category badge */
.category-badge {
  display: inline-block;
  padding: 4px 8px;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #bfdbfe;
}

/* Loading state for action buttons */
.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Focus styles for accessibility */
.action-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Genre badge */
.genre-badge {
  display: inline-block;
  padding: 2px 6px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #475569;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 500;
  border: 1px solid #e2e8f0;
}

/* Action buttons */
.action-btn {
  background: none;
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  color: #6b7280;
}

.action-btn:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
  transform: translateY(0);
}

.edit-btn {
  color: #3b82f6;
  border-color: #e5e7eb;
}

.edit-btn:hover {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
}

.delete-btn {
  color: #dc2626;
  border-color: #e5e7eb;
}

.delete-btn:hover {
  border-color: #dc2626;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #991b1b;
}

/* Table cell alignment fixes */
.table td {
  vertical-align: middle;
  padding: 12px 16px;
}

.table td:first-child {
  width: 280px;
  /* Fixed width for song info column */
}

.table td:nth-child(2) {
  width: 150px;
  /* Artist column */
}

.table td:nth-child(3) {
  width: 120px;
  /* Category column */
}

.table td:nth-child(4) {
  width: 180px;
  /* Genres column */
}

.table td:nth-child(5) {
  width: 100px;
  /* File size column */
}

.table td:nth-child(6) {
  width: 120px;
  /* Created date column */
}

/* Action buttons container */
.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}


/* Show and category action buttons */
.show-card .btn,
.category-card .btn {
  font-size: 0.875rem;
  padding: 6px 12px;
  min-height: 32px;
}

.show-card .btn.btn-ghost,
.category-card .btn.btn-ghost {
  border: 1px solid #e5e7eb;
  color: #6b7280;
}

.show-card .btn.btn-ghost:hover,
.category-card .btn.btn-ghost:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-color: #9ca3af;
}

.show-card .btn.text-red-600,
.category-card .btn.text-red-600 {
  color: #dc2626;
}

/* Highlight Button Styles - ADD THESE */
.highlight-category-btn {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  color: white !important;
  border: none !important;
  transition: all 0.3s ease;
}

.highlight-category-btn:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(251, 191, 36, 0.3);
}

.unhighlight-category-btn {
  background: #6b7280 !important;
  color: white !important;
  border: none !important;
  transition: all 0.3s ease;
}

.unhighlight-category-btn:hover {
  background: #4b5563 !important;
  transform: translateY(-1px);
}

.highlight-category-btn:disabled,
.unhighlight-category-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.show-card .btn.text-red-600:hover,
.category-card .btn.text-red-600:hover {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #dc2626;
}


/* Table cell styling for actions */
.table td:last-child {
  text-align: center;
  padding: 12px 16px;
  white-space: nowrap;
}

/* Show Cards */
.show-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.show-card:hover {
  transform: translateY(-2px);
}

.show-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.show-content {
  padding: 20px;
}

/* Category Cards */
.category-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.category-card:hover {
  transform: translateY(-2px);
}

.category-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
}

.category-icon.music {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-icon.podcast {
  background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
}

.category-icon.show {
  background: linear-gradient(135deg, #00cec9 0%, #55efc4 100%);
}

/* Utilities */
.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-4 {
  padding: 1rem;
}

.text-center {
  text-align: center;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.font-medium {
  font-weight: 500;
}

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

.font-bold {
  font-weight: 700;
}

.text-gray-500 {
  color: #64748b;
}

.text-gray-600 {
  color: #475569;
}

.text-gray-900 {
  color: #1e293b;
}

.text-red-600 {
  color: #dc2626;
}

.text-blue-600 {
  color: #2563eb;
}

.text-green-600 {
  color: #16a34a;
}

.bg-white {
  background-color: white;
}

.bg-gray-50 {
  background-color: #f8fafc;
}

.bg-gray-100 {
  background-color: #f1f5f9;
}

.rounded {
  border-radius: 0.25rem;
}

.rounded-md {
  border-radius: 0.375rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.border {
  border: 1px solid #e2e8f0;
}

.border-gray-300 {
  border-color: #d1d5db;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.max-w-sm {
  max-width: 24rem;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-lg {
  max-width: 32rem;
}

.max-w-xl {
  max-width: 36rem;
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-3xl {
  max-width: 48rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Grid */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

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

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    width: 260px;
  }

  .main-content {
    margin-left: 260px;
  }
}

@media (min-width: 768px) {
  .md\\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lg\\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }

  .action-btn {
    min-width: 32px;
    height: 32px;
    padding: 6px 8px;
    font-size: 0.875rem;
  }

  .action-buttons {
    gap: 4px;
  }

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

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

  .content {
    padding: 1.5rem;
  }

  .content-title {
    font-size: 2rem;
  }

  .content-header {
    margin-bottom: 1.5rem;
  }

  .header {
    padding: 1rem 1.5rem;
  }

  .user-dropdown {
    right: 0;
    left: auto;
    min-width: 12rem;
  }

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

  .grid-cols-3 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lg\\:grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lg\\:grid-cols-3 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .md\\:grid-cols-2 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  /* Compact stat cards on mobile */
  .stat-card.compact {
    min-height: 100px;
    padding: 0.875rem;
  }

  .stat-icon {
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.5rem;
  }

  .stat-icon svg {
    width: 1rem;
    height: 1rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  /* Responsive adjustments for song table */
  .song-thumbnail,
  .song-thumbnail-placeholder {
    width: 40px !important;
    height: 40px !important;
  }

  .song-title {
    font-size: 0.8rem;
  }

  .play-button {
    display: none !important;
  }

  .table td:first-child {
    width: auto;
    min-width: 200px;
  }

  /* Hide some columns on mobile */
  .table td:nth-child(5),
  /* File size */
  .table th:nth-child(5) {
    display: none;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 1rem;
  }

  .content-title {
    font-size: 1.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-card.compact {
    min-height: 90px;
    padding: 0.75rem;
  }

  .modal-content {
    width: 95%;
    margin: 1rem;
  }

  .grid-cols-4 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

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

  .lg\\:grid-cols-4 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  /* Login Page Mobile Responsive */
  .login-container {
    margin: 10px;
    max-width: none;
  }

  .login-header {
    padding: 2rem 1.5rem;
  }

  .login-form {
    padding: 2rem 1.5rem;
  }

  /* Fixed Mobile User Menu */
  .user-menu-button {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  .user-avatar {
    width: 1.75rem;
    height: 1.75rem;
  }

  .user-info .user-name {
    font-size: 0.8rem;
  }

  .user-role-badge {
    font-size: 0.5rem;
    padding: 0.1rem 0.3rem;
  }

  .user-dropdown {
    min-width: 10rem;
    right: 0;
  }

  /* Extra compact stats for very small screens */
  .stat-value {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  .stat-icon {
    width: 1.75rem;
    height: 1.75rem;
  }

  .stat-icon svg {
    width: 0.875rem;
    height: 0.875rem;
  }

  .table td:nth-child(4),
  /* Genres */
  .table th:nth-child(4),
  .table td:nth-child(6),
  /* Created date */
  .table th:nth-child(6) {
    display: none;
  }
}

/* Enhanced Modal Styles with Close Button and Visibility Indicators */

/* Modal Close Button */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  color: #6b7280;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.modal-close:focus {
  outline: none;
  box-shadow: 0 0 0 2px #8b5cf6;
}

/* Modal Header Enhancement */
.modal-header {
  position: relative;
  padding: 24px 56px 16px 24px;
  /* Extra right padding for close button */
  border-bottom: 1px solid #e5e7eb;
}

/* Visibility Status Indicators */
.visibility-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.visibility-indicator.visible {
  background-color: #d1fae5;
  color: #065f46;
}

.visibility-indicator.hidden {
  background-color: #fee2e2;
  color: #991b1b;
}

.visibility-indicator.expiring {
  background-color: #fef3c7;
  color: #92400e;
}

/* Hidden Episode/Show Styles */
.episode-row.hidden,
.show-card.hidden {
  opacity: 0.5;
  background-color: #f9fafb;
  border-left: 4px solid #ef4444;
}

.episode-row.hidden:hover,
.show-card.hidden:hover {
  opacity: 0.7;
}

/* Visibility Status Text */
.visibility-status {
  font-size: 0.75rem;
  margin-top: 2px;
}

.visibility-status.permanent {
  color: #10b981;
}

.visibility-status.temporary {
  color: #f59e0b;
}

.visibility-status.expired {
  color: #ef4444;
}

/* Enhanced Episode Image Thumbnails */
.episode-thumbnail {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.episode-thumbnail-placeholder {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

/* Enhanced Form Styling for Visibility Fields */
.visibility-field {
  position: relative;
}

.visibility-field input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.visibility-help-text {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.visibility-help-text svg {
  width: 12px;
  height: 12px;
}

/* Episode Table Enhancement */
.episodes-table th:last-child,
.episodes-table td:last-child {
  min-width: 120px;
}

/* Episode info styling */
.episode-info {
  min-width: 0;
  flex: 1;
}

.episode-title {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.875rem;
  line-height: 1.2;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Show Card Enhancement */
.show-card {
  position: relative;
  overflow: hidden;
}

.show-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.show-card:hover::before {
  opacity: 1;
}

.show-card.hidden::before {
  background: #ef4444;
  opacity: 1;
}

/* Enhanced Modal Backdrop */
.modal {
  backdrop-filter: blur(4px);
  background-color: rgba(0, 0, 0, 0.5);
}

.modal.hidden {
  display: none;
}

/* Enhanced Modal Content */
.modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-height: 90vh;
  overflow-y: auto;
}

/* Responsive Modal */
@media (max-width: 768px) {
  .modal-content {
    margin: 16px;
    max-width: calc(100vw - 32px);
  }

  .modal-header {
    padding: 16px 48px 12px 16px;
  }
}

/* Loading State for File Uploads */
.file-upload-loading {
  position: relative;
  overflow: hidden;
}

.file-upload-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

/* Enhanced Button States */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Success/Error Message Styling */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.alert-info {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

/* Hide scrollbar for modal content */
.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Category Cards - ADD THESE STYLES */
.category-card.highlighted {
  border: 2px solid #fbbf24 !important;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3) !important;
  background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%) !important;
  transform: scale(1.02);
  position: relative;
  order: -1;
  /* This makes highlighted categories appear first */
}

.category-card.highlighted::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #fbbf24, #f59e0b, #fbbf24);
  border-radius: 10px;
  z-index: -1;
  animation: highlightGlow 2s ease-in-out infinite alternate;
}

@keyframes highlightGlow {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }

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

.highlight-star {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #fbbf24;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: starPulse 1.5s ease-in-out infinite;
}

@keyframes starPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.highlight-badge {
  display: inline-block;
  background: #fbbf24;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  animation: badgeFlash 2s ease-in-out infinite;
}

@keyframes badgeFlash {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* Success Flash Animation - ADD THIS */
.category-card.success-flash {
    animation: successFlash 0.6s ease-in-out;
}

@keyframes successFlash {
    0%, 100% {
        background-color: white;
    }
    50% {
        background-color: #dcfce7;
    }
}