/* =================================================================
   Quiz Video System - Complete Application Styles
   ================================================================= */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f3f4f6;
  color: #111827;
  overflow: auto;
  /* Support for safe areas on mobile devices (notches, navigation bars) */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* =================================================================
   Header
   ================================================================= */

.app-header {
  /* Keep header light; slightly darker cream vs page background */
  background: #f7f3e8;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.08);
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.toggle-btn {
  background: none;
  border: none;
  color: #111827;
  font-size: 24px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background 0.2s;
}

.toggle-btn:hover {
  background: #f3f4f6;
}

.app-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info {
  font-size: 14px;
  color: #374151;
  padding: 8px 15px;
  background: #f3f4f6;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
}

/* =================================================================
   Main Container
   ================================================================= */

.main-container {
  display: flex;
  flex: 1;
  overflow: visible;
}

/* =================================================================
   Sidebar Navigation
   ================================================================= */

.sidebar {
  width: 250px;
  /* Light cream sidebar to differentiate from content */
  background: #fbf8f1;
  border-right: 1px solid #e5e7eb;
  overflow-y: auto;
  transition: transform 0.3s, width 0.3s;
  flex-shrink: 0;
}

.sidebar.collapsed {
  transform: translateX(-250px);
  width: 0;
}

.nav-menu {
  padding: 20px 0;
}

.nav-section {
  margin-bottom: 20px;
}

.nav-section-title {
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: #111827;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: #f3f4f6;
  color: #111827;
}

.nav-item.active {
  background: #f1efe6;
  color: #0f7a2e;
  border-left-color: #4CAF50;
}

.nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: #6b7280;
  mask-size: cover;
  -webkit-mask-size: cover;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
}

.icon-menu {
  width: 20px;
  height: 20px;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E");
}

.icon-dashboard {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 13h8V3H3v10zm10 8h8v-6h-8v6zM3 21h8v-6H3v6zm10-8h8V3h-8v10z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 13h8V3H3v10zm10 8h8v-6h-8v6zM3 21h8v-6H3v6zm10-8h8V3h-8v10z'/%3E%3C/svg%3E");
}

.icon-designer {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 7h16M4 7v10a2 2 0 002 2h12a2 2 0 002-2V7M9 7V5a3 3 0 016 0v2'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 7h16M4 7v10a2 2 0 002 2h12a2 2 0 002-2V7M9 7V5a3 3 0 016 0v2'/%3E%3C/svg%3E");
}

.icon-video {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14.752 11.168l-6.5-3.75A1 1 0 007 8.25v7.5a1 1 0 001.252.982l6.5-1.875A1 1 0 0015 13.91v-2.742a1 1 0 00-.248-.994z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 8V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2h14a2 2 0 002-2v-2'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14.752 11.168l-6.5-3.75A1 1 0 007 8.25v7.5a1 1 0 001.252.982l6.5-1.875A1 1 0 0015 13.91v-2.742a1 1 0 00-.248-.994z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 8V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2h14a2 2 0 002-2v-2'/%3E%3C/svg%3E");
}

.icon-audio {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M11 5a2 2 0 012-2h4a2 2 0 012 2v11a4 4 0 11-8 0V5z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M7 9h4'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M11 5a2 2 0 012-2h4a2 2 0 012 2v11a4 4 0 11-8 0V5z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M7 9h4'/%3E%3C/svg%3E");
}

.icon-data {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 6h16M4 10h16M4 14h16M4 18h16'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 6h16M4 10h16M4 14h16M4 18h16'/%3E%3C/svg%3E");
}

.icon-media {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 7h16a2 2 0 012 2v8a2 2 0 01-2 2H4a2 2 0 01-2-2V9a2 2 0 012-2z'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14 14l3-3 3 3'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 7h16a2 2 0 012 2v8a2 2 0 01-2 2H4a2 2 0 01-2-2V9a2 2 0 012-2z'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14 14l3-3 3 3'/%3E%3C/svg%3E");
}

.icon-font {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 4h14M9 4v16m6-16v16M7 20h10'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 4h14M9 4v16m6-16v16M7 20h10'/%3E%3C/svg%3E");
}

.icon-file {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14 2v6h6'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14 2v6h6'/%3E%3C/svg%3E");
}

.icon-download {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 16v1a2 2 0 002 2h12a2 2 0 002-2v-1M12 12v7m0-7l-3 3m3-3l3 3M12 4v8'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 16v1a2 2 0 002 2h12a2 2 0 002-2v-1M12 12v7m0-7l-3 3m3-3l3 3M12 4v8'/%3E%3C/svg%3E");
}

.icon-upload {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 16v1a2 2 0 002 2h12a2 2 0 002-2v-1M12 4v7m0-7l-3 3m3-3l3 3M12 11v7'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 16v1a2 2 0 002 2h12a2 2 0 002-2v-1M12 4v7m0-7l-3 3m3-3l3 3M12 11v7'/%3E%3C/svg%3E");
}

.icon-edit {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M11 5h2m-1 0v14m-5 0h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M11 5h2m-1 0v14m-5 0h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2z'/%3E%3C/svg%3E");
}

.icon-trash {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 6h18M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2m-1 0v14a2 2 0 01-2 2H9a2 2 0 01-2-2V6h10z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 6h18M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2m-1 0v14a2 2 0 01-2 2H9a2 2 0 01-2-2V6h10z'/%3E%3C/svg%3E");
}

.nav-label {
  font-size: 14px;
  font-weight: 500;
}

/* =================================================================
   Content Area
   ================================================================= */

.content {
  flex: 1;
  overflow-y: auto;
  background: #f3f4f6;
  padding: 30px;
  /* Add padding for Android navigation bar */
  padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px));
}

.content-header {
  margin-bottom: 30px;
}

.content-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #4CAF50;
}

.content-description {
  font-size: 14px;
  color: #999;
}

/* =================================================================
   Loading State
   ================================================================= */

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #6b7280;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e5e7eb;
  border-top-color: #4CAF50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =================================================================
   Common UI Components
   ================================================================= */

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: #4CAF50;
  color: white;
}

.btn-primary:hover {
  background: #45a049;
}

.btn-secondary {
  background: #2196F3;
  color: white;
}

.btn-secondary:hover {
  background: #0b7dda;
}

.btn-danger {
  background: #f44336;
  color: white;
}

.btn-danger:hover {
  background: #da190b;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn:disabled {
  background: #666;
  color: #999;
  cursor: not-allowed;
}

/* Cards */
.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.card-body {
  color: #374151;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #111827;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: #4CAF50;
}

input[type="number"].form-control {
  appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 18px;
  padding-right: 38px;
}

input[type="color"] {
  height: 40px;
  cursor: pointer;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.table thead {
  background: #f9fafb;
}

.table th {
  padding: 15px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e5e7eb;
}

.table td {
  padding: 15px;
  border-top: 1px solid #e5e7eb;
  color: #111827;
}

.table tbody tr:hover {
  background: #f9fafb;
}

/* Grid */
.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.empty-state-title {
  font-size: 18px;
  margin-bottom: 10px;
  color: #111827;
}

.empty-state-description {
  font-size: 14px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 24, 39, 0.35);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(17, 24, 39, 0.18);
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.modal-close {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s;
}

.modal-close:hover {
  background: #e5e7eb;
  color: #111827;
}

.modal-body {
  padding: 20px;
  color: #111827;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success {
  background: #4CAF50;
  color: white;
}

.badge-warning {
  background: #ff9800;
  color: white;
}

.badge-danger {
  background: #f44336;
  color: white;
}

.badge-info {
  background: #2196F3;
  color: white;
}

/* Alerts */
.alert {
  padding: 15px 20px;
  border-radius: 4px;
  margin-bottom: 20px;
  border-left: 4px solid;
}

.alert-success {
  background: rgba(76, 175, 80, 0.1);
  border-color: #4CAF50;
  color: #4CAF50;
}

.alert-error {
  background: rgba(244, 67, 54, 0.1);
  border-color: #f44336;
  color: #f44336;
}

.alert-warning {
  background: rgba(255, 152, 0, 0.1);
  border-color: #ff9800;
  color: #ff9800;
}

.alert-info {
  background: rgba(33, 150, 243, 0.1);
  border-color: #2196F3;
  color: #2196F3;
}

/* =================================================================
   Scrollbar Styling
   ================================================================= */

.sidebar::-webkit-scrollbar,
.content::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.content::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
  background: #f3f4f6;
}

.sidebar::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.content::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* =================================================================
   Responsive Design
   ================================================================= */

/* =================================================================
   Mobile Responsive Styles - Comprehensive
   ================================================================= */

@media (max-width: 768px) {
  /* Header adjustments */
  .app-header {
    padding: 10px 14px;
    height: 56px;
  }

  .media-filters {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .media-filters .form-control,
  .media-filters .search-input {
    width: 100% !important;
  }

  .media-bulk-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .media-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .media-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .media-grid {
    grid-template-columns: 1fr;
  }

  .media-pagination > div {
    flex-direction: column;
    align-items: stretch;
  }

  .media-pagination button {
    width: 100%;
  }

  .fonts-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .fonts-search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .fonts-search-bar .form-control {
    width: 100%;
  }

  .font-preview {
    padding: 20px 12px;
  }

  .font-info {
    padding: 12px;
  }

  .font-actions {
    padding: 0 12px 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .media-upload-card .card-body {
    padding: 12px;
  }

  .upload-area {
    padding: 24px 12px;
  }

  .video-options-grid {
    grid-template-columns: 1fr !important;
  }

  .video-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .header-left {
    gap: 10px;
  }

  .toggle-btn {
    font-size: 22px;
    padding: 6px 8px;
  }
  
  .app-title {
    font-size: 16px;
  }
  
  .header-right {
    gap: 8px !important;
  }
  
  .user-info {
    display: none; /* Hide on small screens */
  }
  
  #logoutBtn {
    padding: 8px 12px !important;
    font-size: 14px;
  }
  
  /* Sidebar - slide-in from left */
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 56px;
    height: calc(100vh - 56px);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  /* Overlay for sidebar */
  .sidebar.active::before {
    content: '';
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    z-index: -1;
  }
  
  
  .content {
    padding: 16px;
    width: 100%;
    /* Add extra padding for Android navigation bar on tablets */
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 20px));
  }
  
  /* Content header */
  .content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
  }
  
  .content-title {
    font-size: 22px;
  }
  
  .content-description {
    font-size: 13px;
  }
  
  /* Buttons */
  .btn {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .btn-group {
    flex-wrap: wrap;
    gap: 8px;
  }

  .btn-group .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Forms */
  .form-group {
    margin-bottom: 16px;
  }
  
  .form-label {
    font-size: 14px;
    margin-bottom: 6px;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px; /* Prevents iOS zoom */
    padding: 10px 12px;
  }
  
  /* Tables - make scrollable */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  table {
    min-width: 600px; /* Force horizontal scroll for wide tables */
  }
  
  /* Cards/Grid */
  .card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .card {
    padding: 16px;
  }
  
  /* Modals */
  .modal-content {
    width: calc(100% - 32px);
    max-width: 500px;
    margin: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }
  
  .modal-header {
    padding: 16px;
  }
  
  .modal-body {
    padding: 16px;
  }
  
  .modal-footer {
    padding: 16px;
    flex-direction: column-reverse;
    gap: 8px;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
  
  /* Search bar */
  .search-bar {
    flex-direction: column;
    gap: 12px;
  }
  
  .search-input {
    width: 100%;
  }
}

/* Small mobile phones */
@media (max-width: 480px) {
  .app-header {
    padding: 10px 12px;
  }
  
  .app-title {
    font-size: 14px;
  }
  
  .content {
    padding: 12px;
    /* Add extra padding for Android navigation bar on mobile */
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 20px));
  }
  
  .content-title {
    font-size: 20px;
  }
  
  .btn {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .modal-content {
    width: calc(100% - 16px);
    margin: 8px;
  }
  
  /* Hide non-essential table columns on very small screens */
  .table-hide-mobile {
    display: none;
  }
}

/* Landscape mobile phones */
@media (max-width: 768px) and (orientation: landscape) {
  .sidebar {
    width: 220px;
  }
  
  .content {
    padding: 12px 16px;
    /* Add extra padding for Android navigation bar on landscape mobile */
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 20px));
  }
}

/* =================================================================
   Utility Classes
   ================================================================= */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-0 { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-gap-10 { gap: 10px; }
.flex-gap-20 { gap: 20px; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* Content Header */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.content-title {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 5px 0;
}

.content-description {
  color: #6b7280;
  margin: 0;
  font-size: 14px;
}

/* Search Bar */
.search-bar {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.search-input {
  padding: 10px 15px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #111827;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: #4CAF50;
}

.search-count {
  margin-left: 15px;
  color: #6b7280;
  font-size: 14px;
}

/* ========================================
   FONTS PAGE STYLES
   ========================================== */

.fonts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.font-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

.font-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.10);
}

.font-preview {
  background: #f9fafb;
  padding: 30px 20px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.font-sample {
  font-size: 36px;
  color: #111827;
  font-weight: normal;
}

.font-info {
  padding: 15px;
}

.font-name {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.font-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.font-format {
  background: #4CAF50;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.font-size {
  color: #6b7280;
  font-size: 12px;
}

.font-filename {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.font-actions {
  display: flex;
  gap: 8px;
  padding: 0 15px 15px 15px;
  justify-content: flex-end;
}

.btn-icon {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background 0.2s;
}

.btn-icon:hover {
  background: rgba(17, 24, 39, 0.06);
}

/* File Upload Area */
.file-upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #ffffff;
  position: relative;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.file-upload-area:hover {
  border-color: #4CAF50;
  background: #f9fafb;
}

.file-upload-area:active {
  transform: scale(0.98);
}

.file-upload-content {
  pointer-events: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.file-upload-icon {
  display: inline-flex;
  margin-bottom: 4px;
  user-select: none;
}

.upload-icon,
.file-upload-icon,
.empty-state-icon,
.empty-icon {
  width: 48px;
  height: 48px;
  background: #4b5563;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  mask-size: 28px;
  -webkit-mask-size: 28px;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 16v1a2 2 0 002 2h12a2 2 0 002-2v-1M12 12v7m0-7l-3 3m3-3l3 3M12 4v8'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 16v1a2 2 0 002 2h12a2 2 0 002-2v-1M12 12v7m0-7l-3 3m3-3l3 3M12 4v8'/%3E%3C/svg%3E");
}

.empty-state-icon.icon-file,
.file-upload-icon.icon-file {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14 2v6h6'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14 2v6h6'/%3E%3C/svg%3E");
}

.empty-icon.icon-font {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 4h14M9 4v16m6-16v16M7 20h10'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 4h14M9 4v16m6-16v16M7 20h10'/%3E%3C/svg%3E");
}

.media-placeholder {
  width: 100%;
  height: 160px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.media-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fonts-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fonts-toolbar {
  border-radius: 12px;
}

.fonts-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fonts-search-bar .form-control {
  flex: 1 1 240px;
}

.fonts-count {
  font-size: 12px;
  color: #6b7280;
}

.font-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.font-actions {
  display: flex;
  gap: 8px;
  padding: 0 14px 14px;
}

.font-actions .btn-icon {
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
}

.media-upload {
  border-radius: 12px;
  overflow: hidden;
}

.media-toolbar {
  border-radius: 12px;
}

.media-filters {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) repeat(3, minmax(140px, 180px));
  gap: 12px;
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .media-filters {
    grid-template-columns: 1fr !important;
  }
}

.media-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
}

.media-stat {
  background: #f9fafb;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.media-stat-value {
  font-weight: 700;
  color: #111827;
  font-size: 14px;
}

.media-stat-label {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.media-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.media-thumb-wrapper {
  width: 100%;
  background: #f8fafc;
}

.media-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.media-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.media-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-card-meta {
  font-size: 12px;
  color: #6b7280;
}

.media-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.media-card-select {
  display: flex;
  justify-content: flex-start;
}

.media-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}

.media-checkbox input {
  width: 14px;
  height: 14px;
}

.media-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid #e5e7eb;
  gap: 12px;
}

.media-pagination {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.upload-area {
  border: 2px dashed #cbd5f5;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-area h3 {
  color: #111827;
  margin-bottom: 8px;
  font-size: 16px;
}

.upload-area p {
  color: #6b7280;
  margin-bottom: 12px;
  font-size: 12px;
}

.upload-progress {
  margin-top: 16px;
}

.upload-progress h4 {
  margin-bottom: 12px;
  color: #111827;
}

.upload-results {
  margin-top: 16px;
}

.media-placeholder--small {
  height: 80px;
}

.file-upload-content p {
  color: #374151;
  margin: 5px 0;
  font-size: 15px;
  font-weight: 500;
  user-select: none;
}

.file-upload-content small {
  color: #6b7280;
  font-size: 12px;
  display: block;
  margin-top: 5px;
  user-select: none;
}

.file-upload-preview {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  background: #f0f9f4;
  border: 2px solid #4CAF50;
  border-radius: 6px;
  width: 100%;
  pointer-events: auto;
}

.file-upload-preview.active {
  display: flex !important;
}

.file-upload-preview .file-name {
  color: #2e7d32;
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

.btn-remove-file {
  background: #f44336;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 10px;
}

.btn-remove-file:hover {
  background: #d32f2f;
}

/* Notification */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.16);
  z-index: 10001;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s;
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-success {
  background: #4CAF50;
}

.notification-error {
  background: #f44336;
}

.notification-info {
  background: #2196F3;
}

/* Sets and Questions Components */
.sets-header, .questions-header {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 250px;
}

.filter-box {
  min-width: 200px;
}

.sets-stats, .questions-stats {
  margin-left: auto;
}

.stat-badge {
  padding: 8px 16px;
  background: #007bff;
  color: white;
  border-radius: 20px;
  font-size: 14px;
}

/* Questions List */
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.question-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s;
}

.question-card:hover {
  border-color: #007bff;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.question-number {
  font-weight: bold;
  color: #007bff;
  font-size: 14px;
}

.question-language {
  padding: 4px 12px;
  background: #f3f4f6;
  border-radius: 12px;
  font-size: 12px;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.question-text {
  font-size: 16px;
  color: #111827;
  margin-bottom: 15px;
  line-height: 1.6;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  transition: all 0.2s;
}

.option:hover {
  background: #f9fafb;
}

.option.correct-option {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
}

.option-label {
  font-weight: bold;
  color: #007bff;
  min-width: 25px;
}

.option-text {
  flex: 1;
  color: #111827;
}

.correct-badge {
  padding: 4px 8px;
  background: #10b981;
  color: white;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
}

/* Data Table */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: #f9fafb;
}

.data-table th {
  padding: 12px;
  text-align: left;
  font-weight: 700;
  color: #6b7280;
  border-bottom: 2px solid #e5e7eb;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
}

.data-table tbody tr:hover {
  background: #f9fafb;
}

.set-name {
  color: #111827;
  font-weight: 600;
}

.text-muted {
  color: #6b7280 !important;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.pagination-info {
  color: #6b7280;
  font-size: 14px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.empty-state p {
  font-size: 16px;
  margin: 0;
}

/* Filter Tabs */
.filter-tab {
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #6b7280;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.filter-tab:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.filter-tab.active {
  background: #4CAF50;
  color: white;
  border-color: #4CAF50;
}

.filter-tab.active:hover {
  background: #45a049;
  border-color: #45a049;
}

/* ========================================
   Video Generator Styles
   ======================================== */

.video-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.question-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.questions-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 15px;
  background: #1a1a1a;
}

.batch-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* Queue Styles */
.queue-job {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
}

.queue-job-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.current-job {
  border-left: 4px solid #4CAF50;
  background: #f0f8f4;
}

.queued-job {
  border-left: 4px solid #999;
  background: #fafafa;
}

.queue-job-progress {
  margin-top: 10px;
}

.progress-bar-container {
  background: #e9ecef;
  height: 24px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 5px;
  border: 1px solid #ddd;
}

.progress-bar {
  background: linear-gradient(90deg, #4CAF50, #2196F3);
  height: 100%;
  transition: width 0.3s ease;
}

.progress-text {
  color: #666;
  font-size: 0.9em;
  font-weight: 500;
}

/* Video Filters */
.video-filters {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.video-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.video-name {
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
  word-break: break-word;
}

.video-meta {
  color: #999;
  font-size: 0.85em;
  margin-bottom: 12px;
}

.video-actions {
  display: flex;
  gap: 8px;
}

/* Pagination */
.pagination-container {
  margin-top: 30px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 8px 12px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  min-width: 40px;
}

.pagination-btn:hover:not(.disabled) {
  background: #2a2a2a;
  border-color: #4CAF50;
}

.pagination-btn.active {
  background: #4CAF50;
  border-color: #4CAF50;
  font-weight: 600;
}

.pagination-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-ellipsis {
  color: #666;
  padding: 0 4px;
}

/* ========================================
   Mobile Responsive Styles
   ======================================== */

@media (max-width: 768px) {
  .video-options-grid {
    grid-template-columns: 1fr;
  }

  .batch-settings-grid {
    grid-template-columns: 1fr;
  }

  .question-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .question-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .video-filters {
    flex-direction: column;
  }

  .video-filters select {
    max-width: 100% !important;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .queue-job-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .video-actions {
    flex-direction: column;
  }

  .video-actions .btn {
    width: 100%;
  }

  .pagination {
    gap: 4px;
  }

  .pagination-btn {
    padding: 6px 10px;
    font-size: 13px;
    min-width: 36px;
  }
}

/* Very small mobile screens */
@media (max-width: 480px) {
  .content-header h1 {
    font-size: 1.5em;
  }

  .card {
    margin-bottom: 15px;
  }

  .btn-large {
    padding: 12px 20px;
    font-size: 14px;
  }

  /* Simplify pagination on tiny screens */
  .pagination-btn:not(.active):not(:first-child):not(:last-child):not(:nth-child(2)):not(:nth-last-child(2)) {
    display: none;
  }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}
