/* ==========================================
   ADMIN PANEL STYLES
   ========================================== */

.admin-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(15px);
  display: none; justify-content: center; align-items: center;
  padding: 16px;
}
.admin-overlay.active { display: flex; animation: fadeIn 0.3s ease; }

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

.admin-panel {
  width: 100%; max-width: 1200px; max-height: 92vh;
  background: var(--bg-secondary);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-color);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-xl);
  animation: slideUpScale 0.4s var(--transition-bounce);
}

@keyframes slideUpScale {
  from { opacity: 0; transform: translateY(50px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.admin-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 28px; border-bottom: 1px solid var(--border-color); background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(217,70,239,0.04)); flex-wrap: wrap; gap: 12px; }
.admin-header-title { display: flex; align-items: center; gap: 12px; }
.admin-header-icon { width: 42px; height: 42px; background: var(--gradient-main); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; box-shadow: var(--shadow-purple); }
.admin-header h2 { font-size: 20px; font-weight: 800; }
.admin-header p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.admin-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.admin-export-btn { padding: 8px 16px; background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2); border-radius: var(--radius-sm); color: var(--green-success); font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; transition: all var(--transition-base); }
.admin-export-btn:hover { background: rgba(34,197,94,0.2); }
.admin-import-btn { padding: 8px 16px; background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.2); border-radius: var(--radius-sm); color: var(--cyan-accent); font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; transition: all var(--transition-base); }
.admin-import-btn:hover { background: rgba(34,211,238,0.2); }
.admin-close { width: 36px; height: 36px; background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 15px; transition: all var(--transition-base); }
.admin-close:hover { background: rgba(239,68,68,0.15); border-color: var(--red-danger); color: var(--red-danger); }

.admin-body { display: flex; flex: 1; overflow: hidden; }

.admin-sidebar { width: 240px; border-left: 1px solid var(--border-color); padding: 16px; background: rgba(0,0,0,0.2); overflow-y: auto; flex-shrink: 0; }
.admin-nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-sm); color: var(--text-secondary); cursor: pointer; font-size: 13.5px; font-weight: 600; transition: all var(--transition-base); margin-bottom: 4px; border: 1px solid transparent; position: relative; }
.admin-nav-item:hover, .admin-nav-item.active { background: rgba(139,92,246,0.1); color: var(--purple-neon); }
.admin-nav-item.active { border-color: rgba(139,92,246,0.2); }
.admin-nav-item.active::before { content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 60%; background: var(--gradient-main); border-radius: var(--radius-full); }
.admin-nav-item i { width: 20px; text-align: center; font-size: 14px; }
.admin-nav-item .badge { margin-right: auto; padding: 2px 8px; background: var(--purple-700); color: #fff; border-radius: var(--radius-full); font-size: 10px; font-weight: 700; }

.admin-content { flex: 1; padding: 28px; overflow-y: auto; }
.admin-tab { display: none; }
.admin-tab.active { display: block; animation: fadeIn 0.3s ease; }
.admin-tab-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-tab-title { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.admin-tab-title i { color: var(--purple-400); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }
.form-group label .required { color: var(--red-danger); }
.form-group label .hint { margin-right: auto; font-size: 11px; color: var(--text-muted); font-weight: 400; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary); font-family: inherit; font-size: 13.5px; transition: all var(--transition-base); direction: rtl; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--purple-700); background: var(--bg-card-hover); box-shadow: 0 0 20px rgba(124,58,237,0.12); }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group select option { background: var(--bg-card); color: var(--text-primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Image Upload */
.image-upload-section { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.upload-zone { border: 2px dashed rgba(139,92,246,0.25); border-radius: var(--radius-md); padding: 32px 16px; text-align: center; cursor: pointer; transition: all var(--transition-base); background: rgba(139,92,246,0.02); position: relative; overflow: hidden; }
.upload-zone::before { content: ''; position: absolute; inset: 0; background: var(--gradient-glass); opacity: 0; transition: opacity var(--transition-base); }
.upload-zone:hover { border-color: var(--purple-700); background: rgba(139,92,246,0.06); transform: translateY(-2px); }
.upload-zone:hover::before { opacity: 1; }
.upload-zone.dragging { border-color: var(--purple-500); background: rgba(139,92,246,0.12); transform: scale(1.02); }
.upload-zone i { font-size: 40px; color: var(--purple-700); margin-bottom: 12px; display: block; position: relative; z-index: 1; }
.upload-zone .upload-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; position: relative; z-index: 1; }
.upload-zone .upload-hint { font-size: 11.5px; color: var(--text-muted); position: relative; z-index: 1; }

.upload-preview-wrapper { display: flex; align-items: center; justify-content: center; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 12px; min-height: 200px; position: relative; }
.upload-preview { max-width: 100%; max-height: 220px; border-radius: var(--radius-sm); display: none; }
.upload-preview-empty { text-align: center; color: var(--text-muted); }
.upload-preview-empty i { font-size: 36px; margin-bottom: 8px; display: block; opacity: 0.4; }
.upload-preview-empty p { font-size: 12px; }
.upload-preview-remove { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; background: rgba(239,68,68,0.9); color: #fff; border-radius: 50%; display: none; align-items: center; justify-content: center; cursor: pointer; font-size: 12px; transition: transform var(--transition-base); z-index: 2; }
.upload-preview-remove:hover { transform: scale(1.1); }
.upload-preview-remove.show { display: flex; }

/* Logo Section */
.logo-upload-section { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 20px; margin-bottom: 20px; }
.current-logo-display { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); }
.current-logo-display img { width: 80px; height: 80px; border-radius: var(--radius-md); border: 2px solid var(--border-color); object-fit: cover; }
.current-logo-info h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.current-logo-info p { font-size: 12px; color: var(--text-muted); }

/* Buttons */
.btn-submit { background: var(--gradient-main); color: #fff; padding: 13px 36px; border-radius: var(--radius-full); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow-purple); transition: all var(--transition-base); }
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 30px rgba(124,58,237,0.5); }
.btn-secondary-action { background: rgba(139,92,246,0.08); color: var(--purple-neon); border: 1px solid rgba(139,92,246,0.2); padding: 12px 24px; border-radius: var(--radius-full); font-size: 13px; font-weight: 600; transition: all var(--transition-base); }
.btn-secondary-action:hover { background: rgba(139,92,246,0.15); border-color: var(--purple-700); }
.btn-danger-action { background: rgba(239,68,68,0.1); color: var(--red-danger); border: 1px solid rgba(239,68,68,0.2); padding: 12px 24px; border-radius: var(--radius-full); font-size: 13px; font-weight: 600; transition: all var(--transition-base); }
.btn-danger-action:hover { background: rgba(239,68,68,0.2); }
.form-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* Stats */
.admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.admin-stat-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 20px; position: relative; overflow: hidden; transition: all var(--transition-base); }
.admin-stat-card::before { content: ''; position: absolute; inset: 0; background: var(--gradient-glass); opacity: 0; transition: opacity var(--transition-base); }
.admin-stat-card:hover { transform: translateY(-4px); border-color: var(--border-glow); box-shadow: var(--shadow-glow-md); }
.admin-stat-card:hover::before { opacity: 1; }
.admin-stat-icon { width: 48px; height: 48px; background: var(--gradient-main); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; margin-bottom: 12px; box-shadow: var(--shadow-purple); position: relative; z-index: 1; }
.admin-stat-value { font-size: 28px; font-weight: 900; background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; margin-bottom: 8px; position: relative; z-index: 1; }
.admin-stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; position: relative; z-index: 1; }
.admin-stat-trend { position: absolute; top: 16px; left: 16px; font-size: 11px; padding: 3px 8px; border-radius: var(--radius-xs); font-weight: 700; }
.trend-up { background: rgba(34,197,94,0.15); color: var(--green-success); }
.trend-down { background: rgba(239,68,68,0.15); color: var(--red-danger); }

/* Anime List in Admin */
.admin-list-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 12px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); flex-wrap: wrap; }
.admin-search { flex: 1; min-width: 200px; position: relative; }
.admin-search input { width: 100%; padding: 10px 16px 10px 40px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 13px; direction: rtl; }
.admin-search i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; }

.admin-anime-list { display: flex; flex-direction: column; gap: 8px; }
.admin-anime-item { display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); transition: all var(--transition-base); }
.admin-anime-item:hover { border-color: var(--border-glow); background: var(--bg-card-hover); }
.admin-anime-thumb { width: 50px; height: 68px; border-radius: var(--radius-xs); overflow: hidden; background: var(--bg-secondary); flex-shrink: 0; position: relative; }
.admin-anime-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-anime-thumb-edit { position: absolute; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; opacity: 0; cursor: pointer; transition: opacity var(--transition-base); }
.admin-anime-thumb:hover .admin-anime-thumb-edit { opacity: 1; }
.admin-anime-details { flex: 1; min-width: 0; }
.admin-anime-details h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-anime-details p { font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-anime-details p span { display: inline-flex; align-items: center; gap: 3px; }
.admin-anime-actions { display: flex; gap: 6px; flex-shrink: 0; }
.admin-anime-actions button { width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); background: transparent; color: var(--text-secondary); font-size: 12px; display: flex; align-items: center; justify-content: center; transition: all var(--transition-base); }
.btn-edit:hover { background: rgba(139,92,246,0.15); border-color: var(--purple-700); color: var(--purple-neon); }
.btn-feature:hover { background: rgba(251,191,36,0.15); border-color: var(--gold-accent); color: var(--gold-accent); }
.btn-feature.active { background: rgba(251,191,36,0.2); border-color: var(--gold-accent); color: var(--gold-accent); }
.btn-delete:hover { background: rgba(239,68,68,0.15); border-color: var(--red-danger); color: var(--red-danger); }

/* Theme Editor */
.color-picker-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-bottom: 16px; }
.color-picker-item { display: flex; align-items: center; gap: 8px; padding: 8px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); }
.color-picker-item input[type="color"] { width: 36px; height: 36px; border: none; border-radius: var(--radius-xs); cursor: pointer; background: none; padding: 0; }
.color-picker-item label { font-size: 11.5px; color: var(--text-secondary); font-weight: 600; }

/* Toggle Switch */
.toggle-switch { position: relative; width: 50px; height: 26px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-full); cursor: pointer; transition: all var(--transition-base); flex-shrink: 0; }
.toggle-switch::after { content: ''; position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; background: var(--text-muted); border-radius: 50%; transition: all var(--transition-base); }
.toggle-switch.active { background: var(--gradient-main); border-color: transparent; }
.toggle-switch.active::after { right: calc(100% - 22px); background: #fff; }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); margin-bottom: 12px; gap: 16px; }
.setting-row-info h5 { font-size: 13.5px; font-weight: 700; margin-bottom: 4px; }
.setting-row-info p { font-size: 11.5px; color: var(--text-muted); }

/* ==========================================
   PREMIUM DETAIL MODAL
   ========================================== */
.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(20px);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 16px;
}
.detail-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.detail-modal-content.premium-detail {
  width: 100%;
  max-width: 1100px;
  max-height: 92vh;
  background: linear-gradient(165deg, #0f0a1f, #08060f);
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  overflow: hidden;
  position: relative;
  animation: slideUpScale 0.4s var(--transition-bounce);
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 100px rgba(124, 58, 237, 0.15);
}

.detail-modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 38px;
  height: 38px;
  background: rgba(8, 6, 15, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  z-index: 10;
  transition: all var(--transition-base);
  cursor: pointer;
}

.detail-modal-close:hover {
  background: rgba(239, 68, 68, 0.85);
  transform: rotate(90deg);
}

/* Tabs */
.detail-tabs {
  display: flex;
  gap: 0;
  padding: 18px 24px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.detail-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.detail-tab:hover {
  color: var(--text-primary);
}

.detail-tab.active {
  color: var(--pink-light);
  border-bottom-color: var(--pink-accent);
}

.detail-tab.active::before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple-700), var(--pink-accent));
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 12px var(--pink-accent);
}

.detail-tab i { font-size: 13px; }

/* Body Layout */
.detail-body {
  flex: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  padding: 30px;
  overflow-y: auto;
}

/* Right Side: Poster + Quick Info */
.detail-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-poster-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6), 0 0 30px rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.2);
  aspect-ratio: 3 / 4.3;
}

.detail-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.detail-poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.detail-poster-wrap:hover .detail-poster-overlay {
  opacity: 1;
}

.detail-poster-wrap:hover .detail-poster {
  transform: scale(1.05);
}

.detail-watch-overlay {
  background: var(--gradient-main);
  border: none;
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.6);
  transition: transform 0.2s ease;
}

.detail-watch-overlay:hover {
  transform: scale(1.08);
}

/* Quick Info List */
.detail-quick-info {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.quick-row:last-of-type {
  border-bottom: none;
}

.quick-label {
  color: var(--text-muted);
  font-weight: 600;
}

.quick-value {
  color: var(--text-primary);
  font-weight: 700;
}

.quick-value.purple {
  color: var(--pink-light);
}

.quick-views {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(217, 70, 239, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
  margin-top: 4px;
  justify-content: center;
}

.quick-views i {
  color: var(--purple-neon);
  font-size: 14px;
}

.quick-views-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.quick-views-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Left Side: Main Content */
.detail-main {
  min-width: 0;
}

.detail-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

.detail-title-big {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 8px;
  color: var(--text-primary);
  background: linear-gradient(135deg, #fff, #d8b4fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.detail-subtitle-en {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 16px;
}

.detail-genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.genre-pill {
  padding: 5px 14px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--purple-light);
  transition: all var(--transition-base);
}

.genre-pill:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--purple-700);
  transform: translateY(-1px);
}

/* Ratings */
.detail-ratings {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.rating-box {
  flex: 1;
  min-width: 130px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.rating-box.mal { border-color: rgba(46, 81, 162, 0.3); background: rgba(46, 81, 162, 0.06); }
.rating-box.otaku { border-color: rgba(217, 70, 239, 0.3); background: rgba(217, 70, 239, 0.06); }

.rating-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rating-box.mal .rating-label { color: #6b8df0; }
.rating-box.otaku .rating-label { color: var(--pink-light); }

.rating-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 900;
}

.rating-value i {
  color: var(--gold-accent);
  filter: drop-shadow(0 0 6px var(--gold-accent));
  font-size: 18px;
}

/* Section */
.detail-section {
  margin-bottom: 24px;
}

.detail-section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-section-title i {
  color: var(--pink-accent);
  font-size: 16px;
}

.detail-synopsis {
  font-size: 13.5px;
  line-height: 2;
  color: var(--text-secondary);
  text-align: justify;
}

/* Action buttons */
.detail-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-icon-action {
  width: 44px;
  height: 44px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--purple-light);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all var(--transition-base);
}

.btn-icon-action:hover {
  background: rgba(139, 92, 246, 0.2);
  color: var(--purple-neon);
  transform: translateY(-2px);
}

/* Watch Options */
.watch-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.watch-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: all var(--transition-base);
}

.watch-option:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateX(4px);
}

.watch-option-icon {
  width: 52px;
  height: 52px;
  background: var(--gradient-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.watch-option-icon.trailer-icon {
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
}

.watch-option-icon.download-icon {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}

.watch-option-info {
  flex: 1;
  min-width: 0;
}

.watch-option-info h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.watch-option-info p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.watch-option-btn {
  background: var(--gradient-main);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-base);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
  flex-shrink: 0;
}

.watch-option-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.55);
}

.watch-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.watch-empty i {
  font-size: 48px;
  color: var(--purple-700);
  opacity: 0.5;
  margin-bottom: 16px;
}

.watch-empty h4 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.watch-empty p {
  font-size: 13px;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.info-cell {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.info-cell-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.info-cell-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 700;
}

/* Other Titles */
.other-titles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.title-row {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 13px;
}

.title-label {
  color: var(--text-muted);
  font-weight: 700;
  min-width: 90px;
}

.title-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================
   PREMIUM VIDEO PLAYER
   ========================================== */
.video-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(217, 70, 239, 0.08));
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 12px;
}

.video-modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-modal-header h3 i {
  color: var(--purple-neon);
  filter: drop-shadow(0 0 8px var(--purple-neon));
  font-size: 18px;
  flex-shrink: 0;
}

/* Top Controls */
.video-controls-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.vctrl {
  position: relative;
}

.vctrl-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.vctrl-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--purple-700);
}

.vctrl-btn i {
  font-size: 13px;
}

.vctrl-label {
  font-size: 11.5px;
  color: var(--purple-300);
}

.vctrl-close {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: var(--red-danger) !important;
  width: 36px;
  padding: 8px !important;
  justify-content: center;
}

.vctrl-close:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  transform: scale(1.05);
}

/* Dropdown Menu */
.vctrl-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: rgba(8, 6, 15, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  min-width: 160px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: none;
  z-index: 100;
  animation: slideUpScale 0.2s ease;
}

.vctrl-menu.open {
  display: block;
}

.vctrl-menu-title {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  padding: 6px 10px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vctrl-menu button {
  display: block;
  width: 100%;
  text-align: right;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.vctrl-menu button:hover {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple-neon);
}

.vctrl-menu button.active {
  background: rgba(139, 92, 246, 0.2);
  color: var(--pink-light);
}

.vctrl-menu button.active::before {
  content: '✓ ';
  color: var(--green-success);
}

/* Video Footer */
.video-modal-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-color);
  font-size: 11.5px;
  color: var(--text-muted);
}

.video-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.video-info i {
  color: var(--cyan-accent);
}

.video-info kbd {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-family: monospace;
  color: var(--purple-light);
  margin: 0 2px;
}

/* Toast */
.toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(120px); padding: 14px 28px; background: var(--bg-card); border: 1px solid var(--purple-700); border-radius: var(--radius-full); color: var(--text-primary); font-size: 13.5px; font-weight: 600; z-index: 99999; display: flex; align-items: center; gap: 12px; box-shadow: 0 10px 40px rgba(124,58,237,0.3); transition: transform var(--transition-bounce); max-width: 90%; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast-icon { width: 28px; height: 28px; background: var(--gradient-main); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; flex-shrink: 0; }
.toast.success .toast-icon { background: linear-gradient(135deg, #22c55e, #16a34a); }
.toast.error .toast-icon { background: linear-gradient(135deg, #ef4444, #dc2626); }
.toast.warning .toast-icon { background: linear-gradient(135deg, #f97316, #ea580c); }

/* Confirm */
.confirm-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.85); backdrop-filter: blur(15px); display: none; justify-content: center; align-items: center; padding: 16px; }
.confirm-overlay.active { display: flex; animation: fadeIn 0.2s ease; }
.confirm-dialog { width: 100%; max-width: 420px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 24px; text-align: center; animation: slideUpScale 0.3s var(--transition-bounce); }
.confirm-icon { width: 64px; height: 64px; background: rgba(239,68,68,0.1); border: 2px solid rgba(239,68,68,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--red-danger); font-size: 24px; margin: 0 auto 16px; }
.confirm-title { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.confirm-message { font-size: 13.5px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.7; }
.confirm-buttons { display: flex; gap: 8px; justify-content: center; }
.confirm-btn { padding: 10px 24px; border-radius: var(--radius-full); font-size: 13px; font-weight: 700; transition: all var(--transition-base); }
.confirm-btn-cancel { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-secondary); }
.confirm-btn-cancel:hover { background: var(--bg-card-hover); }
.confirm-btn-confirm { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; box-shadow: 0 4px 20px rgba(239,68,68,0.3); }
.confirm-btn-confirm:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(239,68,68,0.4); }

/* Responsive Admin */
@media (max-width: 992px) {
  .admin-sidebar { display: none; }
  .admin-content { padding: 20px; }
  .form-row, .form-row-3, .image-upload-section { grid-template-columns: 1fr; }
  .detail-modal-body { grid-template-columns: 1fr; text-align: center; }
  .detail-poster { margin: 0 auto; }
}

@media (max-width: 600px) {
  /* Admin Panel - Mobile */
  .admin-overlay { padding: 8px; }
  .admin-panel { width: 100%; max-height: 96vh; border-radius: 16px; }
  .admin-header { padding: 14px 16px; flex-wrap: wrap; gap: 8px; }
  .admin-header-icon { width: 36px; height: 36px; font-size: 16px; }
  .admin-header h2 { font-size: 16px; }
  .admin-header p { font-size: 11px; }
  .admin-header-actions { gap: 6px; flex-wrap: wrap; }
  .admin-export-btn, .admin-import-btn { padding: 7px 12px; font-size: 11px; }
  .admin-export-btn span, .admin-import-btn span { display: none; }
  .admin-close { width: 32px; height: 32px; font-size: 13px; }
  .admin-content { padding: 16px; }

  .admin-tab-title { font-size: 16px; }
  .admin-stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .admin-stat-card { padding: 14px; }
  .admin-stat-icon { width: 36px; height: 36px; font-size: 16px; margin-bottom: 8px; }
  .admin-stat-value { font-size: 20px; margin-bottom: 4px; }
  .admin-stat-label { font-size: 10.5px; }
  .admin-stat-trend { font-size: 9.5px; padding: 2px 6px; top: 12px; left: 12px; }

  .admin-tab-header { flex-direction: column; align-items: stretch; }
  .admin-anime-item { padding: 10px 12px; gap: 10px; flex-wrap: wrap; }
  .admin-anime-thumb { width: 42px; height: 56px; }
  .admin-anime-details h4 { font-size: 13px; }
  .admin-anime-details p { font-size: 10.5px; gap: 8px; }
  .admin-anime-actions button { width: 30px; height: 30px; font-size: 11px; }

  .form-group label { font-size: 12px; }
  .form-group input, .form-group select, .form-group textarea { padding: 10px 14px; font-size: 12.5px; }
  .upload-zone { padding: 24px 12px; }
  .upload-zone i { font-size: 32px; }
  .upload-zone .upload-title { font-size: 12.5px; }
  .upload-zone .upload-hint { font-size: 10.5px; }

  .btn-submit { padding: 11px 24px; font-size: 12.5px; }
  .btn-secondary-action, .btn-danger-action { padding: 10px 18px; font-size: 12px; }

  .setting-row { padding: 12px 14px; gap: 12px; }
  .setting-row-info h5 { font-size: 12.5px; }
  .setting-row-info p { font-size: 10.5px; }

  /* Detail Modal - Mobile (Premium) */
  .detail-modal { padding: 8px; }
  .detail-modal-content.premium-detail { max-height: 95vh; border-radius: 16px; }
  .detail-modal-close { top: 12px; left: 12px; width: 34px; height: 34px; font-size: 12px; }
  .detail-tabs { padding: 12px 16px 0; gap: 0; }
  .detail-tab { padding: 10px 14px; font-size: 12px; }
  .detail-tab i { font-size: 12px; }
  .detail-body { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .detail-side { flex-direction: row; gap: 12px; }
  .detail-poster-wrap { flex: 0 0 130px; aspect-ratio: 3 / 4.3; }
  .detail-quick-info { flex: 1; padding: 12px; gap: 8px; }
  .quick-row { font-size: 11.5px; padding: 3px 0; }
  .detail-watch-overlay { padding: 8px 14px; font-size: 11px; }
  .detail-watch-overlay span { display: none; }
  .quick-views { padding: 8px; }
  .quick-views-num { font-size: 13px; }
  .quick-views-label { font-size: 10px; }

  .detail-title-big { font-size: 20px; }
  .detail-subtitle-en { font-size: 12px; margin-bottom: 12px; }
  .genre-pill { font-size: 10.5px; padding: 4px 10px; }
  .detail-ratings { gap: 8px; margin-bottom: 18px; }
  .rating-box { padding: 10px 12px; min-width: 110px; }
  .rating-label { font-size: 10px; margin-bottom: 4px; }
  .rating-value { font-size: 16px; gap: 6px; }
  .rating-value i { font-size: 14px; }
  .detail-section-title { font-size: 13.5px; gap: 8px; }
  .detail-section-title i { font-size: 14px; }
  .detail-synopsis { font-size: 12.5px; line-height: 1.9; }
  .detail-actions-row { gap: 8px; }
  .btn-icon-action { width: 40px; height: 40px; font-size: 13px; }

  /* Watch Options - Mobile */
  .watch-option { padding: 12px 14px; gap: 12px; flex-wrap: wrap; }
  .watch-option-icon { width: 44px; height: 44px; font-size: 18px; }
  .watch-option-info h4 { font-size: 13.5px; }
  .watch-option-info p { font-size: 11.5px; }
  .watch-option-btn { padding: 8px 16px; font-size: 12px; }

  .info-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .info-cell { padding: 10px 12px; }
  .info-cell-label { font-size: 10.5px; margin-bottom: 4px; }
  .info-cell-value { font-size: 12.5px; }

  .title-row { padding: 8px 12px; font-size: 12px; flex-direction: column; gap: 4px; }
  .title-label { min-width: auto; }

  /* Video Player - Mobile */
  .video-modal { padding: 6px; }
  .video-modal-content { border-radius: 14px; }
  .video-modal-header { padding: 10px 12px; gap: 8px; }
  .video-modal-header h3 { font-size: 12px; flex: 1 0 100%; order: -1; }
  .video-modal-header h3 i { font-size: 14px; }
  .video-controls-top { width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 4px; }
  .vctrl-btn { padding: 6px 10px; font-size: 11px; }
  .vctrl-btn i { font-size: 11px; }
  .vctrl-label { font-size: 10.5px; }
  .vctrl-close { width: 32px; padding: 6px !important; }
  .vctrl-menu { min-width: 130px; padding: 6px; }
  .vctrl-menu-title { font-size: 10px; padding: 4px 8px 2px; }
  .vctrl-menu button { font-size: 11.5px; padding: 6px 10px; }
  .video-modal-footer { padding: 8px 12px; }
  .video-info { font-size: 10.5px; }
  .video-info kbd { font-size: 9px; padding: 1px 4px; }

  /* Detail close fix */
  .detail-modal-close {
    top: 10px;
    left: 10px;
  }

  /* Toast - Mobile */
  .toast { padding: 11px 20px; font-size: 12.5px; bottom: 20px; max-width: 92%; }
  .toast-icon { width: 24px; height: 24px; font-size: 11px; }

  /* Confirm Dialog - Mobile */
  .confirm-dialog { padding: 20px; max-width: 92%; border-radius: 16px; }
  .confirm-icon { width: 52px; height: 52px; font-size: 20px; margin-bottom: 12px; }
  .confirm-title { font-size: 15px; }
  .confirm-message { font-size: 12.5px; margin-bottom: 16px; }
  .confirm-btn { padding: 9px 20px; font-size: 12px; }
}

/* ==========================================
   EPISODES MANAGER
   ========================================== */
.episodes-manager-block {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(28, 20, 53, 0.4));
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.ep-manager-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-color);
}

.ep-manager-header h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ep-manager-header h4 i {
  color: var(--purple-neon);
  font-size: 16px;
}

.ep-manager-header small {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
  display: block;
}

/* لیست قسمت‌ها */
.ep-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.ep-list-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
}

.ep-list-empty i {
  margin-left: 6px;
  color: var(--cyan-accent);
}

.ep-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.ep-item:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateX(-3px);
}

.ep-item-num {
  width: 40px;
  height: 40px;
  background: var(--gradient-main);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.ep-item-info {
  flex: 1;
  min-width: 0;
}

.ep-item-info h5 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.ep-item-info p {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin: 0;
}

.ep-item-info p span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ep-item-info p i {
  font-size: 10px;
}

.ep-item-del {
  width: 32px;
  height: 32px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  color: var(--red-danger);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.ep-item-del:hover {
  background: rgba(239, 68, 68, 0.25);
  transform: scale(1.05);
}

/* فرم افزودن قسمت */
.ep-add-form {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
}

.ep-add-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.btn-add-episode {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--green-success), #16a34a);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-add-episode:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.5);
}

@media (max-width: 600px) {
  .episodes-manager-block { padding: 14px; }
  .ep-manager-header h4 { font-size: 14px; }
  .ep-manager-header small { font-size: 11px; }
  .ep-item { padding: 10px; gap: 10px; }
  .ep-item-num { width: 34px; height: 34px; font-size: 14px; }
  .ep-item-info h5 { font-size: 12.5px; }
  .ep-item-info p { font-size: 10.5px; gap: 8px; }
  .ep-item-del { width: 28px; height: 28px; font-size: 11px; }
  .ep-add-row { flex-direction: column; gap: 8px; }
  .ep-add-row .form-group { flex: 1 !important; width: 100%; }
  .btn-add-episode { padding: 11px 16px; font-size: 12.5px; }
}
.video-input-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.video-input-group input {
  flex: 1;
  min-width: 0;
}

.video-upload-btn {
  padding: 0 18px;
  background: linear-gradient(135deg, var(--purple-700), var(--pink-accent));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.video-upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
  background: linear-gradient(135deg, var(--pink-accent), var(--purple-700));
}

.video-upload-btn i {
  font-size: 14px;
}

/* وضعیت آپلود */
.upload-status {
  margin-top: 8px;
}

.upload-status:empty { display: none; }

.upload-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: var(--radius-md);
  color: var(--cyan-accent);
  font-size: 13px;
}

.upload-success {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: var(--radius-md);
  font-size: 13px;
  animation: slideInUp 0.3s ease;
}

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

.upload-success > i {
  color: var(--green-success);
  font-size: 20px;
  flex-shrink: 0;
}

.upload-success > span {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.upload-success strong {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-success small {
  font-size: 11px;
  color: var(--text-muted);
}

.upload-success button {
  width: 30px;
  height: 30px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: var(--red-danger);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.upload-success button:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: rotate(90deg);
}

.upload-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  color: var(--red-danger);
  font-size: 13px;
}

/* راهنمای فرم */
.form-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.form-hint i {
  color: var(--cyan-accent);
  font-size: 11px;
}

/* نشان آپلود فعال */
.form-group input.has-upload {
  background: rgba(34, 197, 94, 0.06);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--green-success);
  font-size: 11px;
  letter-spacing: 0.5px;
}

@media (max-width: 600px) {
  .video-input-group {
    flex-direction: column;
  }
  .video-upload-btn {
    padding: 11px 16px;
    justify-content: center;
  }
  .upload-success { flex-wrap: wrap; }
  .upload-success > span { width: calc(100% - 50px); }
}
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(15px);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.video-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.video-modal-content {
  width: 100%;
  max-width: 1200px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  animation: slideUpScale 0.4s var(--transition-bounce);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8), 0 0 100px rgba(124, 58, 237, 0.3);
}

.video-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(217, 70, 239, 0.08));
  border-bottom: 1px solid var(--border-color);
}

.video-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.video-modal-header h3 i {
  color: var(--purple-neon);
  filter: drop-shadow(0 0 8px var(--purple-neon));
  font-size: 20px;
}

.video-close {
  width: 38px;
  height: 38px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  color: var(--red-danger);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.video-close:hover {
  background: rgba(239, 68, 68, 0.25);
  transform: scale(1.05);
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
}

#videoPlayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#videoPlayer iframe,
#videoPlayer video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000;
}

@media (max-width: 600px) {
  .video-modal { padding: 10px; }
  .video-modal-content { border-radius: var(--radius-lg); }
  .video-modal-header { padding: 12px 14px; }
  .video-modal-header h3 { font-size: 13px; }
  .video-modal-header h3 i { font-size: 16px; }
  .video-close { width: 32px; height: 32px; font-size: 12px; }
}
.password-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 16px;
}
.password-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.password-modal-content {
  width: 100%;
  max-width: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: 36px 32px;
  text-align: center;
  position: relative;
  animation: slideUpScale 0.4s var(--transition-bounce);
  box-shadow: var(--shadow-xl);
}

.password-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.password-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-danger);
}

.password-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.5);
  animation: lockBounce 2s ease-in-out infinite;
}

@keyframes lockBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-4px) rotate(-3deg); }
  75% { transform: translateY(-4px) rotate(3deg); }
}

.password-modal-content h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.password-modal-content > p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.password-input-wrapper {
  position: relative;
}

.password-input-wrapper i {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--purple-300);
  font-size: 14px;
}

.password-input-wrapper input {
  width: 100%;
  padding: 14px 48px 14px 18px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  text-align: center;
  letter-spacing: 4px;
  transition: all var(--transition-base);
}

.password-input-wrapper input:focus {
  outline: none;
  border-color: var(--purple-700);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.password-input-wrapper input.error {
  border-color: var(--red-danger);
  animation: shakeError 0.4s ease;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.password-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
  margin-bottom: 0 !important;
}

.password-hint code {
  background: rgba(139,92,246,0.1);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--purple-neon);
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 1px;
}

/* ==========================================
   UPLOADS LIST
   ========================================== */
.uploads-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.upload-item:hover {
  border-color: var(--border-glow);
  transform: translateX(4px);
}

.upload-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}

.upload-item-icon.video { background: linear-gradient(135deg, #ef4444, #dc2626); }
.upload-item-icon.image { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.upload-item-icon.pdf { background: linear-gradient(135deg, #f59e0b, #d97706); }
.upload-item-icon.archive { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.upload-item-icon.other { background: linear-gradient(135deg, #64748b, #475569); }

.upload-item-info { flex: 1; min-width: 0; }

.upload-item-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-item-info p {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.upload-item-info p span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.upload-tag-file {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green-success);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px !important;
}

.upload-tag-link {
  background: rgba(34, 211, 238, 0.15);
  color: var(--cyan-accent);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px !important;
}

.upload-item-info small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.6;
}

.upload-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.upload-item-actions button,
.upload-item-actions a {
  width: 36px;
  height: 36px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--purple-300);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all var(--transition-base);
  text-decoration: none;
}

.upload-item-actions button:hover,
.upload-item-actions a:hover {
  background: rgba(139, 92, 246, 0.2);
  color: var(--purple-neon);
  transform: translateY(-2px);
}

.upload-item-actions button.danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red-danger);
}

.upload-item-actions button.danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

@media (max-width: 600px) {
  .password-modal-content { padding: 28px 22px; max-width: 92%; }
  .password-icon { width: 64px; height: 64px; font-size: 26px; margin-bottom: 16px; }
  .password-modal-content h3 { font-size: 19px; }
  .password-input-wrapper input { font-size: 14px; padding: 12px 42px 12px 14px; letter-spacing: 2px; }

  .upload-item { padding: 12px; gap: 10px; flex-wrap: wrap; }
  .upload-item-icon { width: 40px; height: 40px; font-size: 16px; }
  .upload-item-info h4 { font-size: 13px; }
  .upload-item-info p { font-size: 10.5px; gap: 8px; }
  .upload-item-actions button, .upload-item-actions a { width: 32px; height: 32px; font-size: 12px; }
}

/* 📺 Modal مدیریت قسمت‌ها */
.ep-mgr-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  font-family: 'Vazirmatn', sans-serif !important;
  pointer-events: auto !important;
}
.ep-mgr-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  animation: epMgrFadeIn 0.2s ease-out;
}
.ep-mgr-panel {
  position: relative !important;
  width: calc(100% - 40px) !important;
  max-width: 720px !important;
  margin: 5vh auto !important;
  background: linear-gradient(180deg, #1a1a2e, #0f0f1e) !important;
  border: 1px solid rgba(139, 92, 246, 0.3) !important;
  border-radius: 20px !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(139, 92, 246, 0.2) !important;
  max-height: 90vh !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  animation: epMgrSlideUp 0.3s ease-out;
}
@keyframes epMgrFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes epMgrSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.ep-mgr-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 18px 22px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(139, 92, 246, 0.05) !important;
  flex-shrink: 0 !important;
}
.ep-mgr-body {
  padding: 20px !important;
  overflow-y: auto !important;
  flex: 1 !important;
  min-height: 0 !important;
}
.ep-mgr-body::-webkit-scrollbar { width: 6px; }
.ep-mgr-body::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 3px;
}

/* رو ها و فیلدها */
.ep-mgr-row {
  display: grid !important;
  grid-template-columns: 80px 130px 110px 1fr !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}
.ep-mgr-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  margin: 0 !important;
}
.ep-mgr-field label {
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
  margin: 0 !important;
}
.ep-mgr-field input,
.ep-mgr-field select,
.ep-mgr-modal input[type="url"],
.ep-mgr-modal input[type="text"],
.ep-mgr-modal input[type="number"],
.ep-mgr-modal select {
  padding: 9px 12px !important;
  border-radius: 8px !important;
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  font-size: 12.5px !important;
  font-family: 'Vazirmatn', sans-serif !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.ep-mgr-field input:focus,
.ep-mgr-field select:focus,
.ep-mgr-modal input:focus,
.ep-mgr-modal select:focus {
  outline: none !important;
  border-color: rgba(139, 92, 246, 0.6) !important;
  background: rgba(0, 0, 0, 0.6) !important;
}

@media (max-width: 768px) {
  .ep-mgr-panel {
    width: 100% !important;
    margin: 0 !important;
    max-height: 100vh !important;
    height: 100vh !important;
    border-radius: 0 !important;
  }
  .ep-mgr-row {
    grid-template-columns: 1fr 1fr !important;
  }
  .ep-mgr-row .ep-mgr-field:last-child {
    grid-column: 1 / -1 !important;
  }
}
