@font-face {
    font-family: 'museo-sans-rounded-700';
    src: url("./Font/museo-sans-rounded-700.ttf");
}

@font-face {
    font-family: 'museo-sans-rounded-100';
    src: url("./Font/MuseoSansRounded-100.otf");
}

@font-face {
    font-family: 'museosansrounded-900-webfont';
    src: url("./Font/museosansrounded-900-webfont.ttf");
}

@font-face {
    font-family: 'Avenir-Black';
    src: url("./Font/Avenir Black.otf");
}

@font-face {
    font-family: 'museo-sans-rounded-300';
    src: url("./Font/museo-sans-rounded-300.ttf");
}

@font-face {
    font-family: 'museo-sans-rounded-500';
    src: url("./Font/museosansrounded-500-webfont.ttf");
}

@font-face {
    font-family: 'museo-sans-rounded-900';
    src: url("./Font/museosansrounded-900-webfont.ttf");
}

/* Mobile: Only show copy icon inside input, hide button */
@media (max-width: 600px) {
  #shareModal .copy-link-btn {
    display: none !important;
  }

  #shareModal .copy-icon-input {
    position: relative;
    width: 100%;
  }

  #shareModal .copy-icon-input input {
    padding-right: 40px !important;
  }

  #shareModal .copy-icon-input .copy-icon-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #75cbce;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
    display: flex;
    align-items: center;
    z-index: 2;
  }

  #shareModal .copy-icon-input .copy-icon-btn:active {
    color: #20b2b5;
  }
}

    /* Default: full width on mobile & tablet */
.main-section {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  flex: 1 1 0;
}

/* HD desktop and above (1280px+) */
@media (min-width: 1280px) {
  .main-section {
    /* max-width: 85.5vw; */
  }
}

/* Ensure share modal is always centered */
#shareModal {
  /* display: flex !important; */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  transition: opacity 0.2s;
}

#shareModal .modal-container {
  margin: 0 auto !important;
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  border-radius: 18px;
  max-width: 480px;
  width: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;

}

/* Common Background Colors */
:root {
  --card-bg: #f8fafc;
  --border-color: #e2e8f0;
  --teal-primary: #26d0ce;
  --teal-secondary: #20b2b5;
  --green-success: #27ae60;
  --light-teal-bg: #f0fdfc;
  --transition-smooth: all 0.3s ease;
  --border-radius-card: 16px;
  --border-radius-small: 8px;
  --box-shadow-hover: 0 4px 16px rgba(38, 208, 206, 0.1);
  --box-shadow-answer: 0 2px 12px rgba(38, 208, 206, 0.15);
}

html {
  overflow-y: scroll;
}

/* Loader initial state - can be controlled by JavaScript */
body {
  padding: 0 !important;
  margin: 0 !important;
}

#loader-wrapper {
  display: none;
  visibility: hidden;
  opacity: 0;
}

/* Delete Confirmation Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease-out;
}

.card-title {
  display: flex;
  align-items: center;
}

/* Share Modal Specific Styles */
/* #shareModal .close-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

#shareModal button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
} */

#shareModal .modal-container {
  animation: slideInUp 0.3s ease-out;
  border: transparent !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  width: 450px;
  animation: slideInUp 0.3s ease-out;
}

.modal-header {
  padding: 20px 20px 0 20px;
  border-bottom: none;
  position: relative;
}

.modal-title {
  margin: 0;
  font-size: 1.7rem !important;
  margin:auto !important;
  font-family: "museo-sans-rounded-2" !important;
  font-weight: 600;
  color: #1f2937;
  text-align: center;
  color: white !important;


}

 .modal-container {
  border:none !important;
  padding:10px !important;
 }

.modal-body {
  padding: 20px;
  text-align: center;
}

.delete-icon {
  font-size: 48px;
  color: #ef4444;
  margin-bottom: 16px;
}

.delete-info {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px;
  margin-top: 16px;
  font-size: 14px;
  color: #7f1d1d;
}

.modal-footer {
  padding: 0 20px 20px 20px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-secondary,
.btn-danger {
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 80px;
}

.btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background-color: #e5e7eb;
}

.btn-danger {
  background-color: #ef4444;
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile Action Menu Styles */
.mobile-action-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  margin-top: 8px;
}

.mobile-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 16px;
}

.mobile-action-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: none;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-action-item:hover {
  background: #e2e8f0;
}

.mobile-action-item.primary {
  background: #dbeafe;
  color: #1e40af;
}

.mobile-action-item.danger {
  background: #fee2e2;
  color: #dc2626;
}

/* Toast notification styles */
.toast {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 10000;
  min-width: 300px;
}

.toast.showing {
  animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .modal-container {
    width: 95%;
    margin: 20px;
  }

  .modal-footer {
    flex-direction: column;
  }

  .btn-secondary,
  .btn-danger {
    width: 100%;
  }
}

/* New User-Friendly Delete Modal Styles */
.delete-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease-out;
}

.delete-modal-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  max-width: 90%;
  width: 480px;
  position: relative;
  animation: slideInScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.delete-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 1;
  color: #64748b;
}

.delete-modal-close:hover {
  background: #e2e8f0;
  color: #475569;
  transform: scale(1.1);
}

.delete-modal-header {
  text-align: center;
  padding: 40px 32px 24px;
  background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
}

.delete-modal-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
  animation: pulse 2s infinite;
}

.delete-modal-icon i {
  font-size: 32px;
  color: white;
}

.delete-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  letter-spacing: -0.025em;
}

.delete-modal-content {
  padding: 0 32px 32px;
}

.delete-modal-message {
  font-size: 16px;
  color: #6b7280;
  text-align: center;
  margin: 0 0 24px;
  line-height: 1.6;
}

.delete-warning-box {
  background: #fef3c7;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.warning-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: #d97706;
}

.warning-text {
  flex: 1;
  color: #92400e;
  font-size: 14px;
}

.warning-text strong {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.warning-text ul {
  margin: 0;
  padding-left: 16px;
  list-style-type: disc;
}

.warning-text li {
  margin-bottom: 4px;
}

.delete-game-info {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
}

.game-info-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.game-info-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.game-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 16px;
}

.game-type {
  color: #6b7280;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.delete-modal-actions {
  padding: 24px 32px 32px;
  display: flex;
  gap: 16px;
  background: #f8fafc;
}

.delete-btn-cancel,
.delete-btn-confirm {
  flex: 1;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid transparent;
}

.delete-btn-cancel {
  background: white;
  color: #374151;
  border-color: #d1d5db;
}

.delete-btn-cancel:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  transform: translateY(-1px);
}

.delete-btn-confirm {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.delete-btn-confirm:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.delete-btn-confirm:active {
  transform: translateY(0);
}

/* Animations */
@keyframes slideInScale {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .delete-modal-overlay {
    align-items: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0;
  }

  .delete-modal-container {
    width: 95%;
    margin: 0 auto 20px;
    max-height: none;
  }

  .delete-modal-header {
    padding: 32px 24px 20px;
  }

  .delete-modal-content {
    padding: 0 24px 24px;
  }

  .delete-modal-actions {
    padding: 20px 24px 24px;
    flex-direction: column;
  }

  .delete-modal-icon {
    width: 64px;
    height: 64px;
  }

  .delete-modal-icon i {
    font-size: 24px;
  }

  .delete-modal-title {
    font-size: 20px;
  }
}

/* Mobile Landscape - Fix Scrolling Issue */
@media only screen and (max-width: 1024px) and (orientation: landscape) and (max-height: 600px) {
  /* Fix quiz settings row layout for landscape mobile */
  .quiz-settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    align-items: flex-start;
  }
  .quiz-settings-row .settings-item {
    flex: 1 1 48%;
    min-width: 160px;
    margin-bottom: 8px;
  }
  .quiz-settings-row .settings-item:nth-child(3) {
    flex-basis: 48%;
    min-width: 160px;
    margin-left: 0;
    margin-right: 0;
  }
  /* Optionally center the second row */
  .quiz-settings-row {
    align-items: flex-start;
  }

  /* Cube buttons: fill full width, reduced height */
  #grid-main .cube-btn-row {
    width: 100%;
    justify-content: space-between;
  }

  #grid-main .cube-btn {
    flex: 1 1 0;
    width: auto !important;
    height: 28px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    padding: 0 4px;
  }

  /* Keep the two groups stacked in landscape too */
  #grid-main .col-12.d-flex {
    flex-direction: column !important;
    gap: 8px;
  }

  #grid-main .cube-select-group {
    flex-direction: row !important;
    align-items: center !important;
    width: 100%;
    gap: 10px;
  }

  #grid-main .cube-select-group label.fw-bold {
    min-width: 160px;
    font-size: 12px;
  }

  .delete-modal-overlay {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start;
    padding: 20px 0;
  }

  .delete-modal-container {
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    margin: 0 auto;
    width: 90%;
  }

  .delete-modal-header {
    padding: 24px 20px 16px;
  }

  .delete-modal-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
  }

  .delete-modal-icon i {
    font-size: 20px;
  }

  .delete-modal-title {
    font-size: 18px;
  }

  .delete-modal-content {
    padding: 0 20px 20px;
    max-height: calc(100vh - 0px);
    overflow-y: auto;
  }

  .delete-warning-box {
    padding: 12px;
    margin: 16px 0;
  }

  .delete-game-info {
    padding: 12px;
    margin: 12px 0;
  }

  .game-info-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .delete-modal-actions {
    padding: 16px 20px 20px;
    gap: 12px;
  }

  .delete-btn-cancel,
  .delete-btn-confirm {
    padding: 12px 20px;
    font-size: 14px;
  }

  .delete-modal-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
  }
}

/* ===== CUSTOMIZATION UPLOAD AREAS ===== */
.background-preview {
  position: relative;
  width: 100%;
  height: 120px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

 

.addgamecollectionpopup {
  padding: 0 !important;
  overflow: hidden;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 15px;
}

.addgamecollectionpopup .modal-header {
  margin-bottom: 0 !important;
  border-top-left-radius: 14px;
  border-top-right-radius: 15px;
  padding: 1rem;
}

.addgamecollectionpopup .modal-container {
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 0 !important;
  border: solid 1px lightcyan;
  background-color: #eee;
  overflow-y: scroll;
}

#createplaylistpopup .gamemodalbody {
  padding: 0 !important;
}

#createplaylistpopup .modal-header {
  margin-bottom: 0 !important;
}

#createCollectionpopup .gamemodalbody {
  padding: 0;
}

#challengepopup .presenderdivclass {
  margin: auto !important;
}

#createCollectionpopup .modal-header {
  margin-bottom: 0;
}

#CopyGamePopup .gamemodalbody {
  padding: 0 !important;
}

#CopyGamePopup .modal-header {
  margin-bottom: 0 !important;
}

#downloadablegamepopup .modal-footer {
  justify-content: center !important;
}

#challengepopup .gamemodalbody {
  padding: 0;
}

#challengepopup .modal-header {
  margin-bottom: 0 !important;
}



#changechallengedeadline .gamemodalbody {
  padding: 0;
}

#changechallengedeadline .modal-header {
  margin-bottom: 0 !important;
}

.fa-times:before {
  color: black;
}

.background-preview:hover {
  border-color: #26d0ce;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(38, 208, 206, 0.15);
}

.background-preview .upload-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(38, 208, 206, 0.9);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 14px;
  font-weight: 600;
}

.background-preview:hover .upload-overlay {
  opacity: 1;
}

.upload-overlay i {
  font-size: 24px;
  margin-bottom: 8px;
}

.logo-upload {
  width: 100%;
}

.upload-area {
  position: relative;
  width: 100%;
  min-height: 100px;
  border: 2px dashed #e2e8f0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 20px;
  text-align: center;
}

.upload-area:hover {
  border-color: #26d0ce;
  border-style: solid;
  background: #f0fdfc;
  transform: translateY(-2px);
}

.upload-area .upload-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(38, 208, 206, 0.9);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
}

.upload-area:hover .upload-overlay {
  opacity: 1;
}

.upload-area i {
  font-size: 32px;
  color: #26d0ce;
  margin-bottom: 12px;
}

.upload-area span {
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}

.upload-area:hover i {
  color: #26d0ce;
}

.upload-area:hover span {
  color: #26d0ce;
}

/* Tooltip styles for customization */
.customizationtooltip-container {
  position: relative;
  display: inline-block;
  margin-left: 8px;
}

.info-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #64748b;
  color: white;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  transition: all 0.2s ease;
}

.info-icon:hover {
  background: #26d0ce;
}

.Customization-tooltip-container {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.customizationtooltip-container:hover .Customization-tooltip-container {
  opacity: 1;
  visibility: visible;
}

.Customizations-tooltip {
  background: #334155;
  color: white;
  padding: 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.Customizations-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #334155;
}

/* Custom label with tooltip integration */
.custom-label {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #334155;
}

/* Preview-only styles (no upload functionality) */
.background-preview-only {
  width: 100%;
  height: 120px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.logo-preview-only {
  width: 100%;
}

.logo-display-area {
  width: 100%;
  min-height: 120px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #f8fafc;
}

.powered-by {
  position: absolute;
  bottom: 0;
  right: 10px;
  display: block;
} 

/* ===== DRAG AND DROP STYLES ===== */
.drag-drop-area {
  transition: all 0.3s ease;
  position: relative;
}

.drag-drop-area.drag-over {
  border-color: #26d0ce !important;
  background: rgba(38, 208, 206, 0.1) !important;
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(38, 208, 206, 0.2);
}

.drag-drop-area.drag-over .upload-overlay {
  opacity: 1 !important;
  background: rgba(38, 208, 206, 0.95) !important;
}

.drag-drop-area.drag-over .background-image-container,
.drag-drop-area.drag-over .logo-image-container {
  opacity: 0.3;
}

/* Enhanced upload overlay styles */
.upload-overlay {
  border-radius: 6px;
}

.upload-icon {
  font-size: 28px !important;
  margin-bottom: 8px !important;
  animation: bounce 2s infinite;
}

.upload-text {
  font-size: 16px !important;
  font-weight: 600 !important;
  margin-bottom: 4px;
}

.upload-subtext {
  font-size: 12px !important;
  opacity: 0.9;
  font-weight: 400 !important;
}

/* Background and logo container styles */
.background-image-container,
.logo-image-container {
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease;
}

/* Bounce animation for upload icons */
@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-8px);
  }

  60% {
    transform: translateY(-4px);
  }
}

/* Loading animation for uploads */
.upload-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #26d0ce;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* File type indicators */
.file-type-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(38, 208, 206, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Preview enhancement styles */
.background-preview.has-image {
  border-style: solid;
  border-color: #26d0ce;
}

.upload-area.has-logo {
  border-style: solid;
  border-color: #26d0ce;
  background: #f0fdfc;
}

/* ===== BREAKING NEWS SECTION ===== */
.breaking-news-section {
  padding: 0;
  background: #fff;
  margin: 0;
  width: 100%;
  overflow: hidden;
  /* Add this to prevent horizontal scroll */
}

.breaking-news-ticker {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 0;
  border: 1px solid #e9ecef;
  overflow: hidden;
  width: 100%;
  height: 50px;
  position: relative;
  /* Add this */
}

.ticker-heading {
  background: #73ccd1;
  color: #fff;
  padding: 12px 8px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
  white-space: nowrap;
  min-width: 120px;
}

.ticker-wrap {
  flex: 1;
  overflow: hidden;
  padding: 0;
  margin: 0;
  position: relative;
  /* Add this */
}

.ticker {
  display: inline-flex;
  animation: ticker 40s linear infinite;
  white-space: nowrap;
  padding-left: 100%;

}

.ticker:hover {
  animation-play-state: paused;
}

.ticker-item {
  padding: 0 30px;
  font-size: 15px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.ticker-item a {
  color: #444;
  text-decoration: none;
  transition: color 0.3s ease;
}

.ticker-item a:hover {
  color: #73ccd1;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

/* ===== GRID GAME CARDS STYLING ===== */
.grid-game-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
  cursor: pointer;
}

.grid-game-card:hover {
  border-color: #26d0ce;
  background: #f0fdfc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(38, 208, 206, 0.15);
}

.grid-game-card .fw-bold {
  font-size: clamp(12px, 1.5vw, 14px);
  font-weight: 600;
  color: #334155;
  line-height: 1.3;
  margin-bottom: 8px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
}

.grid-game-card>div:nth-child(2) {
  font-size: clamp(11px, 1.3vw, 13px);
  color: #64748b;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
  flex: 1;
}

.grid-media-icons {
  margin-top: 8px !important;
  text-align: right !important;
  border-top: 1px solid #f1f5f9;
  padding-top: 6px;
  min-height: 24px;
}

.grid-media-icons i {
  color: #26d0ce !important;
  font-size: clamp(14px, 1.2rem, 16px) !important;
  cursor: pointer !important;
  margin-left: 6px !important;
  transition: all 0.3s ease;
}

.grid-media-icons i:hover {
  color: #20b2b5 !important;
  transform: scale(1.1);
}

/* Custom grid background for better consistency */
.custom-grid-bg {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

/* Grid container responsive adjustments */
@media (max-width: 768px) {

  /* Hide the original grid layout on mobile */
  #grid-main .container-fluid .row {
    display: none;
  }

  /* Create mobile-specific layout */
  #grid-main .container-fluid::after {
    content: "";
    display: block;
    clear: both;
  }

  .grid-game-card {
    min-height: 80px;
    padding: 12px;
    margin-bottom: 12px;
    width: 100%;
  }

  .grid-game-card .fw-bold {
    font-size: 14px;
    -webkit-line-clamp: 2;
    margin-bottom: 8px;
  }

  .grid-game-card>div:nth-child(2) {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

  .grid-media-icons i {
    font-size: 16px !important;
    margin-left: 6px !important;
  }

  /* Mobile category section styling */
  .mobile-category-section {
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .mobile-category-header {
    background: #e0f7fa;
    /* border: 2px solid #26d0ce; */
    color: #334155;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    /* border-bottom: 3px solid #26d0ce; */
  }

  .mobile-category-content {
    background: #f8fafc;
    padding: 12px;
  }

  .mobile-question-item {
    background: #e0f7fa;
    border: 2px solid #26d0ce;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
  }

  .mobile-question-item:hover {
    border-color: #26d0ce;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(38, 208, 206, 0.15);
  }

  .mobile-question-item:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .grid-game-card {
    min-height: 90px;
    padding: 8px;
  }

  .grid-media-icons {
    min-height: 20px;
    padding-top: 4px;
  }
}

/* Ensure consistent column heights */
.col-6.col-md-2.p-1 {
  display: flex;
  align-items: stretch;
}

.col-6.col-md-2.p-1 .grid-game-card {
  width: 100%;
  height: 100%;
}

/* Force 6-column grid layout for grid game at all widths */
#grid-main .container-fluid .row > .col-6.col-md-2.p-1,
#grid-main .container-fluid .row > .col-6.col-md-2.text-center.fw-bold.py-2 {
  width: 16.6667%;
  flex: 0 0 16.6667%;
  max-width: none;
  min-width: 0;
}

/* Force 6-column grid layout for grid game at all widths */
.container-fluid .row > .col-6.col-md-2.p-1,
.container-fluid .row > .col-6.col-md-2.text-center.fw-bold.py-2 {
  width: 16.6667%;
  flex: 0 0 16.6667%;
  max-width: 16.6667%;
}

/* Center grid columns if less than 6 categories */
#grid-main .container-fluid .row.center-grid {
  justify-content: center !important;
}
#grid-main .container-fluid .row.center-grid > .col-6.col-md-2.p-1,
#grid-main .container-fluid .row.center-grid > .col-6.col-md-2.text-center.fw-bold.py-2 {
  width: 180px;
  max-width: 220px;
  flex: 0 0 auto;
}

/* Grid Category Headers Styling */
.col-6.col-md-2.text-center.fw-bold.py-2 {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  /* margin: 0 4px 8px 4px; */
  margin-top: 1rem;
  padding: 12px 8px !important;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.col-6.col-md-2.text-center.fw-bold.py-2:hover {
  border-color: #26d0ce;
  background: #f0fdfc;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(38, 208, 206, 0.1);
}

/* Mobile responsive for category headers */
@media (max-width: 768px) {
  .col-6.col-md-2.text-center.fw-bold.py-2 {
    font-size: 13px;
    padding: 10px 6px !important;
    margin: 0 2px 6px 2px;
  }
}

@media (max-width: 480px) {
  .col-6.col-md-2.text-center.fw-bold.py-2 {
    font-size: 12px;
    padding: 8px 4px !important;
    margin: 0 1px 4px 1px;
  }
}

/* Header */
.header {
  background: white;
  border-radius: 16px;
  margin-bottom: 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* Main Quiz Section */
.quiz-main-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Modal Overlay */
#modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  /* Darker background */
  justify-content: center;
  align-items: center;
}

/* Show modal when active */
#modal.show {
  display: flex;
}

/* Modal Content */
#modal .modal-content {
  background: transparent;
  border-radius: 18px;
  width: 90vw;
  height: 90vh;
  max-width: 85vw;
  max-height: 85vh;
  margin: 0;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin: auto;
  top: 4vh;


}

/* Modal Header */
#modal .modal-header {
  background: transparent;
  padding: 0;
  border-bottom: none;
  position: absolute;
  top: 18px;
  right: 24px;
  width: auto;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Modal Title (hide or style as needed) */
#modal .modal-title {
  display: none;
}

/* Close Button */
#modal .close-btn {
  background: rgba(0, 0, 0, 0.7);
  border: none;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 50%;
  position: relative;
  z-index: 3;
  transition: background 0.2s;
}

#modal .close-btn:hover {
  background: #e74c3c;
  color: #fff;
}

/* Modal Body */
#modal #modal-body {
  padding: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Responsive iframe and image */
#modal iframe,
#modal img {
  width: 75vw;
  height: 75vh;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 18px;
  background: #000;
  margin: 0;
  display: block;
}

@media (max-width: 600px) {
  #modal .modal-content {
    width: 98vw;
    height: 80vh;
    border-radius: 12px;
  }

  #modal iframe,
  #modal img {
    width: 98vw;
    height: 60vh;
    border-radius: 12px;
  }

  #modal .close-btn {
    font-size: 28px;
    padding: 6px 12px;
    top: 8px;
    right: 8px;
  }
}

.question-text {
  text-overflow: ellipsis;
  display: -webkit-box !important;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-left: 5px;
  width: 97%;
  line-height: 1.4;
  word-wrap: break-word;
}

h2 i {
  margin-right: 8px;
}

.answer-text {
  color: #495057;
  font-size: 14px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  padding-left: 5px;
  line-height: 1.3;
  word-wrap: break-word;
}


.card-header {
  padding: 1.25rem 1.25rem !important;
}

.question-container .card-title {
  display: flex;
  align-items: center;
}

.customizations-section .card-title {
  display: flex;
  align-items: center;
}
.assignment-section .card-title {
  display: flex;
  align-items: center;
}

.card-title {
  margin-bottom: 0 !important;
}

.option-media-section {
  max-width: 45px;
  position: relative;
  left: 60px;
}

.answer-option {
  min-height: 45px;
}

/* Fusion Quiz Styles */
.fusion-mc-text {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  word-wrap: break-word;
  flex: 1;
}

.fusion-list-text {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box !important;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  word-wrap: break-word;
  flex: 1;
}

.fusion-answer-value {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  word-wrap: break-word;
  flex: 1;
}

.fusion-explanation-text {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  word-wrap: break-word;
  flex: 1;
}

/* Media Icon Positioning */
.question-media-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.fusion-answer-media {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.fusion-explanation-media {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* Media Icons */
.question-media-section i,
.fusion-answer-media i,
.fusion-explanation-media i {
  color: #26d0ce;
  font-size: 1.7rem;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.question-media-section i:hover,
.fusion-answer-media i:hover,
.fusion-explanation-media i:hover {
  color: #1a9ba1;
  transform: scale(1.1);
}

/* Full Width Card for First Row */
.full-width-card {
  width: 100%;
}

  .quiz-header-content {
  display: flex;
  gap: 0;
  align-items: stretch;
  min-height: 320px;
  transition: min-height 0.3s ease;
}  

 
.settings-item,
.user-info-compact {
  min-width: 120px;
  flex: 0 0 auto;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiz-header-content.desc-expanded {
  /* min-height: 380px; */
  min-height: 340px;
}

.thumbnail-section {
  flex: 0 0 420px;
  display: flex;
  flex-direction: column;
}

/* Explanation Row Styling */
.explanation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #e0f7fa;
  border: 1px solid #26d0ce;
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 20px;
}

.explanation-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.explanation-icon {
  color: #26d0ce;
  font-size: 1.2rem;
}

.explanation-text {
  color: #334155;
  font-weight: 500;
}

.explanation-media {
  display: flex;
  align-items: center;
  gap: 10px;
}

.explanation-media i {
  color: #26d0ce;
  font-size: 1.7rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.explanation-media i:hover {
  color: #1a9ba1;
}

.explanation-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.explanation-icon {
  color: #26d0ce;
  font-size: 18px;
  flex-shrink: 0;
}

.explanation-text {
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
}

.explanation-media {
  flex-shrink: 0;
  position: relative;
  left: 75px;
}

.youtube-icon {
  width: 32px;
  height: 32px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  opacity: 0.8;
}

.youtube-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Mobile responsive for explanation row */
@media (max-width: 768px) {
  .explanation-row {
    padding: 14px 16px;
    gap: 12px;
  }

  .explanation-text {
    font-size: 13px;
  }

  .option-media-section {
    display: none;
  }

  .explanation-media {
    display: none;
  }

  .explanation-icon {
    font-size: 16px;
  }

  .youtube-icon {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .explanation-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    max-width: 100% !important;
  }


  .explanation-content {
    width: 100%;
  }

  .explanation-media {
    align-self: center;
    left: 0;
  }

  .toggle-switch {
    width: 52px !important;
    height: 28px !important;
  }

  .toggle-switch:before {
    width: 22px !important;
    height: 23px !important;
    border-radius: 12px !important;

  }
}

/* Action Buttons Section */
.action-buttons-section {
  padding: 14px 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Header shadow separator - high specificity to override app.css */
header.banner.dark-header.navbar.navbar-default.navbar-static-top {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Divider between play and action buttons */
.compact-action-buttons::before {
  content: '';
  width: 1px;
  height: 32px;
  background: #d1d5db;
  flex-shrink: 0;
}

/* Import Questions Section */
.import-questions-section {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}

.import-btn {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.import-btn:hover {
  background: linear-gradient(135deg, #20b2b5 0%, #1a9d9d 100%);
  transform: translateY(-1px);
}

.import-btn.secondary {
  background: #ffffff;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.import-btn.secondary:hover {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
}

/* Quiz Settings Controls */
.quiz-controls-section {
  background: white;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.controls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.controls-title {
  font-size: 16px;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  align-items: center;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-label {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
}

.toggle-switch-small {
  position: relative;
  width: 40px;
  height: 20px;
  background: #e2e8f0;
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.toggle-switch-small::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-input:checked+.toggle-switch-small {
  background: #26d0ce;
}

.toggle-input:checked+.toggle-switch-small::before {
  transform: translateX(20px);
}

.bulk-settings-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.bulk-input {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  width: 80px;
  text-align: center;
}

.bulk-input:focus {
  outline: none;
  border-color: #26d0ce;
}

.apply-bulk-btn {
  background: #26d0ce;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.apply-bulk-btn:hover {
  background: #20b2b5;
}

/* Media Upload Section */
.media-upload-section {
  margin-top: 16px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.media-upload-header {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 12px;
}

.media-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.media-upload-btn {
  background: white;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 16px 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  color: #64748b;
  font-size: 13px;
}

.media-upload-btn:hover {
  border-color: #26d0ce;
  color: #26d0ce;
  background: #f0fdfc;
}

.media-upload-btn i {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}

/* Explanation Section */
.explanation-section {
  margin-top: 16px;
  padding: 16px;
  background: #fefefe;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.explanation-header {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 12px;
}

.explanation-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

.explanation-textarea:focus {
  outline: none;
  border-color: #26d0ce;
}

.quiz-thumbnail-large {
  flex: 0 0 420px;
  position: relative;
  height: 280px;
  border-radius: 16px 0 0 0;
  overflow: hidden;
}

.quiz-details-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 0;
  min-width: 0;
  height: 280px;
  /* padding: 40px 32px 32px 40px; */
  padding: 20px 32px 32px 30px;
}

/* Remove default card styling for the combined layout */
.full-width-card {
  background: #ffffff;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
  padding: 0;
  border-radius: 16px;
  border: 1px solid #e8ecf1;
  overflow: hidden;
}

/* Simplified Quiz Info Styling */
.quiz-info-simple {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  /* gap: 20px; */
  padding-right: 16px;
}

.quiz-description-main {
  margin: 0 0 24px 0;
  color: #64748b;
  line-height: 1.6;
  font-size: 16px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* show only 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.show-more {
  display: none !important;
}

.quiz-meta {
  color: #94a3b8;
  font-size: 13px;
  margin: 0;
  font-weight: 500;
}

/* Action Bar Styling */
.action-bar {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 20px 24px;
  margin-top: 24px;
}

/* Sample questions styling */
.sample-questions {
  margin: 16px 0;
  padding: 10px 20px;
  background: #ffffff;
  border-radius: 12px;
  border: 2px solid #26d0ce;
  box-shadow: 0 2px 8px rgba(38, 208, 206, 0.1);
  position: relative;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.sample-questions::before {
  content: "Sample Questions";
  position: absolute;
  top: -12px;
  left: 16px;
  background: #ffffff;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #26d0ce;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.question-list-preview {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.question-list-preview li {
  margin: 0 0 4px 0;
  color: #374151;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
  padding-left: 8px;
  list-style: none;
  max-width: 40vw;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
}

.question-list-preview li:last-child {
  margin-bottom: 0;
}

.question-list-preview li:not(.show-more) {
  position: relative;
}

.question-list-preview li:not(.show-more)::before {
  content: "•";
  color: #26d0ce;
  font-size: 16px;
  font-weight: bold;
  position: absolute;
  left: -8px;
}

.question-list-preview .show-more {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
}

.question-list-preview .show-more a {
  color: #26d0ce;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.question-list-preview .show-more a:hover {
  text-decoration: underline;
  color: #20b2b5;
}

.question-list-preview .show-more a::after {
  content: "→";
  font-size: 12px;
  transition: transform 0.2s ease;
}

.question-list-preview .show-more a:hover::after {
  transform: translateX(2px);
}

/* Questions and Meta Container */
.questions-meta-container {
  display: flex;
  flex-direction: column;
}

/* Position quiz meta on the right side */
.questions-meta-container .quiz-meta {
  align-self: flex-end;
  text-align: right;
}

/* Quiz Settings Row */
.quiz-settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: #f8fafb;
  border-radius: 10px;
  border: 1px solid #edf0f4;
  flex-wrap: wrap;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
   flex: 0 1 auto;
  min-width: 120px; /* Adjust as needed */
  box-sizing: border-box;
}

.settings-item label {
  font-weight: 500;
  color: #64748b;
  margin: 0;
  font-size: 12px;
}

.settings-select {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  background: white;
  cursor: pointer;
  min-width: 100px;
}

.settings-select:focus {
  outline: none;
  border-color: #26d0ce;
}

.quiz-type-badge {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Question Count Badge */
.quiz-question-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdfc;
  color: #0d9488;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #99f0ed;
  letter-spacing: 0.3px;
}

.quiz-question-count-badge i {
  font-size: 11px;
}

.rating-group {
  display: flex;
  gap: 16px;
}

.rating-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
}

/* Hide Public/Downloadable toggle switches globally (Desktop & Mobile) */
.settings-item:has(.visibility-toggle) {
  display: none !important;
}

.rating-item i {
  font-size: 14px;
}

.rating-item span {
  font-weight: 500;
}

.visibility-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}

.toggle-input {
  display: none;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: #e2e8f0;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.toggle-switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-input:checked+.toggle-switch {
  background: #26d0ce;
}

.toggle-input:checked+.toggle-switch::before {
  transform: translateX(20px);
}

.user-info-compact {
  margin-left: auto;
}

.user-avatar-small {
  width: 32px;
  height: 32px;
  background: #3b82f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

.username-small {
  font-weight: 500;
  color: #334155;
}

/* Compact Categories & Tags Layout */
.categories-tags-compact {
  background: white;
  border-radius: 16px;
  padding: 24px 28px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

.compact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.compact-title {
  font-size: 20px;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.compact-edit-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #64748b;
}

.compact-edit-btn:hover {
  background: #26d0ce;
  color: white;
  border-color: #26d0ce;
}

.compact-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.compact-label {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  min-width: 80px;
  flex-shrink: 0;
}

.compact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.compact-tag {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

.compact-value {
  font-size: 14px;
  color: #334155;
  font-weight: 500;
}

.compact-meta-row {
  display: flex;
  gap: 32px;
}

.compact-meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* New Sidebar Categories & Tags Layout */
.title-description-categories-row {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.title-description-section {
  flex: 1;
  min-width: 0;
}

.categories-tags-sidebar {
  flex: 0 0 280px;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Hide empty sidebar tag containers */
.sidebar-tags:empty {
  display: none;
}

.sidebar-tags:empty+.sidebar-header {
  margin-top: 8px;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sidebar-header:not(:first-child) {
  margin-top: 20px;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.sidebar-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  width: 28px;
  height: 28px;

  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;

  border-radius: 6px;
  /* or 50% for circle */
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-edit-btn:hover {
  background: #e2e8f0;
  color: #334155;
}


.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  max-height: 60px;
  overflow-y: auto;
  scrollbar-width: thin !important;
  scrollbar-color: #c1c7d0 transparent !important;
}

.sidebar-tag {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.sidebar-meta {
  border-top: 1px solid #e2e8f0;
  /* padding-top: 16px;  */
  margin-top: 16px;
}

/* thin branded scrollbar – no arrows, works in Chrome/Edge/Firefox/Safari */
.sidebar-tags::-webkit-scrollbar {
  width: 4px;
  scrollbar-width: none;
}

.sidebar-tags::-webkit-scrollbar-track {
  background: transparent;
  scrollbar-width: none;
}

.sidebar-tags::-webkit-scrollbar-button,
.sidebar-tags::-webkit-scrollbar-button:start:decrement,
.sidebar-tags::-webkit-scrollbar-button:start:increment,
.sidebar-tags::-webkit-scrollbar-button:end:decrement,
.sidebar-tags::-webkit-scrollbar-button:end:increment {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  scrollbar-width: none;
}

.sidebar-tags::-webkit-scrollbar-thumb {
  background: #c1c7d0;
  border-radius: 4px;
  scrollbar-width: none;
}

.sidebar-tags::-webkit-scrollbar-thumb:hover {
  background: #a0aab4;
  scrollbar-width: none;
}

.sidebar-meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sidebar-meta-item:last-child {
  margin-bottom: 0;
}

.sidebar-meta-label {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.sidebar-meta-value {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.title-section {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.quiz-title-main {
  font-size: 32px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 12px 0;
  line-height: 1.25;
  flex: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}



.quiz-description-main {
  font-size: 16px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  /* show only 1 line */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

/* Expandable Description */
.description-container {
  position: relative;
}

.description-text {
  font-size: 16px;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
  transition: all 0.3s ease;
}

.description-text.collapsed {
  max-height: 3.2em;
  /* Show approximately 2 lines */
  overflow: hidden;
  position: relative;
}

.description-text.collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 1.2em;
  background: linear-gradient(to bottom, transparent, white);
  pointer-events: none;
}

.read-more-btn {
  background: none;
  border: none;
  color: #26d0ce;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.read-more-btn:hover {
  color: #20b2b5;
  text-decoration: underline;
}

.read-more-btn i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.read-more-btn.expanded i {
  transform: rotate(180deg);
}

/* Second Row Cards */
.second-row-cards {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}

/* Enhanced Play Button */
.play-btn-large {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  margin-top: 20px;
  width: 100%;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(38, 208, 206, 0.3);
}

/* Large External Play Button */
.play-btn-large-external {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  border: none;
  padding: 0 32px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(38, 208, 206, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: auto;
  min-width: 200px;
  height: 48px;
  margin: 0;
}

.play-btn-large-external:hover {
  background: linear-gradient(135deg, #20b2b5 0%, #1a9d9d 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(38, 208, 206, 0.35);
}

.play-btn-large-external i {
  font-size: 16px;
}

/* Compact Action Buttons */
.compact-action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
  z-index: 10;
  flex-wrap: wrap;
}

/* Hide mobile menu button on desktop */
.mobile-menu-btn,
.mobile-action-menu,
.mobile-menu-backdrop {
  display: none;
}

/* Debug: Temporarily show mobile menu on all screens for testing */
@media (max-width: 768px) {
  .option-question-image {
    display: none !important;
  }

  .question-list-preview li {
    max-width: 100%;
    overflow: hidden;
  }

  .mobile-menu-backdrop {
    display: none;
  }

  .mobile-menu-backdrop.show {
    display: block !important;
  }
}

/* --- Optimized Responsive Fixes --- */

/* Tablet & iPad Pro Fixes */
@media (min-width: 769px) and (max-width: 1366px) {
  .compact-action-buttons {
    gap: 8px !important;
  }

  .compact-action-btn {
    min-width: 40px !important;
    height: 40px !important;
  }

  /* Hide button text earlier on tablets to prevent overflow */
  .compact-action-btn .btn-text {
    /* display: none !important; */
  }

  .compact-action-btn:hover {
    padding: 0 !important;
    width: 40px !important;
  }
}

/* Landscape Mode Fixes (Mobile & Small Tablets) */
@media screen and (max-height: 500px) and (orientation: landscape) {
  #sidebar {
    min-width: 200px !important;
    max-width: 200px !important;
  }

  .second-row-cards {
    grid-template-columns: 1fr !important;
    /* Stack columns in landscape to avoid narrow content */
    gap: 16px !important;
  }

  .play-btn-large-external {
    height: 50px !important;
    padding: 10px 20px !important;
    font-size: 16px !important;
    min-width: 200px !important;
  }
}

/* Promotional Banner Polish */
#commonOfferDiv {
  padding: 25px 20px !important;
  /* Reduced from 45px padding */
  display: block;
  background-image: linear-gradient(180deg, #26959b 0%, #1b6aa3 100%) !important;
  margin: 0.5rem !important;
  background-color: #fff !important;
  border: solid white 1px !important;
  border-radius: 10px !important;
}

.content-row {
  height: 100%;
  padding: 0px 50px;
}

@media (max-width: 768px) {
  #commonOfferDiv {
    padding: 20px 15px !important;
    margin: 10px 8px !important;
  }

  #commonOfferDiv h2 {
    font-size: 1.25rem !important;
    text-align: center !important;
  }

  #commonOfferDiv p {
    text-align: center !important;
    font-size: 0.9rem !important;
  }

  #commonOfferDiv .button {
    font-size: 1.1rem !important;
  }
}

/* General Layout Polishing */
.quiz-card {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
  /* Softer shadow */
}

.card-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* Quiz Settings Row Stacking on Mobile */
@media (max-width: 480px) {
  .quiz-settings-row {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    margin-top: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafb;
  }

  .settings-item {
    width: auto !important;
    padding: 0 !important;
    border-bottom: none !important;
    font-size: 12px !important;
  }

  /* Hide Public/Downloadable toggles on mobile */
  .settings-item:has(.visibility-toggle) {
    display: none !important;
  }

  .settings-item label {
    font-size: 11px !important;
  }

  .user-info-compact {
    display: flex !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }
}

/* Mobile Action Menu Styles */
.mobile-top-row {
  position: relative;
}

.mobile-action-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid #e2e8f0;
  z-index: 1000;
  min-width: 280px;
  max-width: 320px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-action-menu.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.mobile-actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
}

.mobile-action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.mobile-action-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.mobile-action-item:hover {
  background: #e2e8f0;
  transform: translateX(4px);
}

.mobile-action-item:active {
  transform: translateX(4px) scale(0.98);
}

.mobile-action-item.primary {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
}

.mobile-action-item.primary:hover {
  background: linear-gradient(135deg, #20b2b5 0%, #1a9a9d 100%);
  box-shadow: 0 2px 8px rgba(38, 208, 206, 0.3);
}

.mobile-action-item.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.mobile-action-item.danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.compact-action-btn {
  min-width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.compact-action-btn i {
  font-size: 16px;
  transition: transform 0.3s ease;
  z-index: 2;
  flex-shrink: 0;
}

.compact-action-btn .btn-text {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  font-size: 13px;
  font-weight: 600;
  margin-left: 0;
  white-space: nowrap;
  max-width: 0;
  overflow: hidden;
}

.compact-action-btn:hover {
  padding: 0 12px;
  z-index: 100;
  justify-content: flex-start;
}

.compact-action-btn:hover {
  padding: 0 12px;
  z-index: 100;
}

.compact-action-btn:hover .btn-text {
  opacity: 1;
  visibility: visible;
  max-width: 200px;
  margin-left: 8px;
}

.compact-action-btn.primary {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  box-shadow: 0 2px 6px rgba(38, 208, 206, 0.25);
}

.compact-action-btn.primary .btn-text {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  box-shadow: 0 2px 6px rgba(38, 208, 206, 0.25);
}

.compact-action-btn.primary:hover {
  box-shadow: 0 3px 10px rgba(38, 208, 206, 0.35);
}

.compact-action-btn.secondary {
  background: #ffffff;
  color: #64748b;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.compact-action-btn.secondary .btn-text {
  color: #64748b;
}

.compact-action-btn.secondary:hover {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.compact-action-btn.secondary:hover .btn-text {
  color: #334155;
}

.compact-action-btn.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
}

.compact-action-btn.danger .btn-text {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
}

.compact-action-btn.danger:hover {
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.35);
}

/* Main Quiz Section */
.quiz-main-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* margin-bottom: 24px; */
}

/* Full Width Card for First Row */
.full-width-card {
  width: 100%;
}

.quiz-header-content {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.quiz-thumbnail-large {
  /* flex: 0 0 320px; */
  flex: 0 0 350px;
  position: relative;
  height: 200px;
  border-radius: 12px 0 0 0px;
  overflow: hidden;
}

.quiz-details-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 0 12px 12px 0;
}

/* Remove default card styling for the combined layout */
.full-width-card {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

/* Second Row Cards */
.second-row-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Enhanced Play Button */
.play-btn-large {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  margin-top: 16px;
  width: 100%;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(38, 208, 206, 0.3);
}

.play-btn-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(38, 208, 206, 0.4);
}

.quiz-logo-overlay {
  position: absolute;
  top: 20px;
  left: 20px;
  bottom: 20px;
  right: 20px;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.quiz-logo {
  height: 28px;
  width: auto;
}

/* Enhanced Card Headers */
.card-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 28px 32px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfc;
  cursor: pointer;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.card-content {
  padding: 32px;
}

.detail-item {
  margin-bottom: 24px;
}

.detail-item:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 12px 0;
}

.detail-value {
  font-size: 16px;
  color: #334155;
  margin: 0;
  line-height: 1.6;
}

.tag-display {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

/* Question Preview Specific */
.question-count {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
}

.question-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.question-list li {
  font-size: 15px;
  color: #334155;
  margin-bottom: 12px;
  line-height: 1.6;
  padding: 8px 0;
}

.question-list li:last-child {
  margin-bottom: 0;
}

.show-more a {
  color: #26d0ce;
  text-decoration: none;
  font-weight: 500;
}

.show-more a:hover {
  text-decoration: underline;
}

/* Card Components */
.quiz-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  /* transition: all 0.3s ease; */
  border: 1px solid #f1f5f9;
  margin-top: 0.5rem;
}

.quiz-card:hover {
  /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
            transform: translateY(-4px);
            border-color: #e2e8f0; */
}

.card-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfc;
  cursor: pointer;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: #334155;
  margin: 0;
  display: flex;
}

.edit-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #64748b;
}

.edit-btn:hover {
  background: #26d0ce;
  color: white;
  border-color: #26d0ce;
}

.card-content {
  padding: 28px;
}

.detail-item {
  margin-bottom: 16px;
}

.detail-item:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px 0;
}

.detail-value {
  font-size: 14px;
  color: #334155;
  margin: 0;
  line-height: 1.5;
}

.tag-display {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

/* Quiz Thumbnail Specific */
.quiz-thumbnail {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quiz-logo-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 8px 12px;
}

.quiz-logo {
  height: 60px;
  width: auto;
}

.play-overlay {
  position: absolute;
  bottom: 16px;
  right: 16px;
}

.play-btn {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.play-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(38, 208, 206, 0.3);
}

.quiz-info {
  padding: 16px 20px 20px;
}

.quiz-name {
  font-size: 18px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.quiz-meta {
  font-size: 12px;
  color: #64748b;
}

/* Question Preview Specific */
.question-count {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.question-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.question-list li {
  font-size: 14px;
  color: #334155;
  margin-bottom: 8px;
  line-height: 1.5;
}

.question-list li:last-child {
  margin-bottom: 0;
}

.show-more a {
  color: #26d0ce;
  text-decoration: none;
  font-weight: 500;
}

.show-more a:hover {
  text-decoration: underline;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* padding: 20px; */
  border-bottom: 1px solid #f1f5f9;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #334155;
}

.close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
}

.close-btn:hover {
  color: #334155;
}

.modal-body {
  /* padding: 20px; */
}

.form-group {
  margin-bottom: 20px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  color: #334155;
  background: white;
  box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #26d0ce;
  box-shadow: 0 0 0 3px rgba(38, 208, 206, 0.1);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}

.modal-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.modal-chip {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-chip i {
  cursor: pointer;
  font-size: 10px;
  opacity: 0.8;
}

.modal-chip i:hover {
  opacity: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid #f1f5f9;
}

.btn-secondary,
.btn-primary {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-secondary {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
  background: #f1f5f9;
  color: #475569;
}

.btn-primary {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(38, 208, 206, 0.3);
}

/* Quiz Content Area */
.quiz-content-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.title-section,
.description-section {
  position: relative;
}

.title-group,
.description-group {
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.title-group:hover,
.description-group:hover {
  background: #f1f5f9;
}

.quiz-title-display {
  font-size: 24px;
  font-weight: 700;
  color: #26d0ce;
  margin: 0;
  display: inline-block;
}

.quiz-description-display {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.title-edit-icon,
.description-edit-icon {
  position: absolute;
  right: 8px;
  top: 8px;
  color: #94a3b8;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.title-group:hover .title-edit-icon,
.description-group:hover .description-edit-icon {
  opacity: 1;
}

.quiz-title-edit,
.quiz-description-edit {
  width: 100%;
  border: 2px solid #26d0ce;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 24px;
  font-weight: 700;
  color: #26d0ce;
  background: white;
  outline: none;
  box-shadow: 0 0 0 3px rgba(38, 208, 206, 0.1);
}

.quiz-description-edit {
  font-size: 14px;
  font-weight: normal;
  color: #64748b;
  min-height: 60px;
  resize: vertical;
  font-family: inherit;
}

.hidden {
  display: none !important;
}

.questions-info {
  margin: 12px 0;
}

.questions-badge {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  display: inline-block;
}

.question-preview-section {
  background: white;
  padding: 16px;
  border-radius: 8px;
  border-left: 3px solid #26d0ce;
}

.preview-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.preview-item {
  color: #334155;
  font-size: 13px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.preview-item:last-child {
  margin-bottom: 0;
}

/* Settings Panel */
.settings-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setting-block {
  background: white;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.setting-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 10px;
}

.setting-header i {
  color: #26d0ce;
  width: 14px;
}

.setting-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  background: white;
  cursor: pointer;
  margin-bottom: 10px;
}

.setting-select:focus {
  outline: none;
  border-color: #26d0ce;
}

.tag-input-field {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 10px;
}

.tag-input-field:focus {
  outline: none;
  border-color: #26d0ce;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  background: #26d0ce;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chip i {
  cursor: pointer;
  opacity: 0.8;
  font-size: 9px;
}

.chip i:hover {
  opacity: 1;
}

/* Control Bar */
.control-bar {
  background: #ffffff;
  padding: 32px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e2e8f0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #3b5998;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.username {
  color: #26d0ce;
  font-weight: 600;
  font-size: 16px;
}

.controls-group {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: #334155;
  font-weight: 500;
}

.compact-select {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  background: white;
}

.trivia-badge {
  background: #26d0ce;
  color: white;
  padding: 4px 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.toggle-input {
  display: none;
}

.toggle-switch {
  width: 36px;
  height: 20px;
  background: #cbd5e1;
  border-radius: 10px;
  position: relative;
  transition: background 0.3s ease;
}

.toggle-switch:before {
  /* content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease; */
}

.toggle-input:checked+.toggle-switch {
  background: #26d0ce;
}

.toggle-input:checked+.toggle-switch:before {
  transform: translateX(24px);
}

/* Action Bar */
.action-bar {
  background: white;
  padding: 24px 32px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quiz-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.quiz-name {
  font-size: 20px;
  font-weight: 700;
  color: #334155;
  margin: 0;
}

.quiz-meta {
  font-size: 13px;
  color: #64748b;
}

.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
}

.action-btn {
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  position: relative;
}

.action-btn i {
  font-size: 12px;
}

.action-btn.primary {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(38, 208, 206, 0.3);
}

.action-btn.primary:hover {
  background: linear-gradient(135deg, #20b2b5 0%, #1a9b9e 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(38, 208, 206, 0.4);
}

.action-btn.secondary {
  background: #ffffff;
  color: #64748b;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.action-btn.secondary:hover {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.action-btn.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.action-btn.danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Add visual separation between button groups */
.action-btn.primary+.action-btn.secondary {
  margin-left: 8px;
}

.action-btn.secondary:last-of-type+.action-btn.danger {
  margin-left: 12px;
}

/* Notification System */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 400px;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: slideInRight 0.3s ease-out;
}

.notification-success {
  background: #10b981;
  color: white;
}

.notification-info {
  background: #3b82f6;
  color: white;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-content i {
  font-size: 16px;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-btn {
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.action-btn.primary {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(38, 208, 206, 0.2);
}

.action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(38, 208, 206, 0.3);
}

.action-btn.secondary {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.action-btn.secondary:hover {
  background: #e2e8f0;
  color: #334155;
  transform: translateY(-1px);
}

.action-btn.danger {
  background: #ef4444;
  color: white;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
}

.action-btn.danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

/* Enhanced Mobile-First Responsive Design */

/* Large Desktop */
@media (max-width: 1200px) {
  .container {
    max-width: 1200px;
  }

  .second-row-cards {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .quiz-thumbnail-large {
    flex: 0 0 380px;
  }
}

/* iPad Pro and Large Tablets */
@media (max-width: 1024px) and (min-width: 769px) {
  .quiz-header-content {
    min-height: 300px;
  }

  .quiz-thumbnail-large {
    height: 300px;
  }

  .quiz-details-content {
    height: 300px;
    padding: 36px 32px;
  }

  .quiz-title-main {
    font-size: 30px;
  }

  .quiz-description-main {
    font-size: 16px;
  }

  .action-buttons-section {
    padding: 28px 32px;
  }

  .play-btn-large-external {
    height: 60px;
    font-size: 17px;
    min-width: 240px;
  }

  .compact-action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .compact-action-btn {
    height: 50px;
    padding: 0 18px;
  }

  .compact-action-btn .btn-text {
    opacity: 1;
    visibility: visible;
    max-width: none;
    margin-left: 10px;
    font-size: 14px;
  }

  .control-bar {
    padding: 30px 32px;
  }

  .controls-group {
    gap: 28px;
  }

  .control-item {
    font-size: 16px;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  body {
    padding: 20px;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .quiz-header-content {
    flex-direction: column;
    gap: 0;
    min-height: auto;
  }

  .quiz-thumbnail-large {
    flex: none;
    width: 100%;
    height: 320px;
    border-radius: 16px 16px 0 0;
  }

  .quiz-details-content {
    border-radius: 0;
    padding: 32px 28px;
    height: auto;
  }

  .quiz-title-main {
    font-size: 28px;
    margin-bottom: 12px;
  }

  .quiz-description-main {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .second-row-cards {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .control-bar {
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
    padding: 28px 32px;
  }

  .controls-group {
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    justify-content: center;
  }

  .action-buttons-section {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
    padding: 24px 28px;
  }

  .play-btn-large-external {
    width: 100%;
    min-width: auto;
    height: 56px;
    font-size: 16px;
  }

  .compact-action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    width: 100%;
  }

  .mobile-menu-btn:hover {
    border-color: #26d0ce;
    background: #f0fdfc;
  }
  .compact-action-buttons::before {
    Display: none;
  }

  .compact-action-btn {
    height: 48px;
    padding: 0 16px;
    justify-content: center;
  }

  .compact-action-btn .btn-text {
    opacity: 1;
    visibility: visible;
    max-width: none;
    margin-left: 8px;
  }
}

/* Mobile Large */
@media (max-width: 768px) {
  body {
    padding: 12px;
    font-size: 16px;
  }

  .container {
    padding: 0;
    margin: 0;
  }

  .header {
    margin-bottom: 24px;
    border-radius: 20px;
    overflow: hidden;
  }

  .quiz-main-section {
    gap: 24px;
  }

  .quiz-info-simple {
    padding: 0 !important;
  }

  .quiz-header-content {
    gap: 0;
    min-height: auto;
  }

  .thumbnail-section {
    flex: 0 0 20px;
  }

  .quiz-thumbnail-large {
    height: 280px;
    border-radius: 20px 20px 0 0;
  }

  .quiz-details-content {
    padding: 24px 20px;
    height: auto;
  }

  .quiz-title-main {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 16px;
    max-width: 100%;
  }

  .quiz-description-main {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
  }

  .sample-questions {
    margin: 16px 0;
    padding: 18px;
    border-radius: 12px;
  }

  .question-list-preview li {
    font-size: 15px;
    margin-bottom: 14px;
  }

  .quiz-meta {
    font-size: 14px;
    margin-top: 16px;
  }

  /* Mobile Quiz Settings Row */
  .quiz-settings-row {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-top: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafb;
  }

  .settings-item {
    justify-content: flex-start;
    padding: 0;
    border-bottom: none;
    font-size: 13px;
  }

  /* Hide Public/Downloadable toggles on mobile */
  .settings-item:has(.visibility-toggle) {
    display: none;
  }

  .settings-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .settings-item:first-child {
    padding-top: 0;
  }

  .settings-item label {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
  }

  .user-info-compact {
    display: flex !important;
    width: 100% !important;
  }

  .settings-select {
    min-width: 120px;
    padding: 8px 12px;
    font-size: 14px;
  }

  .quiz-type-badge {
    padding: 8px 16px;
    font-size: 13px;
  }

  .user-info-compact {
    margin-left: 0;
    justify-content: flex-start;
    gap: 12px;
  }

  .user-avatar-small {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .username-small {
    font-size: 15px;
    font-weight: 600;
  }

  .rating-group {
    gap: 24px;
  }

  .rating-item {
    gap: 8px;
  }

  .rating-item i {
    font-size: 16px;
  }

  .rating-item span {
    font-size: 15px;
    font-weight: 600;
  }

  .visibility-toggle {
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
  }

  .toggle-switch {
    width: 48px;
    height: 26px;
  }

  .toggle-switch::before {
    width: 22px;
    height: 22px;
  }

  .toggle-input:checked+.toggle-switch::before {
    transform: translateX(22px);
  }

  /* Mobile Compact Categories & Tags */
  .categories-tags-compact {
    padding: 20px;
    margin-bottom: 20px;
  }

  /* Mobile Sidebar Layout */
  .title-description-categories-row {
    flex-direction: column;
    gap: 20px;
  }

  .categories-tags-sidebar {
    flex: none;
    width: 100%;
  }

  .compact-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
  }

  .compact-edit-btn {
    align-self: flex-end;
    padding: 12px 18px;
    font-size: 15px;
    border-radius: 12px;
  }

  .compact-content {
    gap: 20px;
  }

  .compact-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .compact-label {
    font-size: 15px;
    min-width: auto;
  }

  .compact-tags {
    gap: 10px;
  }

  .compact-tag {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 18px;
  }

  .compact-value {
    font-size: 15px;
  }

  .compact-meta-row {
    flex-direction: column;
    gap: 16px;
  }

  /* Mobile Expandable Description */
  .description-text {
    font-size: 15px;
  }

  .description-text.collapsed {
    max-height: 3em;
    /* Slightly less on mobile */
  }

  .read-more-btn {
    font-size: 13px;
    margin-top: 6px;
  }

  .second-row-cards {
    gap: 20px;
  }

  .card-header {
    padding: 16px 20px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .card-title {
    font-size: 22px;
  }

  .edit-btn {
    padding: 12px 18px;
    font-size: 15px;
    border-radius: 12px;
  }

  .card-content {
    padding: 24px;
  }

  .detail-item {
    margin-bottom: 24px;
  }

  .detail-label {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .detail-value {
    font-size: 16px;
  }

  .tag-display {
    gap: 10px;
  }

  .tag {
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 20px;
  }

  /* Mobile Action Buttons - Inline expansion layout */
  .action-buttons-section {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 24px;
    background: #f8fafc;
    position: relative;
  }

  /* Top row with play button and 3-dot menu */
  .mobile-top-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 0;
    width: 100%;
  }

  .play-btn-large-external {
    flex: 1;
    height: 60px;
    font-size: 18px;
    border-radius: 16px;
    margin: 0;
    min-width: 0;
    max-width: calc(100% - 76px);
  }

  /* Hide desktop action buttons on mobile */
  .compact-action-buttons {
    display: none;
  }

  /* Show mobile menu button on mobile */
  .mobile-menu-btn {
    display: flex;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: white;
    border: 2px solid #e2e8f0;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
  }

  .mobile-menu-btn:hover {
    border-color: #26d0ce;
    background: #f0fdfc;
  }

  .mobile-menu-btn i {
    font-size: 20px;
    color: #64748b;
    transition: all 0.3s ease;
  }

  .mobile-menu-btn:hover i {
    color: #26d0ce;
  }

  /* Rotate icon when expanded */
  .mobile-menu-btn.expanded i {
    transform: rotate(90deg);
    color: #26d0ce;
  }

  /* Mobile inline expanded menu */
  .mobile-action-menu {
    width: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-top: 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(-10px);
  }

  .mobile-action-menu.show {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
    width: 100vw;
    max-width: 100% !important;
    position: relative;
    z-index: 99;
    pointer-events: auto;
  }

  /* Grid layout for mobile action buttons */
  .mobile-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    /* width: 100%; */
    padding: 0;
    width: 92vw;
    position: relative;
    z-index: 100;
    pointer-events: auto;
  }

  .mobile-action-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    border: 2px solid #e2e8f0;
    background: white;
    text-align: center;
    min-height: 56px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Fix for landscape click issues */
    position: relative;
    z-index: 100;
    pointer-events: auto;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-action-item:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  .mobile-action-item.primary {
    color: white;
    background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
    border-color: #26d0ce;
    box-shadow: 0 2px 8px rgba(38, 208, 206, 0.2);
  }

  .mobile-action-item.primary:hover {
    background: linear-gradient(135deg, #20b2b5 0%, #1a9d9d 100%);
    border-color: #20b2b5;
    box-shadow: 0 4px 12px rgba(38, 208, 206, 0.3);
  }

  .mobile-action-item.danger {
    color: white;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    grid-column: 1 / -1;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
  }

  .mobile-action-item.danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  }

  .mobile-action-item i {
    font-size: 16px;
    flex-shrink: 0;
  }

  /* Position relative for dropdown */
  .action-buttons-section {
    position: relative;
  }

  /* Mobile Settings Button */
  .mobile-settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    margin-top: 16px;
  }

  .mobile-settings-btn:hover {
    border-color: #26d0ce;
    color: #26d0ce;
    background: #f0fdfc;
  }

  .mobile-settings-btn i {
    font-size: 16px;
  }

  /* Hide desktop settings on mobile */
  .desktop-settings {
    display: none;
  }

  /* Show mobile elements */
  .mobile-menu-toggle {
    display: flex !important;
  }

  .mobile-settings-btn {
    display: flex !important;
  }

  /* Enhanced touch targets */
  .play-btn-large-external {
    height: 56px;
    font-size: 18px;
    border-radius: 16px;
    /* margin-bottom: 16px; */
  }

  /* Mobile Control Bar */
  .control-bar {
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    align-items: stretch;
  }

  .user-info {
    justify-content: center;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
  }

  .user-avatar {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .username {
    font-size: 18px;
    font-weight: 700;
  }

  .controls-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    min-height: 60px;
  }

  .control-item label {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
  }

  .compact-select {
    min-width: 140px;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
  }

  .toggle-label {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 16px;
    font-weight: 600;
  }

  .toggle-switch {
    width: 52px;
    height: 28px;
    border-radius: 14px;
  }

  .toggle-switch:before {
    width: 24px;
    height: 14px;
    border-radius: 12px;
  }

  .toggle-input:checked+.toggle-switch:before {
    transform: translateX(24px);
  }

  .trivia-badge {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 16px;
  }

  /* Mobile Questions Section */
  .questions-section {
    margin-bottom: 32px;
    padding: 0;
  }

  .questions-header {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
    padding: 24px;
    background: white;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  }

  .section-title {
    font-size: 24px;
    text-align: center;
    color: #334155;
    font-weight: 700;
  }

  .add-question-btn {
    width: 100%;
    padding: 18px 24px;
    font-size: 17px;
    border-radius: 16px;
    background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
    color: white;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(38, 208, 206, 0.3);
  }

  .question-card {
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  }

  .question-header {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  .question-number {
    width: 40px;
    height: 40px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 12px;
    align-self: flex-start;
  }

  .question-text {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 24px;
    font-weight: 600;
    color: #334155;
  }

  .answer-options {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .answer-option {
    padding: 18px 20px;
    border-radius: 16px;
    min-height: 64px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
  }

  .answer-option.correct {
    border-color: #10b981;
    background: #f0fdf4;
  }

  .answer-letter {
    width: 32px;
    height: 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
  }

  .answer-text {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 500;
  }

  .question-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
  }

  .question-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 18px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    transition: all 0.2s ease;
  }

  .question-action-btn:hover {
    border-color: #26d0ce;
    color: #26d0ce;
    background: #f0fdfc;
  }

  /* Mobile Modal Improvements */
  .modal-content {
    margin: 16px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 32px);
    border-radius: 20px;
  }

  .modal-header {
    padding: 24px 20px 16px;
  }

  .modal-header h2 {
    font-size: 22px;
  }

  .close-btn {
    font-size: 24px;
    padding: 8px;
  }

  .modal-body {
    padding: 0 20px 20px;
  }

  .form-group {
    margin-bottom: 24px;
  }

  .form-group label {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .form-input,
  .form-textarea,
  .form-select {
    padding: 16px;
    font-size: 16px;
    border-radius: 12px;
    min-height: 56px;
  }

  .form-textarea {
    min-height: 120px;
  }

  .modal-footer {
    padding: 16px 20px 24px;
    flex-direction: column;
    gap: 12px;
  }

  .btn-secondary,
  .btn-primary {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border-radius: 12px;
    min-height: 56px;
  }

  /* Mobile Notification */
  .notification {
    top: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
    border-radius: 12px;
    padding: 20px;
  }

  .notification-content {
    font-size: 15px;
  }
}

/* Mobile Small */
@media (max-width: 480px) {
  body {
    padding: 12px;
    font-size: 15px;
  }

  .quiz-title-main {
    font-size: 24px;
    line-height: 1.2;
  }

  .quiz-description-main {
    font-size: 15px;
  }

  .quiz-details-content {
    padding: 20px 18px;
  }

  .action-buttons-section {
    padding: 20px 18px;
  }

  .play-btn-large-external {
    height: 56px;
    font-size: 16px;
    padding: 16px 32px;
  }

  .compact-action-buttons {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .compact-action-btn {
    height: 48px;
    font-size: 14px;
  }

  .compact-action-btn i {
    font-size: 16px;
  }

  .control-bar {
    padding: 20px 18px;
  }

  .control-item {
    padding: 14px 16px;
    min-height: 56px;
  }

  .control-item label {
    font-size: 15px;
  }

  .compact-select {
    min-width: 120px;
    padding: 10px 14px;
    font-size: 14px;
  }

  .card-header {
    padding: 20px 18px;
  }

  .card-content {
    padding: 20px 18px;
  }

  .card-title {
    font-size: 20px;
  }

  .questions-header {
    padding: 20px 18px;
  }

  .section-title {
    font-size: 22px;
  }

  .question-card {
    padding: 20px 18px;
  }

  .question-text {
    font-size: 17px;
  }

  .answer-option {
    padding: 16px 18px;
    min-height: 60px;
  }

  .answer-text {
    font-size: 15px;
  }

  .header {
    margin-bottom: 16px;
  }

  .quiz-main-section {
    gap: 16px;
  }

  .quiz-thumbnail-large {
    height: 200px;
  }

  .quiz-details-content {
    padding: 20px 16px;
  }

  .quiz-title-main {
    font-size: 22px !important;
    line-height: 1.3;
  }

  .quiz-description-main {
    font-size: 14px;
  }

  .quiz-logo-overlay {
    top: 12px;
    left: 12px;
    bottom: 12px;
    right: 12px;
    padding: 12px;
  }

  .quiz-logo {
    height: 20px;
  }

  .sample-questions {
    padding: 12px 14px;
    margin: 12px 0;
  }

  .question-list-preview li {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .questions-meta-container .quiz-meta {
    font-size: 12px;
    text-align: center;
    margin-top: 12px;
  }

  .action-buttons-section {
    padding: 16px;
  }

  .play-btn-large-external {
    height: 52px;
    font-size: 16px;
    min-width: auto;
    padding: 0 5rem !important;
  }

  .compact-action-buttons {
    display: none;
    /* Hide on small mobile */
  }

  .mobile-menu-toggle {
    display: flex !important;
  }

  .mobile-settings-btn {
    display: flex !important;
  }

  .desktop-settings {
    display: none !important;
  }

  .compact-action-btn {
    height: 44px;
    font-size: 13px;
    padding: 0 12px;
  }

  .compact-action-btn .btn-text {
    font-size: 12px;
    margin-left: 6px;
  }

  .compact-action-btn i {
    font-size: 14px;
  }

  .control-bar {
    padding: 16px;
    gap: 16px;
  }

  .user-info {
    gap: 10px;
  }

  .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .username {
    font-size: 15px;
  }

  .control-item {
    padding: 12px;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .control-item label {
    font-size: 14px;
  }

  .compact-select {
    width: 100%;
    min-width: auto;
  }

  .second-row-cards {
    gap: 12px;
  }

  .card-header {
    padding: 16px;
  }

  .card-title {
    font-size: 18px;
  }

  .card-content {
    padding: 16px;
  }

  .detail-item {
    margin-bottom: 16px;
  }

  .tag {
    padding: 6px 12px;
    font-size: 12px;
  }

  .questions-section {
    padding: 16px;
  }

  .section-title {
    font-size: 20px;
  }

  .add-question-btn {
    padding: 14px 16px;
    font-size: 15px;
  }

  .question-card {
    padding: 16px;
  }

  .question-text {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .answer-option {
    padding: 14px;
    min-height: 52px;
  }

  .answer-letter {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .answer-text {
    font-size: 14px;
  }

  .question-actions {
    gap: 10px;
  }

  .question-action-btn {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  /* Ultra-small screens */
  .modal-content {
    margin: 8px;
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    /* padding: 16px; */
  }

  .form-input,
  .form-textarea,
  .form-select {
    padding: 14px;
    font-size: 16px;
    /* Prevent zoom on iOS */
  }
}

/* Landscape orientation optimizations */
@media (max-width: 768px) and (orientation: landscape) {
  .quiz-thumbnail-large {
    height: 180px;
  }

  .quiz-details-content {
    padding: 16px 20px;
  }

  .quiz-title-main {
    font-size: 24px;
  }

  .control-bar {
    padding: 16px 20px;
  }

  .controls-group {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

  .quiz-logo,
  .thumbnail-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {

  /* Ensure minimum touch target sizes */
  button,
  .btn,
  .compact-action-btn,
  .question-action-btn {
    min-height: 26px;
    min-width: 44px;
    margin: 0;
  }

  /* Remove focus outline on buttons - override Bootstrap */
  button:focus,
  button:focus-visible,
  .btn:focus,
  .btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
  }

  input:focus,
  select:focus,
  textarea:focus {
    outline: 3px solid #26d0ce;
    outline-offset: 2px;
  }

  /* Better contrast for mobile */
  .quiz-description-main {
    color: #475569;
  }

  .detail-label {
    color: #475569;
  }

  /* Mobile touch improvements */
  * {
    -webkit-tap-highlight-color: rgba(38, 208, 206, 0.2);
    -webkit-touch-callout: none;
  }

  .assignment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    width: 100%;
    flex-direction: column;
    align-items: baseline;
    gap: 20px;
  }

  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;

  }

  /* Prevent text selection on UI elements */
  .compact-action-btn,
  .question-action-btn,
  .card-header,
  .control-bar {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }

  /* Better button press feedback */
  .compact-action-btn:active,
  .question-action-btn:active,
  .play-btn-large-external:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  /* Improve input experience */
  input[type="text"],
  input[type="email"],
  textarea,
  select {
    -webkit-appearance: none;
    border-radius: 12px;
    font-size: 16px;
    /* Prevent zoom on iOS */
  }

  /* Better modal experience */
  .modal {
    -webkit-overflow-scrolling: touch;
  }

  .modal-content {
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
  }

  .modal.show .modal-content {
    transform: translateY(0);
  }

  /* Sticky positioning for mobile headers */
  .questions-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0;
    padding-bottom: 16px;
  }

  /* Better spacing for mobile content */
  .question-card+.question-card {
    margin-top: 20px;
  }

  /* Improved mobile navigation */
  .control-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* Loading states for mobile */
  .compact-action-btn.loading {
    pointer-events: none;
    opacity: 0.6;
  }

  .compact-action-btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }

    100% {
      transform: rotate(360deg);
    }
  }

  /* Safe area handling for notched devices */
  .container {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .header {
    padding-top: max(16px, env(safe-area-inset-top));
  }

  .questions-section {
    padding: 0;
  }

  .questions-section:last-child {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    padding: 0 !important;
  }

  .question-card {
    padding: 8px !important;
  }

  .assignment-details {
    grid-template-columns: 1fr;
  }

  .results-table {
    overflow: scroll;
    max-width: 85vw;
  }

  .table-header {
    width: fit-content;
  }
}

/* Main Content */
.main-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Quiz Details Section */
.quiz-details {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.info-card {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #26d0ce;
}

.info-label {
  font-size: 12px;
  color: #7f8c8d;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 5px;
}

.info-value {
  font-size: 16px;
  color: #2c3e50;
  font-weight: 500;
}

/* Questions Section */
.questions-section {
  margin-bottom: 40px;
}

.questions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
}

.add-question-btn {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(38, 208, 206, 0.3);
}

.add-question-btn:hover {
  background: #20b2b5;
  transform: translateY(-2px);
}

/* Question Card - Universal styling for all game types */
.question-card,
.list-question-card,
.hm-question-card,
.wof-question-card,
.fusion-question-card,
.grid-question-card,
.ttt-question-card {
  background: var(--card-bg);
  border-radius: var(--border-radius-card);
  padding: 24px;
  margin-bottom: 24px;
  border: 2px solid var(--border-color);
  transition: var(--transition-smooth);
}

.question-card:hover,
.list-question-card:hover,
.hm-question-card:hover,
.wof-question-card:hover,
.fusion-question-card:hover,
.grid-question-card:hover,
.ttt-question-card:hover {
  border-color: var(--teal-primary);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-hover);
}

.question-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 15px;
  gap: 15px;
}

.question-number {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(38, 208, 206, 0.3);
}

.question-content {
  flex: 1;
}

.question-text {
  font-size: 18px;
  font-weight: 600;
  color: #334155;
  line-height: 1.5;
}

.question-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.question-action-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  color: #7f8c8d;
  transition: all 0.3s ease;
}

.question-action-btn:hover {
  background: #26d0ce;
  color: white;
}

/* Universal Answer Options Styling - All Game Types */
.answer-option,
.list-answer-option,
.list-answer-options-split .list-answer-option,
.fusion-mc-option,
.fusion-list-answers ul li,
.grid-answer-option,
.ttt-answer-option,
.hm-answer-option,
.wof-answer-option {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-small);
  padding: 12px 15px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 10px;
}

.answer-option:hover,
.list-answer-option:hover,
.list-answer-options-split .list-answer-option:hover,
.fusion-mc-option:hover,
.fusion-list-answers ul li:hover,
.grid-answer-option:hover,
.ttt-answer-option:hover,
.hm-answer-option:hover,
.wof-answer-option:hover {
  border-color: var(--teal-primary) !important;
  background: var(--light-teal-bg) !important;
  transform: translateX(2px);
  box-shadow: var(--box-shadow-answer) !important;
}

.answer-option.correct,
.list-answer-option.list-correct,
.list-answer-options-split .list-answer-option.list-correct,
.fusion-mc-option.correct,
.fusion-list-answers ul li.correct,
.grid-answer-option.correct,
.ttt-answer-option.correct,
.hm-answer-option.correct,
.wof-answer-option.correct {
  border-color: var(--green-success);
  background: #d5f4e6;
}

.answer-option.correct:hover,
.list-answer-option.list-correct:hover,
.list-answer-options-split .list-answer-option.list-correct:hover,
.fusion-mc-option.correct:hover,
.fusion-list-answers ul li.correct:hover,
.grid-answer-option.correct:hover,
.ttt-answer-option.correct:hover,
.hm-answer-option.correct:hover,
.wof-answer-option.correct:hover {
  border-color: var(--green-success);
  background: #c8f2d7;
}

/* Universal Answer Section Styling - All Game Types */
.hm-answer-section,
.wof-answer-section,
.fusion-answer-section {
  /* margin-top: 18px; */
  padding: 16px;
  background: var(--card-bg);
  border-radius: 12px;
  border: 2px solid var(--border-color);
  transition: var(--transition-smooth);
}

.hm-answer-section:hover,
.wof-answer-section:hover,
.fusion-answer-section:hover {
  border-color: var(--teal-primary) !important;
  background: var(--light-teal-bg) !important;
  box-shadow: var(--box-shadow-hover) !important;
  transform: translateY(-2px);
}

.answer-letter {
  background: #26d0ce;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}

.answer-option.correct .answer-letter {
  background: #27ae60;
}

.answer-option.incorrect .answer-letter {
  background: #e74c3c;
}

.answer-text {
  flex: 1;
  font-size: 14px;
  color: #2c3e50;
}

/* Customization Panel */
.customization-panel {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.customization-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  border-bottom: 2px solid #f1f2f6;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 500;
  color: #7f8c8d;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.tab-btn.active {
  color: #26d0ce;
  border-bottom-color: #26d0ce;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.customization-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.customization-item {
  text-align: center;
}

.customization-label {
  font-size: 12px;
  color: #7f8c8d;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
}

.color-picker {
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin: 0 auto;
  display: block;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.background-option {
  width: 100px;
  height: 60px;
  border-radius: 8px;
  cursor: pointer;
  margin: 0 auto;
  display: block;
  border: 3px solid transparent;
  transition: all 0.3s ease;
}

.background-option:hover {
  border-color: #26d0ce;
}

.background-option.selected {
  border-color: #26d0ce;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

/* Edit Details Modal Styles */
.edit-details-content {
  max-width: 600px;
  width: 95%;
}

.edit-section {
  margin-bottom: 24px;
}

.edit-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.edit-input:focus {
  outline: none;
  border-color: #26d0ce;
}

.edit-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s ease;
}

.edit-textarea:focus {
  outline: none;
  border-color: #26d0ce;
}

.edit-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 12px;
}

.edit-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.edit-select:focus {
  outline: none;
  border-color: #26d0ce;
  box-shadow: 0 0 0 3px rgba(38, 208, 206, 0.1);
}

.edit-categories-container,
.edit-tags-container {
  background: #f8fafc;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  padding: 12px;
  min-height: 80px;
}

.edit-selected-categories,
.edit-selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.edit-category-chip,
.edit-tag-chip {
  background: #64748b;
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.edit-category-chip i,
.edit-tag-chip i {
  cursor: pointer;
  opacity: 0.8;
  font-size: 10px;
}

.edit-category-chip i:hover,
.edit-tag-chip i:hover {
  opacity: 1;
}

.edit-tag-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  font-size: 14px;
  background: white;
}

.edit-tag-input:focus {
  outline: none;
  border-color: #26d0ce;
}

.edit-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
}

.edit-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-btn {
  background: #f1f5f9;
  color: #64748b;
}

.cancel-btn:hover {
  background: #e2e8f0;
}

.save-btn {
  background: #26d0ce;
  color: white;
}

.save-btn:hover {
  background: #20b2b5;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  color: #2c3e50;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #7f8c8d;
  padding: 5px;
}

.close-btn:hover {
  color: #e74c3c;
}

/* Preview Section */
.preview-section {
  /* background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); */
}

.preview-screen {
  background: #2c3e50;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: white;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-image: url("https://play.triviamaker.com/ImageUpload/upload/H49HqGOXM6eoSlpl95yPnv67peb2/20250428174586021172049/20250428174586021172049BG.png?id=4749");
  background-size: cover;
  background-position: center;
}

.preview-logo {
  height: 40px;
  margin-bottom: 20px;
}

.preview-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
}

.preview-subtitle {
  font-size: 16px;
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .quiz-overview {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .quiz-thumbnail-section {
    grid-row: 1;
  }

  .quiz-meta-section {
    grid-row: 2;
  }

  .quiz-info-section {
    grid-row: 3;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header {
    padding: 15px;
  }

  .quiz-overview {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .quiz-thumbnail {
    height: 150px;
  }

  .title-description-section {
    width: -webkit-fill-available;
  }

  /* .quiz-settings-row {
    flex-direction: column;
    gap: 0px;
    align-items: flex-start;
  } */
  .quiz-settings-row {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 8px;
    padding: 10px 14px;
    margin-top: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafb;
  }

  /* Reset all items */
  .quiz-settings-row .settings-item {
    width: auto;
    display: flex;
    align-items: center;
    padding: 0;
    border-bottom: none;
  }

  /* 1️⃣ Language */
  .quiz-settings-row .settings-item:nth-child(1) {
    justify-content: flex-start;
  }

  /* 2️⃣ + 3️⃣ Badges */
  .quiz-settings-row .settings-item:nth-child(2),
  .quiz-settings-row .settings-item:nth-child(3) {
    display: flex;
    align-items: center;
  }

  .quiz-settings-row .settings-item:nth-child(2) {
    gap: 8px;
  }

  /* 4️⃣ + 5️⃣ Toggles - Hide on mobile */
  .quiz-settings-row .settings-item:has(.visibility-toggle) {
    display: none;
  }

  /* User info full width */
  .quiz-settings-row .user-info-compact {
    display: flex !important;
    width: 100%;
    grid-column: 1 / -1;
    margin-top: 4px;
  }

  body {
    padding: 0;
  }

  .quiz-settings {
    flex-wrap: wrap;
    gap: 15px;
  }

  .action-buttons-row {
    flex-direction: column;
    text-align: center;
  }

  .action-buttons {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
  }

  .action-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }

  .main-quiz-title {
    font-size: 20px;
  }

  .answer-options {
    grid-template-columns: 1fr;
  }

  .customization-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .modal-content {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .quiz-thumbnail-section {
    text-align: center;
  }

  .quiz-header-info {
    padding: 15px;
  }

  .quiz-title {
    font-size: 20px;
  }

  .categories-section,
  .tags-section {
    text-align: center;
  }

  .category-tags,
  .tag-list {
    justify-content: center;
  }

  .quiz-settings {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .setting-item {
    justify-content: space-between;
    width: 100%;
  }

  .question-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .question-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .quiz-info {
    grid-template-columns: 1fr;
  }
}

/* Customizations Section */
.customizations-section,
.assignment-section,
.comments-section {
  /* margin-bottom: 40px; */
}

.premium-badge {
  min-width: 13rem;
  justify-content: end;
  background: #f3f4f6;
  color: #6b7280;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.customization-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.custom-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.custom-label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.color-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.color-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.color-item label {
  font-size: 14px;
  color: #64748b;
}

.color-picker {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid #e2e8f0;
  transition: border-color 0.2s ease;
}

.color-picker:hover {
  border-color: #26d0ce;
}

.background-preview {
  position: relative;
  width: 100%;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e2e8f0;
}

.background-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.change-bg-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
}

.font-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
}

.beta-badge {
  background: #3b82f6;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 8px;
}

.logo-upload {
  width: 100%;
}

.upload-area {
  border: 2px dashed #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.upload-area:hover {
  border-color: #26d0ce;
}

.upload-area i {
  font-size: 24px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.upload-area span {
  display: block;
  color: #64748b;
  font-size: 14px;
}

.preview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.preview-card {
  border-radius: 8px;
  overflow: hidden;
  height: fit-content;
  position: relative;
}

.preview-card.dark {
  background: #374151;
  border: 1px solid #e2e8f0;

}

.preview-card.light {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.preview-card.blue {
  background: #dbeafe;
  border: 1px solid #e2e8f0;

}

.preview-header {
  padding: 12px;
}

.preview-logo {
  height: 20px;
}

.preview-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  overflow: hidden;
}

.preview-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-content {
  padding: 16px;
}

.preview-content h5 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
}

.preview-content p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.answer-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.answer-option {
  background: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  text-align: center;
}

/* Assignment Section */
.invite-text {
  color: #64748b;
  margin-bottom: 20px;
}

.assignment-details {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  flex-direction: column;
}

.assignment-item label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.link-container {
  display: flex;
  gap: 8px;
}

.assignment-link {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  background: #f8fafc;
}

.copy-btn {
  background: #26d0ce;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
}

.expire-date {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
}

.assignment-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.results-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 16px 0;
}

.results-table {
  background: #f8fafc;
  border-radius: 8px;
  overflow: hidden;
}

.table-header,
.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 12px 16px;
}

.table-header {
  background: #e2e8f0;
  font-weight: 600;
  font-size: 12px;
  color: #475569;
  text-transform: uppercase;
}

.table-row {
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}

.result-score {
  background: #fbbf24;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

.incorrect {
  color: #ef4444;
  font-weight: 600;
}

.correct {
  color: #10b981;
  font-weight: 600;
}

.unattempted {
  color: #6b7280;
}

/* Comments Section */
.comment-prompt {
  color: #64748b;
  margin-bottom: 16px;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.comment-textarea:focus {
  outline: none;
  border-color: #26d0ce;
  box-shadow: 0 0 0 3px rgba(38, 208, 206, 0.1);
}

/* ---------------- list style ----------------  */
/* List Questions Container */
.list-questions-container {
  margin-bottom: 2rem;
}

.list-question-list-card {
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.list-question-list-card:hover {
  border-color: #eeb154;
  box-shadow: 0 4px 20px rgba(238, 177, 84, 0.2);
}

.list-question-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}



/* List Split Answer Options Layout */
.list-answer-options-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

.list-answer-options-left,
.list-answer-options-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-answer-options-split .list-answer-option {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
}



.list-answer-options-split .list-answer-option.list-correct {
  border-color: #10b981;
  background: #f0fdf4;
}



.list-answer-options-split .list-answer-letter {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.list-answer-options-split .list-answer-option.list-correct .list-answer-letter {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.list-answer-options-split .list-answer-text {
  color: #334155;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  flex: 1;
}

/* List Question Header */
.list-question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.list-question-number {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.list-question-content {
  flex: 1;
  margin: 0 20px;
}

.list-question-text {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
}

.list-question-actions {
  display: flex;
  gap: 8px;
}

.list-question-action-btn {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.list-question-action-btn:hover {
  background: #e2e8f0;
  color: #334155;
  transform: scale(1.1);
}

/* List Explanation Row */
.list-explanation-row {
  margin-top: 20px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid #26d0ce;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.list-explanation-content {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.list-explanation-icon {
  color: #26d0ce;
  font-size: 20px;
  margin-top: 2px;
}

.list-explanation-text {
  color: #475569;
  font-size: 15px;
  line-height: 1.5;
}

.list-explanation-media {
  display: flex;
  gap: 10px;
}

.list-youtube-icon {
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.list-youtube-icon:hover {
  transform: scale(1.1);
}

/* Mobile Responsive for List Layout */
@media (max-width: 768px) {
  .list-answer-options-split {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .list-answer-options-left,
  .list-answer-options-right {
    gap: 10px;
  }

  .list-answer-options-split .list-answer-option {
    padding: 14px 16px;
    min-height: 52px;
  }

  /* Mobile styles for fusion list items */
  .fusion-list-item {
    max-width: 90%;
  }

  .fusion-list-score {
    display: none;
  }



  .list-answer-options-split .list-answer-letter {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .list-answer-options-split .list-answer-text {
    font-size: 14px;
  }

  .list-question-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .list-question-number {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .list-question-text {
    font-size: 16px;
  }

  .list-explanation-row {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .list-question-card {
    padding: 18px;
  }

  .list-answer-options-split .list-answer-option {
    padding: 12px 14px;
    min-height: 48px;
    gap: 12px;
  }

  .list-answer-options-split .list-answer-letter {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .list-answer-options-split .list-answer-text {
    font-size: 13px;
  }
}

/* ------------- hangman style ----------------  */
/* HangMan Section - Prefix: hm- */
.hm-questions-container {
  /* margin-bottom: 2rem; */
}

.hm-quiz-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  /* transition: all 0.3s ease; */
  border: 1px solid #f1f5f9;
  margin-top: 0.5rem;
}

.hm-card-header {
  display: flex;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfc;
}

/* ============================================================================
   TICTACTOE STYLES
   ============================================================================ */

/* TTT Grid Box Styling */
.TTTGridBox {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  cursor: pointer;
}

.TTTGridBox:hover {
  border-color: #26d0ce;
  /* background: #f0fdfc; */
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(38, 208, 206, 0.1);
}

.TTTboxstyle {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* TTT Question and Answer Row */
.TTTQArow {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.TTTQArow:last-child {
  border-bottom: none;
}

/* TTT Question and Answer Content */
.TTTQandAContent {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* TTT Question Square Box */
.TTTQueSquarebox {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
  text-overflow: ellipsis;
}

/* Different clamping for question and answer rows */
.TTTQArow:first-child .TTTQueSquarebox {
  -webkit-line-clamp: 2;
  /* Questions: 2 lines max */
}

.TTTQArow:last-child .TTTQueSquarebox {
  -webkit-line-clamp: 1;
  /* Answers: 1 line max */
}

/* TTT Media Icon Container */
.TTTMediaIcon {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.TTTMediaIcon i {
  color: #26d0ce !important;
  font-size: 1.7rem !important;
  cursor: pointer !important;
  transition: all 0.3s ease;
}

.TTTMediaIcon i:hover {
  color: #20b2b5 !important;
  transform: scale(1.1);
}

/* Mobile responsive for TTT */
@media (max-width: 768px) {
  .TTTGridBox {
    min-height: 120px;
    padding: 10px;
  }

  .TTTQueSquarebox {
    font-size: 12px;
  }

  /* Maintain different clamping for mobile */
  .TTTQArow:first-child .TTTQueSquarebox {
    -webkit-line-clamp: 2;
    /* Questions: 2 lines max */
  }

  .TTTQArow:last-child .TTTQueSquarebox {
    -webkit-line-clamp: 1;
    /* Answers: 1 line max */
  }

  .TTTMediaIcon i {
    font-size: 1.5rem !important;
  }
}

@media (max-width: 480px) {
  .TTTGridBox {
    min-height: 100px;
    padding: 8px;
  }

  .TTTQueSquarebox {
    font-size: 11px;
  }

  /* Maintain different clamping for small mobile */
  .TTTQArow:first-child .TTTQueSquarebox {
    -webkit-line-clamp: 2;
    /* Questions: 2 lines max */
  }

  .TTTQArow:last-child .TTTQueSquarebox {
    -webkit-line-clamp: 1;
    /* Answers: 1 line max */
  }

  .TTTQArow {
    padding: 6px 0;
  }

  .TTTMediaIcon {
    gap: 2px;
  }

  .TTTMediaIcon i {
    font-size: 1.3rem !important;
  }
}

.hm-card-header {}

.hm-card-title {
  font-size: 20px;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.hm-card-content {
  padding: 28px;
}

.hm-question-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 24px;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.hm-question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hm-question-number {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.hm-question-content {
  flex: 1;
  margin: 0 20px;
}

.hm-question-text {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
}

.hm-question-actions {
  display: flex;
  gap: 8px;
}

.hm-question-action-btn {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.hm-question-action-btn:hover {
  background: #e2e8f0;
  color: #334155;
  transform: scale(1.1);
}


/* HangMan Answer Section */
.hm-answer-section {
  margin-top: 18px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e7dfdf;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hm-answer-label {
  font-weight: 600;
  color: #26d0ce;
  font-size: 15px;
}

.hm-answer-value {
  color: #1f2633;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
}

/* Explanation Row */
.hm-explanation-row {
  margin-top: 20px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid #26d0ce;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.hm-explanation-content {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.hm-explanation-icon {
  color: #26d0ce;
  font-size: 20px;
  margin-top: 2px;
}

.hm-explanation-text {
  color: #475569;
  font-size: 15px;
  line-height: 1.5;
}

.hm-explanation-media {
  display: flex;
  gap: 10px;
}

.hm-youtube-icon {
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.hm-youtube-icon:hover {
  transform: scale(1.1);
}

/* Comments Section (copied from list, with hm- prefix) */
.hm-comments-section {
  margin-top: 32px;
}

.hm-comment-prompt {
  color: #64748b;
  margin-bottom: 16px;
}

.hm-comment-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hm-comment-textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.hm-comment-textarea:focus {
  outline: none;
  border-color: #26d0ce;
  box-shadow: 0 0 0 3px rgba(38, 208, 206, 0.1);
}

.hm-action-btn.primary {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
}

/* wof game style  */

.wof-question-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 24px;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}





/* HangMan Answer Section */
.wof-answer-section {
  margin-top: 18px;
  padding: 16px;
  background: #eaeaea21;
  border-radius: 12px;
  border: 1px solid #e7dfdf;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Fusion Card Header - Make it match comment card */
.fusion-quiz-card .card-header {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.25rem !important;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
  min-height: 56px;
  border-radius: 1rem !important;
}

.fusion-quiz-card .card-title {
  font-size: 18px;
  font-weight: 600;
  color: #334155;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fusion-quiz-card .card-title i {
  color: #334155;
  margin-right: 8px;
  font-size: 20px;
}

.fusion-category-row {
  background: #37aeb5;
  color: #fff;
  border-radius: 8px;
  margin: 18px 0 12px 0;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fusion-category-label {
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fusion-category-label i {
  font-size: 18px;
  margin-right: 6px;
}

.fusion-category-action-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

.fusion-category-action-btn:hover {
  color: #e0f7fa;
}








/* grid game style  */

.mobile-grid-container {
  padding: 0 !important;
}

.grid-game-card {
  min-height: 90px;
  font-size: 15px;
  background: #e0f7fa;
  border: 2px solid #26d0ce;
  border-radius: 12px;
  margin-bottom: 8px;
  transition: box-shadow 0.2s;
}

.grid-game-card:hover {
  box-shadow: 0 2px 12px rgba(38, 208, 206, 0.12);
  border-color: #20b2b5;
}

.custom-grid-bg {
  background-color: #e0f7fa !important;
  padding: 0.5rem !important;
}

@media (max-width: 768px) {
  .grid-game-card {
    font-size: 13px;
    min-height: 70px;
    padding: 8px;
  }
}

.cube-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-bottom: 4px;
}

.cube-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: #b9eef2;
  border: 2px solid #26d0ce;
  border-radius: 8px;
  color: #334155;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 2px 8px rgba(38, 208, 206, 0.07);
  outline: none;
}

.cube-btn.active,
.cube-btn:focus {
  border-color: #20b2b5;
  background: #26d0ce;
  color: #fff;
  box-shadow: 0 2px 12px rgba(38, 208, 206, 0.15);
}

.cube-btn:hover {
  background: #e0f7fa;
  border-color: #20b2b5;
}

@media (max-width: 768px) {
  .cube-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
    border-radius: 7px;
    flex-shrink: 0;
  }

  .cube-btn-row {
    gap: 6px;
  }
}

/* ===== GRID CONTROLS: side-by-side on desktop, stacked on mobile ===== */

/* Desktop: keep Bootstrap's flex-row (label above, buttons below per group) */
#grid-main .col-12.d-flex {
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  flex-wrap: nowrap;
  gap: 24px;
}

/* Each group: label on top, buttons below */
#grid-main .cube-select-group {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 8px;
}

/* Remove right-align override on the second group */
#grid-main .cube-select-group.align-items-end {
  align-items: flex-start !important;
}

/* Label sizing */
#grid-main .cube-select-group label.fw-bold {
  white-space: nowrap;
  margin-bottom: 0 !important;
  font-size: 13px;
  color: #334155;
}

/* Mobile: stack the two groups vertically */
@media (max-width: 768px) {
  #grid-main .col-12.d-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px;
  }

  #grid-main .cube-select-group {
    flex-direction: row !important;
    align-items: center !important;
    width: 100%;
    gap: 14px;
  }

  #grid-main .cube-select-group label.fw-bold {
    min-width: 180px;
    font-size: 13px;
  }
}

.edit-quiz-btn {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(38, 208, 206, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s, box-shadow 0.2s;
}

.edit-quiz-btn:hover {
  background: linear-gradient(135deg, #20b2b5 0%, #1a9d9d 100%);
  box-shadow: 0 4px 16px rgba(38, 208, 206, 0.18);
}

/* tictac game style  */

/* TicTacToe Question/Answer Grid - Mobile First */
.TTTGridBox {
  background: #b9eef2;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(38, 208, 206, 0.07);
  padding: 0.7rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  /* height: 100%; */
  justify-content: flex-start;
}

.TTTGridBox .TTTQArow:last-child {
  margin-top: auto;
}

.TTTquesquareboxtitle {
  font-weight: 600;
  font-size: 1rem;
  color: #334155;
  margin-bottom: 4px;
  display: block;
}

.TTTQArow {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 2px;
}

.TTTQandALetter {
  font-weight: bold;
  color: #26d0ce;
  font-size: 1rem;
  min-width: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.TTTQandAContent {
  flex: 1;
  display: flex;
  align-items: center;
}

.TTTQueSquarebox {
  background: #b9eef2;
  /* padding-left: 0.51vw; */
  font-size: 0.95rem;
  line-height: 1.3;
  text-align: left;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  text-overflow: ellipsis;
  border-radius: 8px;
  width: 100%;
  max-height: 2.6em;
}

/* Responsive grid for questions */
@media (min-width: 600px) {
  .TTTGridBox {
    min-height: 140px;
    padding: 1rem;
  }

  .TTTquesquareboxtitle {
    font-size: 1.08rem;
  }

  .TTTQueSquarebox {
    font-size: 1.05rem;
    /* padding-left: 0.7vw; */
  }
}

@media (min-width: 900px) {
  .TTTGridBox {
    /* min-height: 160px; */
    min-height: 8rem;
    padding: 1.2rem;
  }

  .TTTquesquareboxtitle {
    font-size: 1.15rem;
  }

  .TTTQueSquarebox {
    font-size: 1.1rem;
    /* padding-left: 0.8vw; */
  }
}

/* ===== GAME MODE SELECTION POPUP STYLES ===== */

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
  padding-top: 10vh;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-container {
  background: white;
  border-radius: 24px;
  width: 100%;
  max-width: 550px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: slideUp 0.3s ease-out;
  margin: 0 auto;
}

/* Ensure share modal is always centered */
#shareModal {
  /* display: flex !important; */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  transition: opacity 0.2s;
}

#shareModal .modal-container {
  margin: 0 auto !important;
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  border-radius: 18px;
  max-width: 480px;
  width: 100%;
  background: unset;
  display: flex;
  flex-direction: column;
  justify-content: center;

}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  background: unset;
  padding: 32px 32px 24px 32px;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  margin-bottom: 0;
}

.modal-title {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  margin-bottom: 8px;
}

.modal-subtitle {
  text-align: center;
  color: #64748b;
  font-size: 16px;
  font-weight: 400;
}

 

.modal-body {
  padding: 24px 32px 32px 32px;
  max-height: calc(80vh - 140px);
  overflow-y: auto;
  flex: 1;
}

/* Version Toggle */
.version-toggle {
  display: flex;
  background: #f1f5f9;
  border-radius: 16px;
  padding: 6px;
  margin-bottom: 32px;
  position: relative;
}

.version-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: #64748b;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 2;
}

.version-btn.active {
  color: #1e293b;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.old-badge {
  background: #fbbf24;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 600;
}

/* Game Mode Grid */
.game-modes-grid {
  display: grid;
  gap: 20px;
}

.game-mode-card {
  background: white;
  border: 2px solid #26d0ce;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
}

.game-mode-card:hover {
  border-color: #20b2b5;
  box-shadow: 0 8px 25px rgba(38, 208, 206, 0.15);
  transform: translateY(-2px);
}

.game-mode-card.selected {
  border-color: #20b2b5;
  background: #f0fdfa;
}

.mode-header {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.mode-icon {
  width: 64px;
  height: 64px;
  background: #2c8490;
  color: white;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.mode-info {
  flex: 1;
}

.mode-title {
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.mode-description {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 12px;
}

.mode-features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.feature-tag {
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.feature-tag.highlight {
  background: #dbeafe;
  color: #1d4ed8;
}

.mode-actions {
  padding: 0 24px 24px 24px;
  display: none;
}

.game-mode-card.selected .mode-actions {
  display: block;
  animation: expandActions 0.3s ease-out;
}

@keyframes expandActions {
  from {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  to {
    opacity: 1;
    max-height: 200px;
    padding-top: 0;
    padding-bottom: 24px;
  }
}

.action-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* Game Mode Selection Button Styles - Custom classes to avoid Bootstrap conflicts */
.game-mode-btn {
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #26d0ce;
  font-size: 14px;
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.game-mode-btn-primary {
  background: #2c8490;
  color: white;
}

.game-mode-btn-primary:hover {
  background: #20b2b5;
  border-color: #20b2b5;
  transform: translateY(-1px);
}

.game-mode-btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #26d0ce;
}

.game-mode-btn-secondary:hover {
  background: #e2e8f0;
  border-color: #20b2b5;
}

.game-mode-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #26d0ce;
}

.btn-secondary:hover {
  background: #e2e8f0;
  border-color: #20b2b5;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Settings Panel */
.settings-panel {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #26d0ce;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.setting-label {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #26d0ce;
  border-radius: 24px;
  transition: 0.3s;
  border: 1px solid #20b2b5;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked+.toggle-slider {
  background-color: #26d0ce;
  border-color: #26d0ce;
}

input:checked+.toggle-slider:before {
  transform: translateX(24px);
}

input:disabled+.toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Warning Banner */
.warning-banner {
  background: #fef3c7;
  border: 1px solid #26d0ce;
  color: #92400e;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  text-align: center;
  margin-top: 12px;
}

/* Participant Info */
.participant-info {
  background: #f0f9ff;
  border: 1px solid #26d0ce;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.participant-info h4 {
  color: #0c4a6e;
  font-size: 14px;
  margin-bottom: 4px;
}

.participant-info p {
  color: #075985;
  font-size: 13px;
  margin: 0;
}

.participant-url {
  font-weight: 600;
  color: #2c8490;
}

/* Hidden content for different versions */
.version-content {
  display: none;
}

.version-content.active {
  display: block;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .modal-overlay {
    padding-top: 5vh;
    align-items: flex-start;
  }

  .modal-container {
    margin: 16px;
    max-height: 90vh;
    max-width: 95vw;
    width: calc(100% - 32px);
  }

  .modal-header {
    padding: 24px 20px 20px 20px;
  }

  .modal-title {
    font-size: 24px;
  }

  .modal-body {
    padding: 20px;
  }

  .mode-header {
    padding: 20px;
    gap: 16px;
  }

  .mode-icon {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }

  .mode-title {
    font-size: 18px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn {
    min-width: unset;
  }
}

/* Scroll styling */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Additional modal fixes */
.modal-overlay {
  -webkit-overflow-scrolling: touch;
}

.modal-container {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Ensure modal content doesn't exceed viewport */
@media (max-height: 600px) {
  .modal-overlay {
    padding-top: 2vh;
  }

  .modal-container {
    max-height: 96vh;
  }

  .modal-body {
    max-height: calc(96vh - 140px);
  }
}

@media (max-width: 768px) {
  .cube-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
    border-radius: 7px;
    flex-shrink: 0;
  }

  .cube-btn-row {
    gap: 6px;
  }
}

.edit-quiz-btn {
  background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(38, 208, 206, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s, box-shadow 0.2s;
}

.edit-quiz-btn:hover {
  background: linear-gradient(135deg, #20b2b5 0%, #1a9d9d 100%);
  box-shadow: 0 4px 16px rgba(38, 208, 206, 0.18);
}

/* tictac game style  */

/* TicTacToe Question/Answer Grid - Mobile First */
.TTTGridBox {
  background: #b9eef2;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(38, 208, 206, 0.07);
  padding: 0.7rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  /* height: 100%; */
  justify-content: flex-start;
}

.TTTGridBox .TTTQArow:last-child {
  margin-top: auto;
}

.TTTquesquareboxtitle {
  font-weight: 600;
  font-size: 1rem;
  color: #334155;
  margin-bottom: 4px;
  display: block;
}

.TTTQArow {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 2px;
}

.TTTQandALetter {
  font-weight: bold;
  color: #26d0ce;
  font-size: 1rem;
  min-width: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.TTTQandAContent {
  flex: 1;
  display: flex;
  align-items: center;
}

.TTTQueSquarebox {
  background: #b9eef2;
  /* padding-left: 0.51vw; */
  font-size: 0.95rem;
  line-height: 1.3;
  text-align: left;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  text-overflow: ellipsis;
  border-radius: 8px;
  width: 100%;
  max-height: 2.6em;
}

/* Responsive grid for questions */
@media (min-width: 600px) {
  .TTTGridBox {
    min-height: 140px;
    padding: 1rem;
  }

  .TTTquesquareboxtitle {
    font-size: 1.08rem;
  }

  .TTTQueSquarebox {
    font-size: 1.05rem;
    /* padding-left: 0.7vw; */
  }
}

@media (min-width: 900px) {
  .TTTGridBox {
    /* min-height: 160px; */
    min-height: 8rem;
    padding: 1.2rem;
  }

  .TTTquesquareboxtitle {
    font-size: 1.15rem;
  }

  .TTTQueSquarebox {
    font-size: 1.1rem;
    /* padding-left: 0.8vw; */
  }
}



#embedModal .toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

#embedModal .toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

#embedModal .toggle-switch span {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.4s;
  border-radius: 24px;
}

#embedModal .toggle-switch span:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#embedModal .toggle-switch input:checked+span {
  background-color: #26d0ce;
}

#embedModal .toggle-switch input:checked+span:before {
  transform: translateX(26px);
}

#embedModal .toggle-switch input:disabled+span {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Embed Modal Specific Styles */
#embedModal .modal-body {
  background: #474747;
  color: white;
  padding: 0 !important;
}

#embedModal h4 {
  color: #333;
  margin: 0 0 15px 0;
  font-size: 1.1rem;
}
.modal-header h3{
    margin: 0;
  font-size: 1.7rem !important;
  margin:auto !important;
  font-family: "museo-sans-rounded-2" !important;
  font-weight: 600;
  color: #1f2937;
  text-align: center;
  color: white !important;
}

#challengepopup .gamemodalbody , #changechallengedeadline .gamemodalbody {
  padding: 0px !important;
  border-radius: 20px !important;
}

#embedModal textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.9rem;
  background: #f9fafb;
  color: #333;
  resize: vertical;
}

#embedModal button {
  background: #26d0ce;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

#embedModal button:hover {
  background: #20b2b5;
  transform: translateY(-1px);
}

#embedModal .iframe-size-btn {
  background: #26d0ce;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  min-width: 150px;
  transition: all 0.2s ease;
}

#embedModal .iframe-size-btn:hover {
  background: #20b2b5;
  transform: translateY(-1px);
}

/* Mobile responsive for embed modal */
@media (max-width: 768px) {
  #embedModal .modal-container {
    width: 95%;
    max-width: 95%;
  }

  #embedModal .modal-body {
    padding: 20px;
  }

  #embedModal .iframe-size-btn {
    min-width: 120px;
    padding: 10px 16px;
    font-size: 14px;
  }
}

/* ===== EMBED MODAL MOBILE RESPONSIVE STYLES ===== */

/* Base Embed Modal Styles */
#embedModal.modal-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

#embedModal .modal-container {
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
}

#embedModal .modal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 20px 20px 20px !important;
}

/* Mobile Responsive Styles for Embed Modal */
@media (max-width: 768px) {
  #embedModal.modal-overlay {
    padding: 5px;
    align-items: flex-start;
    padding-top: 20px;
  }

  .iframe-wrapper {
    flex-direction: column;
  }

  #embedModal .modal-container {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 95vh !important;
    margin: 0 auto !important;
  }

  #embedModal .modal-header {
    padding: 14px 16px !important;
    border-radius: 12px 12px 0 0 !important;
    margin-bottom: 0 !important;
    position: relative;
  }

  #embedModal .modal-title {
    font-size: 1.15rem !important;
    padding-right: 40px;
  }

  #embedModal .close-btn {
    top: 10px !important;
    right: 10px !important;
    font-size: 22px !important;
    padding: 4px 8px !important;
  }

  #embedModal .modal-body {
    padding: 16px !important;
    background: #474747 !important;
    max-height: calc(95vh - 60px) !important;
  }

  /* Collect Results Section */
  #embedModal .modal-body>div[style*="display: flex"][style*="align-items: center"]:first-child {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
  }

  #embedModal .modal-body>div[style*="display: flex"][style*="align-items: center"]:first-child span {
    font-size: 15px !important;
  }

  /* Required Fields Section - DO NOT force display here; JS controls visibility */
  #requiredFieldsSection {
    margin-bottom: 20px !important;
  }

  #requiredFieldsSection>div[style*="display: flex"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
    margin-bottom: 15px !important;
  }

  #requiredFieldsSection>div[style*="display: flex"]>span {
    width: 100%;
    font-size: 15px !important;
  }

  #requiredFieldsSection>div[style*="display: flex"]>div {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  #requiredFieldsSection>div[style*="display: flex"]>div span {
    font-size: 15px !important;
  }

  #requiredFieldsSection>div>label {
    display: block !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
  }

  #resultsEmailInput {
    width: 100% !important;
    font-size: 14px !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
  }

  /* EMBED and IFRAME Sections - White background boxes */
  #embedModal .modal-body>div[style*="background: white"] {
    padding: 16px !important;
    margin-bottom: 16px !important;
    border-radius: 8px !important;
  }

  #embedModal .modal-body>div[style*="background: white"] h4 {
    font-size: 1rem !important;
    margin: 0 0 12px 0 !important;
  }

  /* Textarea */
  #embedCode,
  #iframeCode {
    width: 100% !important;
    height: 120px !important;
    font-size: 11px !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    white-space: pre-wrap !important;
  }

  /* Buttons Container - Make buttons stack vertically */
  #embedModal .modal-body div[style*="display: flex"][style*="justify-content: flex-end"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: 12px !important;
  }

  #embedModal .modal-body div[style*="display: flex"][style*="justify-content: flex-end"] button {
    width: 100% !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  /* Size Buttons for IFRAME - Stack vertically */
  #embedModal .modal-body>div[style*="background: white"]>div[style*="display: flex"][style*="gap: 15px"][style*="justify-content: center"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
  }

  #embedModal .iframe-size-btn,
  #embedModal button[onclick*="selectIframeSize"] {
    width: 100% !important;
    min-width: 100% !important;
    padding: 14px 20px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    display: block !important;
  }

  #embedModal .iframe-size-btn span,
  #embedModal button[onclick*="selectIframeSize"] span {
    font-size: 12px !important;
    display: block !important;
  }

  /* Toggle Switch Container */
  #embedModal label.toggle-switch {
    position: relative !important;
    display: inline-block !important;
    width: 50px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
  }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
  #embedModal .modal-container {
    width: 98vw !important;
    max-width: 98vw !important;
    max-height: 96vh !important;
  }

  #embedModal .modal-header {
    padding: 12px 14px !important;
  }

  #embedModal .modal-title {
    font-size: 1.05rem !important;
  }

  #embedModal .close-btn {
    font-size: 20px !important;
  }

  #embedModal .modal-body {
    padding: 14px !important;
  }

  #embedModal .modal-body>div[style*="display: flex"] span {
    font-size: 14px !important;
  }

  #embedModal h4 {
    font-size: 0.95rem !important;
  }

  #embedCode,
  #iframeCode {
    height: 100px !important;
    font-size: 10px !important;
    padding: 8px !important;
  }

  #embedModal .modal-body button {
    padding: 11px 14px !important;
    font-size: 13px !important;
  }

  #embedModal .iframe-size-btn,
  #embedModal button[onclick*="selectIframeSize"] {
    padding: 12px 16px !important;
    font-size: 13px !important;
  }

  #embedModal .iframe-size-btn span,
  #embedModal button[onclick*="selectIframeSize"] span {
    font-size: 11px !important;
  }
}

/* Landscape Mobile Orientation */
@media (max-width: 768px) and (orientation: landscape) {
  #embedModal .modal-container {
    max-height: 98vh !important;
  }

  #embedModal .modal-body {
    max-height: calc(98vh - 55px) !important;
  }

  #embedCode,
  #iframeCode {
    height: 90px !important;
  }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
  #embedModal .modal-container {
    width: 85vw !important;
    max-width: 85vw !important;
  }

  #embedModal .modal-body {
    padding: 24px !important;
  }

  #embedCode,
  #iframeCode {
    height: 100px !important;
    font-size: 12px !important;
  }

  #embedModal .iframe-size-btn,
  #embedModal button[onclick*="selectIframeSize"] {
    min-width: 140px !important;
    padding: 11px 20px !important;
  }
}

/* Scrollbar Styling for Embed Modal */
#embedModal .modal-body::-webkit-scrollbar {
  width: 6px;
}

#embedModal .modal-body::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}

#embedModal .modal-body::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

#embedModal .modal-body::-webkit-scrollbar-thumb:hover {
  background: #666;
}

/* Ensure proper spacing on mobile */
@media (max-width: 768px) {
  #embedModal .modal-body>div {
    margin-bottom: 16px !important;
  }

  #embedModal .modal-body>div:last-child {
    margin-bottom: 0 !important;
  }

  /* Fix for label and input alignment */
  #embedModal label:not(.toggle-switch) {
    display: block !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
    color: white !important;
  }

  /* Improve touch targets */
  #embedModal button {
    min-height: 44px !important;
  }

  #embedModal label.toggle-switch {
    min-height: 24px !important;
    min-width: 50px !important;
  }

  /* Prevent horizontal overflow */
  #embedModal * {
    max-width: 100%;
    box-sizing: border-box;
  }

  .toggle-switch {
    width: 56px !important;
    height: 28px !important;
  }

  .toggle-switch:before {
    width: 25px !important;
    height: 22px !important;
    border-radius: 12px !important;
  }
}

/* Fix for buttons with icons */
@media (max-width: 768px) {
  #embedModal button i {
    margin-right: 6px !important;
  }

  #embedModal button[onclick*="copyEmbedCode"],
  #embedModal button[onclick*="updateEmbedSettings"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
  }
}

/* ===
== GAME MODE MODAL STYLES ===== */
.game-mode-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.game-mode-card .mode-actions {
  display: none;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.game-mode-card.active .mode-actions,
.game-mode-card.selected .mode-actions {
  display: block;
  opacity: 1;
  max-height: 1000px;
  overflow: visible;
}

.game-mode-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.game-mode-card.active,
.game-mode-card.selected {
  border-color: #26d0ce;
  box-shadow: 0 4px 16px rgba(38, 208, 206, 0.2);
}

/* ===== IPAD & TABLET RESPONSIVE FIXES FOR MAIN CONTAINER & QUIZ DETAILS ===== */

/* iPad Portrait Mode (768px - 1024px) */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {

  /* Main Container Adjustments */
  .MainContainerGamePreview {
    margin: 0.5rem !important;
    padding: 0 !important;
  }

  /* Quiz Header Content - Make it flexible */
  .quiz-header-content {
    display: flex !important;
    flex-direction: row !important;
    gap: 0 !important;
    align-items: stretch !important;
    min-height: auto !important;
  }

  /* Thumbnail Section - Reduce fixed width */
  .thumbnail-section {
    flex: 0 0 280px !important;
    max-width: 280px !important;
  }

  .quiz-thumbnail-large {
    flex: 0 0 280px !important;
    max-width: 280px !important;
    height: auto !important;
    min-height: 200px !important;
    border-radius: 16px 0 0 16px !important;
  }

  /* Quiz Details Content - Make it flexible */
  .quiz-details-content {
    flex: 1 !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 200px !important;
    padding: 16px 20px !important;
    overflow: hidden !important;
  }

  /* Title and Description Layout */
  .title-description-categories-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  .title-description-section {
    flex: 1 !important;
    min-width: 0 !important;
  }

  /* Categories Tags Sidebar - Stack on iPad Portrait */
  .categories-tags-sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-top: 12px !important;
  }

  /* Quiz Title - Reduce size */
  .quiz-title-main {
    font-size: 24px !important;
    line-height: 1.2 !important;
    margin-bottom: 12px !important;
  }

  /* Quiz Description */
  .quiz-description-main {
    font-size: 14px !important;
    margin-bottom: 16px !important;
  }

  /* Sample Questions */
  .sample-questions {
    margin: 12px 0 !important;
    padding: 12px 16px !important;
  }

  /* Quiz Settings Row - Wrap properly */
  .quiz-settings-row {
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: flex-start !important;
  }

  .settings-item {
    flex-shrink: 0 !important;
    font-size: 12px !important;
  }

  /* Action Buttons Section */
  .action-buttons-section {
    padding: 16px 20px !important;
  }

  .play-btn-large-external {
    min-width: 200px !important;
    height: 56px !important;
    font-size: 16px !important;
    padding: 16px 32px !important;
  }
}

/* iPad Landscape Mode (768px - 1366px) */
@media only screen and (min-width: 768px) and (max-width: 1366px) and (orientation: landscape) {

  /* Main Container Adjustments */
  .MainContainerGamePreview {
    margin: 0.5rem !important;
    padding: 0 !important;
  }

  /* Quiz Header Content - COLUMN STACK for landscape */
  .quiz-header-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    align-items: stretch !important;
    min-height: auto !important;
    max-height: none !important;
  }

  /* Thumbnail Section - Full width on top */
  .thumbnail-section {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .quiz-thumbnail-large {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 200px !important;
    max-height: 280px !important;
    border-radius: 16px 16px 0 0 !important;
  }

  /* Quiz Details Content - Full width below image */
  .quiz-details-content {
    flex: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: 20px 24px !important;
    overflow: visible !important;
    border-radius: 0 0 16px 16px !important;
  }

  /* Title and Description Layout - Stack vertically */
  .title-description-categories-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  .title-description-section {
    flex: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Categories Tags Sidebar - Full width at bottom */
  .categories-tags-sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-top: 0 !important;
  }

  /* Quiz Title */
  .quiz-title-main {
    font-size: 26px !important;
    line-height: 1.2 !important;
    margin-bottom: 12px !important;
  }

  /* Quiz Description */
  .quiz-description-main {
    font-size: 15px !important;
    margin-bottom: 16px !important;
  }

  /* Sample Questions */
  .sample-questions {
    margin: 14px 0 !important;
    padding: 14px 18px !important;
  }

  /* Quiz Settings Row */
  .quiz-settings-row {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .settings-item {
    font-size: 12px !important;
  }

  /* Action Buttons Section */
  .action-buttons-section {
    padding: 18px 24px !important;
  }

  .play-btn-large-external {
    min-width: 220px !important;
    height: 58px !important;
    font-size: 17px !important;
  }
}

/* Medium Tablets (768px - 991px) - Additional responsive fixes */
@media only screen and (min-width: 768px) and (max-width: 991px) {
  .quiz-header-content {
    flex-direction: column !important;
  }

  .thumbnail-section,
  .quiz-thumbnail-large {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
  }

  .quiz-details-content {
    flex: 1 !important;
    width: 100% !important;
    border-radius: 0 0 16px 16px !important;
  }

  .title-description-categories-row {
    flex-direction: column !important;
  }

  .categories-tags-sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* Mobile Devices (max-width: 767px) - Complete stack */
@media only screen and (max-width: 767px) {

  /* Main Container - Reduce margins */
  .MainContainerGamePreview {
    margin: 0.25rem !important;
    padding: 0 !important;
  }

  /* Quiz Header Content - Full vertical stack */
  .quiz-header-content {
    flex-direction: column !important;
    min-height: auto !important;
    gap: 0 !important;
  }

  /* Thumbnail Section - Full width */
  .thumbnail-section,
  .quiz-thumbnail-large {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 200px !important;
    max-height: 250px !important;
    border-radius: 16px 16px 0 0 !important;
  }

  .quiz-thumbnail-large img {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
  }

  /* Quiz Details Content - Full width with proper padding */
  .quiz-details-content {
    flex: 1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    padding: 20px 16px !important;
    border-radius: 0 0 16px 16px !important;
    overflow: visible !important;
  }

  /* Title and Description Layout - Stack vertically */
  .title-description-categories-row {
    flex-direction: column !important;
    gap: 16px !important;
    align-items: stretch !important;
  }

  .title-description-section {
    width: 100% !important;
    flex: 1 !important;
  }

  /* Categories Tags Sidebar - Full width */
  .categories-tags-sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 16px !important;
    margin-top: 0 !important;
  }

  /* Quiz Title - Optimize for mobile */
  .quiz-title-main {
    font-size: 24px !important;
    line-height: 1.3 !important;
    margin-bottom: 12px !important;
    word-wrap: break-word !important;
  }

  /* Quiz Description */
  .quiz-description-main {
    font-size: 15px !important;
    line-height: 1.5 !important;
    margin-bottom: 16px !important;
  }

  /* Sample Questions - Better mobile spacing */
  .sample-questions {
    margin: 16px 0 !important;
    padding: 14px 12px !important;
  }

  .question-list-preview li {
    font-size: 14px !important;
    margin-bottom: 10px !important;
    line-height: 1.5 !important;
  }

  /* Quiz Settings Row - Compact wrap on mobile */
  .quiz-settings-row {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 30px !important;
    align-items: center !important;
    padding: 10px 12px !important;
    background: #f8fafb !important;
    border-radius: 10px !important;
  }

  .settings-item {
    width: auto !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 0 !important;
    border-bottom: none !important;
  }

  /* Hide Public/Downloadable toggles on mobile */
  .settings-item:has(.visibility-toggle) {
    display: none !important;
  }

  .settings-item label {
    font-size: 12px !important;
  }

  .user-info-compact {
    display: flex !important;
    width: 100% !important;
  }

  /* User Info Section */
  .user-info-compact {
    width: 100% !important;
    margin: 0 !important;
  }

  /* Action Buttons Section */
  .action-buttons-section {
    padding: 16px 12px !important;
    flex-direction: column !important;
  }

  /* Mobile Top Row */
  .mobile-top-row {
    display: flex !important;
    gap: 12px !important;
    width: 100% !important;
    flex-direction: row !important;
    align-items: center !important;
  }

  /* Play Button - Full width on mobile */
  .play-btn-large-external {
    flex: 1 !important;
    width: auto !important;
    min-width: auto !important;
    height: 56px !important;
    font-size: 18px !important;
    padding: 0 20px !important;
    white-space: nowrap !important;
  }

  /* Mobile Menu Button */
  .mobile-menu-btn {
    display: flex !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 16px !important;
    background: white !important;
    border: 2px solid #e2e8f0 !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    font-size: 20px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
  }

  /* .mobile-menu-btn.active {
    background: #26d0ce !important;
    color: white !important;
    border-color: #26d0ce !important;
  } */

  /* Desktop Action Buttons - Hide on mobile */
  .compact-action-buttons {
    display: none !important;
  }

  /* Sidebar Adjustments */
  .sidebar-tags {
    max-height: 100px !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: #c1c7d0 transparent !important;
  }

  .sidebar-tag {
    font-size: 12px !important;
    padding: 6px 10px !important;
  }

  .sidebar-meta-label,
  .sidebar-meta-value {
    font-size: 13px !important;
  }
}

/* Extra Small Mobile Devices (max-width: 480px) */
@media only screen and (max-width: 480px) {
  .MainContainerGamePreview {
    margin: 0.125rem !important;
  }

  .quiz-details-content {
    padding: 16px 12px !important;
  }

  .quiz-title-main {
    font-size: 20px !important;
    margin-bottom: 10px !important;
  }

  .quiz-description-main {
    font-size: 14px !important;
    line-height: 1.4 !important;
  }

  .sample-questions {
    padding: 12px 10px !important;
    margin: 12px 0 !important;
  }

  .question-list-preview li {
    font-size: 13px !important;
    margin-bottom: 8px !important;
  }

  .quiz-settings-row {
    gap: 15px !important;
    padding: 8px 10px !important;
  }

  .settings-item {
    padding: 0 !important;
    font-size: 11px !important;
  }

  .settings-item label {
    font-size: 10px !important;
  }

  .settings-item label,
  .settings-item span {
    font-size: 13px !important;
  }

  .play-btn-large-external {
    height: 52px !important;
    font-size: 16px !important;
    padding: 0 16px !important;
  }

  .mobile-menu-btn {
    width: 52px !important;
    height: 52px !important;
    font-size: 18px !important;
  }

  .categories-tags-sidebar {
    padding: 12px !important;
  }

  .sidebar-title {
    font-size: 13px !important;
  }

  .sidebar-tag {
    font-size: 11px !important;
    padding: 5px 8px !important;
  }

  .thumbnail-section,
  .quiz-thumbnail-large {
    min-height: 180px !important;
    max-height: 220px !important;
  }
}

/* Mobile Landscape Orientation (height < 500px) */
@media only screen and (max-height: 500px) and (orientation: landscape) {

  /* Force column stack on landscape */
  .quiz-header-content {
    flex-direction: column !important;
    min-height: auto !important;
  }

  /* Thumbnail - Full width at top */
  .thumbnail-section,
  .quiz-thumbnail-large {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 150px !important;
    max-height: 180px !important;
    border-radius: 16px 16px 0 0 !important;
  }

  /* Quiz Details - Full width below */
  .quiz-details-content {
    width: 100% !important;
    padding: 12px 16px !important;
    border-radius: 0 0 16px 16px !important;
  }

  /* Stack title/description and sidebar */
  .title-description-categories-row {
    flex-direction: column !important;
  }

  .categories-tags-sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .quiz-title-main {
    font-size: 18px !important;
    margin-bottom: 8px !important;
  }

  .quiz-description-main {
    font-size: 13px !important;
    margin-bottom: 10px !important;
    -webkit-line-clamp: 2 !important;
  }

  .sample-questions {
    margin: 10px 0 !important;
    padding: 10px !important;
  }

  .play-btn-large-external {
    height: 48px !important;
    font-size: 15px !important;
  }

  .mobile-menu-btn {
    width: 48px !important;
    height: 48px !important;
  }
}

/* Universal Landscape Orientation Fix - All devices */
@media only screen and (orientation: landscape) and (max-width: 1366px) {
  .quiz-header-content {
    flex-direction: column !important;
  }

  .thumbnail-section,
  .quiz-thumbnail-large {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
  }

  .quiz-details-content {
    width: 100% !important;
    border-radius: 0 0 16px 16px !important;
  }

  .title-description-categories-row {
    flex-direction: column !important;
  }

  .categories-tags-sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Bootstrap-inspired utility classes for flexible layouts */
.container-fluid {
  width: 100% !important;
  padding-right: 15px !important;
  padding-left: 15px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

.row {
  display: flex !important;
  flex-wrap: wrap !important;
  margin-right: -15px !important;
  margin-left: -15px !important;
}

/* Prevent image overflow and maintain aspect ratio */
.quiz-thumbnail-large img,
.thumbnail-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Ensure quiz logo overlay doesn't break layout */
.quiz-logo-overlay {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  max-width: 90% !important;
  max-height: 90% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.quiz-logo {
  max-width: 100% !important;
  max-height: 100% !important;
  height: auto !important;
  width: auto !important;
  object-fit: contain !important;
}

/* @media (max-width: 1024px) and (orientation: landscape) {
  .toggle-switch {
    width: 50px !important;
    height: 24px !important;
  }

  .toggle-switch:before {
    width: 3vw !important;
    height: 5vh !important;
    border-radius: 12px !important;
  }
} */

/* ===== IPAD SPECIFIC CSS RULES ===== */

/* iPad Mini Portrait (768 x 1024) */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {

  /* Main Container */
  .MainContainerGamePreview {
    margin: 0.5rem !important;
    padding: 0 !important;
  }

  /* Column Stack Layout */
  .quiz-header-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  /* Thumbnail - Full width at top */
  .thumbnail-section,
  .quiz-thumbnail-large {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 220px !important;
    max-height: 280px !important;
    border-radius: 16px 16px 0 0 !important;
  }

  /* Quiz Details Content */
  .quiz-details-content {
    flex: 1 !important;
    width: 100% !important;
    padding: 20px 24px !important;
    border-radius: 0 0 16px 16px !important;
  }

  /* Stack title and categories */
  .title-description-categories-row {
    flex-direction: column !important;
    gap: 16px !important;
  }

  .categories-tags-sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Typography */
  .quiz-title-main {
    font-size: 26px !important;
    line-height: 1.2 !important;
  }

  .quiz-description-main {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }

  /* Buttons */
  .play-btn-large-external {
    min-width: 240px !important;
    height: 60px !important;
    font-size: 18px !important;
  }

  /* Toggle switches */
  .toggle-switch {
    width: 52px !important;
    height: 26px !important;
  }

  .toggle-switch:before {
    width: 22px !important;
    height: 22px !important;
  }
}

/* iPad Mini Landscape (1024 x 768) */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {

  /* Column Stack for Landscape */
  .quiz-header-content {
    flex-direction: column !important;
  }

  .thumbnail-section,
  .quiz-thumbnail-large {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 200px !important;
    max-height: 250px !important;
    border-radius: 16px 16px 0 0 !important;
  }

  .quiz-details-content {
    width: 100% !important;
    padding: 18px 28px !important;
    border-radius: 0 0 16px 16px !important;
  }

  .title-description-categories-row {
    flex-direction: column !important;
  }

  .categories-tags-sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .quiz-title-main {
    font-size: 24px !important;
  }

  .quiz-description-main {
    font-size: 15px !important;
  }
}

/* iPad Air Portrait (820 x 1180) */
@media only screen and (min-device-width: 820px) and (max-device-width: 1180px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {

  .MainContainerGamePreview {
    margin: 0.5rem !important;
    padding: 0 !important;
    max-width: 65vw;
  }

  /* Column Stack */
  .quiz-header-content {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .thumbnail-section,
  .quiz-thumbnail-large {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 240px !important;
    max-height: 300px !important;
    border-radius: 16px 16px 0 0 !important;
  }

  .quiz-details-content {
    width: 100% !important;
    padding: 22px 28px !important;
    border-radius: 0 0 16px 16px !important;
  }

  .title-description-categories-row {
    flex-direction: column !important;
    gap: 18px !important;
  }

  .categories-tags-sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 18px !important;
  }

  .quiz-title-main {
    font-size: 28px !important;
    line-height: 1.2 !important;
  }

  .quiz-description-main {
    font-size: 17px !important;
    line-height: 1.5 !important;
  }

  .play-btn-large-external {
    min-width: 260px !important;
    height: 62px !important;
    font-size: 19px !important;
  }
}

/* iPad Air Landscape (1180 x 820) */
@media only screen and (min-device-width: 820px) and (max-device-width: 1180px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {

  /* Column Stack for Landscape */
  .quiz-header-content {
    flex-direction: column !important;
  }

  .thumbnail-section,
  .quiz-thumbnail-large {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 220px !important;
    max-height: 280px !important;
    border-radius: 16px 16px 0 0 !important;
  }

  .quiz-details-content {
    width: 100% !important;
    padding: 20px 32px !important;
    border-radius: 0 0 16px 16px !important;
  }

  .title-description-categories-row {
    flex-direction: column !important;
  }

  .categories-tags-sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .quiz-title-main {
    font-size: 26px !important;
    max-width: 80%;
  }

  .quiz-description-main {
    font-size: 16px !important;
  }
}

/* iPad Pro Portrait (1024 x 1366) */
@media only screen and (min-device-width: 1024px) and (max-device-width: 1366px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {

  .MainContainerGamePreview {
    margin: 0.75rem !important;
    padding: 0 !important;
  }

  /* Column Stack */
  .quiz-header-content {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .thumbnail-section,
  .quiz-thumbnail-large {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 280px !important;
    max-height: 350px !important;
    border-radius: 16px 16px 0 0 !important;
  }

  .quiz-details-content {
    width: 100% !important;
    padding: 24px 32px !important;
    border-radius: 0 0 16px 16px !important;
  }

  .title-description-categories-row {
    flex-direction: column !important;
    gap: 20px !important;
  }

  .categories-tags-sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 20px !important;
  }

  .quiz-title-main {
    font-size: 32px !important;
    line-height: 1.2 !important;
  }

  .quiz-description-main {
    font-size: 18px !important;
    line-height: 1.5 !important;
  }

  .play-btn-large-external {
    min-width: 280px !important;
    height: 64px !important;
    font-size: 20px !important;
  }

  .sidebar-title {
    font-size: 16px !important;
  }

  .sidebar-tag {
    font-size: 13px !important;
    padding: 7px 12px !important;
  }
}

/* iPad Pro Landscape (1366 x 1024) */
@media only screen and (min-device-width: 1024px) and (max-device-width: 1366px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {

  /* Column Stack for Landscape */
  .quiz-header-content {
    flex-direction: column !important;
  }

  .thumbnail-section,
  .quiz-thumbnail-large {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 250px !important;
    max-height: 320px !important;
    border-radius: 16px 16px 0 0 !important;
  }

  .quiz-details-content {
    width: 100% !important;
    padding: 22px 36px !important;
    border-radius: 0 0 16px 16px !important;
  }

  .title-description-categories-row {
    flex-direction: column !important;
    gap: 18px !important;
  }

  .categories-tags-sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .quiz-title-main {
    font-size: 28px !important;
  }

  .quiz-description-main {
    font-size: 17px !important;
  }

  .play-btn-large-external {
    height: 62px !important;
  }
}

/* Common iPad Optimizations (All Models) */
@media only screen and (min-device-width: 768px) and (max-device-width: 1366px) and (-webkit-min-device-pixel-ratio: 2) {

  /* Ensure smooth scrolling */
  html {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  /* Optimize tap targets */
  button,
  .mobile-menu-btn,
  .sidebar-edit-btn {
           min-height: 36px !important;
        min-width: 36px !important;
  }

  /* Sample questions spacing */
  .sample-questions {
    margin: 16px 0 !important;
    padding: 16px 18px !important;
  }

  .question-list-preview li {
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin-bottom: 10px !important;
  }

  /* Settings items */
  .settings-item {
    padding: 10px 0 !important;
    font-size: 14px !important;
  }

  /* Ensure images don't overflow */
  .quiz-thumbnail-large img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  /* Action buttons optimization */
  .action-buttons-section {
    padding: 20px 24px !important;
  }

  /* Mobile action menu for iPads */
  .mobile-action-menu {
    max-width: 400px !important;
  }
}

.quiz-type-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 16px !important;
}

.quiz-type-icon {
  height: 20px;
  width: auto;
  object-fit: contain;
}

/* Adjust for mobile */
@media (max-width: 768px) {
  .quiz-type-icon {
    height: 18px;
  }

  .quiz-type-badge {
    font-size: 14px !important;
  }
}

/* ============================================================================
   QUESTION CARD & ANSWER OPTIONS - TEXT OVERFLOW FIX
   Fixes text overflow issues on all mobile devices (iPhone, iPad, etc.)
   ============================================================================ */

/* Base styles for all devices */
.question-card {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.question-header,
.question-content,
.question-text {
  width: 100% !important;
  max-width: 100% !important;
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
  hyphens: auto !important;
  box-sizing: border-box !important;
}

.answer-options {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.answer-option {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: flex-start !important;
}

.answer-letter {
  flex-shrink: 0 !important;
  min-width: 30px !important;
  max-width: 30px !important;
}

.answer-text {
  flex: 1 !important;
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
  hyphens: auto !important;
  max-width: calc(100% - 40px) !important;
  box-sizing: border-box !important;
  align-self: anchor-center;
}

/* Mobile devices (iPhone, Android phones) - Portrait */
@media only screen and (max-width: 767px) {
  .question-card {
    padding: 12px !important;
    margin: 8px 0 !important;
  }

  .question-text {
    font-size: 14px !important;
    line-height: 1.5 !important;
    padding-right: 8px !important;
  }

  .answer-option {
    padding: 10px 8px !important;
    margin: 6px 0 !important;
  }

  .answer-text {
    font-size: 13px !important;
    line-height: 1.4 !important;
  }

  .answer-letter {
    font-size: 14px !important;
    margin-right: 8px !important;
  }
}

/* iPhone 12 Pro and similar devices - Portrait */
@media only screen and (min-device-width: 390px) and (max-device-width: 844px) and (orientation: portrait) {

  .question-card,
  .answer-options {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .question-text,
  .answer-text {
    max-width: 100% !important;
    white-space: normal !important;
  }
}

/* iPhone 12 Pro and similar devices - Landscape */
@media only screen and (min-device-width: 390px) and (max-device-width: 844px) and (orientation: landscape) {
  .question-card {
    padding: 10px !important;
  }

  .question-text {
    font-size: 13px !important;
  }

  .answer-text {
    font-size: 12px !important;
  }
}

/* iPad Mini/Air - Portrait */
@media only screen and (min-device-width: 768px) and (max-device-width: 820px) and (orientation: portrait) {
  .question-card {
    padding: 16px !important;
    max-width: 100% !important;
  }

  .question-text {
    font-size: 16px !important;
    line-height: 1.6 !important;
  }

  .answer-option {
    padding: 12px !important;
  }

  .answer-text {
    font-size: 15px !important;
    line-height: 1.5 !important;
  }
}

/* iPad Mini/Air - Landscape */
@media only screen and (min-device-width: 768px) and (max-device-width: 820px) and (orientation: landscape) {
  .question-card {
    padding: 14px !important;
  }

  .question-text {
    font-size: 15px !important;
  }

  .answer-text {
    font-size: 14px !important;
  }
}

/* iPad Pro - Portrait */
@media only screen and (min-device-width: 1024px) and (max-device-width: 1366px) and (orientation: portrait) {
  .question-card {
    padding: 20px !important;
    max-width: 100% !important;
  }

  .question-text {
    font-size: 18px !important;
    line-height: 1.6 !important;
  }

  .answer-option {
    padding: 14px !important;
  }

  .answer-text {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }
}

/* iPad Pro - Landscape */
@media only screen and (min-device-width: 1024px) and (max-device-width: 1366px) and (orientation: landscape) {
  .question-card {
    padding: 18px !important;
  }

  .question-text {
    font-size: 17px !important;
  }

  .answer-text {
    font-size: 15px !important;
  }
}

/* Universal mobile fix - catch all */
@media only screen and (max-width: 1366px) {

  .question-card *,
  .answer-option * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Prevent horizontal scroll */
  .question-card,
  .answer-options,
  .question-content,
  .answer-option {
    overflow-x: hidden !important;
  }

  /* Force text wrapping */
  .question-text,
  .answer-text,
  .question-content div,
  .answer-option div {
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
  }
}

/* ============================================================================
   MOBILE UI IMPROVEMENTS - Question Alignment & Badge Shapes
   ============================================================================ */

/* Question header alignment - number and text side by side */
.question-header {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  width: 100% !important;
}

.question-number {
  flex-shrink: 0 !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  background: #26D0CE !important;
  color: white !important;
}

.question-content {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  align-self: anchor-center;
}

/* Answer letter badges - perfectly circular */
.answer-letter {
  flex-shrink: 0 !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  background: #26D0CE !important;
  color: white !important;
  font-size: 16px !important;
}

/* Mobile specific adjustments */
@media only screen and (max-width: 767px) {
  .question-number {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    font-size: 16px !important;
  }

  .answer-letter {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    font-size: 14px !important;
  }

  .question-header {
    gap: 10px !important;
    flex-direction: row !important;
  }

  .answer-option {
    gap: 0px !important;
  }
}

/* iPad adjustments */
@media only screen and (min-width: 768px) and (max-width: 1366px) {
  .question-number {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 18px !important;
  }

  .answer-letter {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    font-size: 16px !important;
  }

  .question-header {
    gap: 14px !important;
  }

  .answer-option {
    gap: 12px !important;
  }
}

/* ============================================================================
   ASSIGNMENT SECTION - MOBILE RESPONSIVE FIX
   Fixes overflow and layout issues on mobile devices (portrait & landscape)
   ============================================================================ */

/* Base assignment section styles */
.assignment-section {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

.assignment-details {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

.assignment-row {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

/* Mobile devices - Portrait and Landscape */
@media only screen and (max-width: 767px) {
  .assignment-section .card-content {
    padding: 15px 10px !important;
  }

  /* Header section with button */
  .assignment-section .card-content>div:first-child {
    flex-direction: column !important;
    gap: 15px !important;
    align-items: flex-start !important;
  }

  .assignment-section .action-btn.primary {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Assignment row - stack vertically */
  .assignment-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 12px !important;
  }

  .assignment-link-section {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .assignment-link-section label {
    width: 100% !important;
  }

  .assignment-link-section input.assignment-link {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    font-size: 12px !important;
  }

  .assignment-expire {
    margin: 0 !important;
    width: 100% !important;
  }

  .assignment-actions {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  /* Results section */
  .results-section {
    padding: 12px !important;
    margin-bottom: 15px !important;
  }

  .results-section>div:first-child {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: flex-start !important;
  }

  .results-section button {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Results table - make scrollable */
  .results-table {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .results-table table {
    min-width: 600px !important;
    font-size: 12px !important;
  }

  .results-table th,
  .results-table td {
    padding: 8px !important;
    white-space: nowrap !important;
  }

  /* Old table structure (div-based) */
  .results-table .table-header,
  .results-table .table-row {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 8px !important;
    min-width: 600px !important;
    font-size: 12px !important;
  }

  .results-table .table-header span,
  .results-table .table-row span {
    padding: 8px 4px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Additional portrait mode fixes */
  .assignment-section {
    padding: 0 !important;
  }

  .assignment-section .quiz-card {
    margin: 0.5rem 0.25rem !important;
  }

  .assignment-section .card-content {
    padding: 10px 8px !important;
  }

  .assignment-section .invite-text {
    font-size: 14px !important;
    text-align: left !important;
  }

  .assignment-section .action-btn,
  .assignment-section button.action-btn,
  .assignment-section .action-btn.primary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 15px !important;
    font-size: 14px !important;
  }

  .assignment-row {
    padding: 10px 8px !important;
    margin-bottom: 10px !important;
  }

  .assignment-link-section input.assignment-link {
    font-size: 11px !important;
    padding: 6px 8px !important;
  }

  .assignment-expire {
    text-align: left !important;
  }

  .assignment-actions {
    justify-content: flex-start !important;
    gap: 6px !important;
  }

  .results-section {
    padding: 10px 8px !important;
  }

  .results-section h4 {
    font-size: 16px !important;
  }

  .results-section button {
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: 13px !important;
  }

  .results-table {
    margin: 0 -8px !important;
    padding: 0 8px !important;
  }

  .results-table table {
    min-width: 550px !important;
    font-size: 11px !important;
  }

  .results-table th,
  .results-table td {
    padding: 6px 4px !important;
    font-size: 11px !important;
  }
}

/* iPad and tablets - Portrait */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .assignment-row {
    flex-wrap: wrap !important;
    gap: 12px !important;
  }

  .assignment-link-section {
    flex: 1 1 100% !important;
    max-width: 100% !important;
  }

  .assignment-link-section input.assignment-link {
    max-width: calc(100% - 150px) !important;
  }

  .assignment-expire {
    flex: 1 1 auto !important;
  }

  .assignment-actions {
    flex: 1 1 auto !important;
  }

  .results-table table {
    font-size: 13px !important;
  }
}

/* iPad and tablets - Landscape */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .assignment-link-section input.assignment-link {
    max-width: calc(100% - 180px) !important;
  }

  .results-table table {
    font-size: 14px !important;
  }
}

/* Universal mobile fix for assignment section */
@media only screen and (max-width: 1024px) {

  .assignment-section *,
  .assignment-row *,
  .results-section * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Prevent horizontal scroll */
  .assignment-section,
  .assignment-details,
  .assignment-row,
  .results-section {
    overflow-x: hidden !important;
  }

  /* Force text wrapping */
  .assignment-link-section label,
  .assignment-expire span {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
}

@media (min-width: 320px) and (max-width: 780px) {
  #AddGameToPlaylistpopup .modal-dialog {
    margin: auto;
    width: 99% !important;
    position: relative;
    margin: auto;
  }

  .addgamecollectionpopup .modal-container {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    border: solid 1px lightcyan;
    background-color: #eee;
    overflow-y: scroll;
    margin: 0;
  }
}

/* ============================================================================
   DISABLE HOVER EFFECTS ON TOUCH DEVICES
   Prevents unwanted hover states when tapping on mobile/tablet
   ============================================================================ */

/* Disable hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {

  .compact-action-btn.secondary:hover,
  .compact-action-btn:hover,
  button.secondary:hover,
  .action-btn.secondary:hover {
    background: inherit !important;
    color: inherit !important;
    border-color: inherit !important;
    box-shadow: none !important;
    transform: none !important;
  }
}

/* Alternative: Disable hover on mobile screen sizes */
@media only screen and (max-width: 1024px) {

  .compact-action-btn.secondary:hover,
  .compact-action-btn:hover {

    box-shadow: none !important;
    transform: none !important;
    width: -webkit-fill-available !important;
    background: linear-gradient(135deg, #26d0ce 0%, #20b2b5 100%) !important;
    color: white !important;
    box-shadow: 0 2px 6px rgba(38, 208, 206, 0.25) !important;
    justify-content: center !important;
  }

   /* Landscape mobile: use mobile grid card styles */
    .grid-game-card {
      min-height: 80px !important;
      padding: 12px !important;
      margin-bottom: 12px !important;
      width: 100% !important;
      background: #e0f7fa !important;
      border: 2px solid #26d0ce !important;
      border-radius: 12px !important;
      display: block !important;
      cursor: pointer !important;
    }
  .grid-game-card .fw-bold {
    font-size: 14px;
    -webkit-line-clamp: 2;
    margin-bottom: 8px;
  }
  .grid-game-card>div:nth-child(2) {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }
  .grid-media-icons i {
    font-size: 16px !important;
    margin-left: 6px !important;
  }
  .mobile-category-section {
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  .mobile-category-header {
    background: #e0f7fa;
    color: #334155;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
  }
  .mobile-category-content {
    background: #f8fafc;
    padding: 12px;
  }
  .mobile-question-item {
    background: #e0f7fa;
    border: 2px solid #26d0ce;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
  }
  .mobile-question-item:hover {
    border-color: #26d0ce;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(38, 208, 206, 0.15);
  }
  .mobile-question-item:last-child {
    margin-bottom: 0;
  }
}

/* ============================================================================
   TOGGLE SWITCH STYLES
   ============================================================================ */

/* Toggle switch container */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

/* Hide default checkbox */
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider (background) */
.toggle-switch input+span {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1 !important;
  /* Gray when OFF */
  transition: .4s;
  border-radius: 24px;
}

/* The slider handle (circle) */
.toggle-switch input+span:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

/* When checked - change background to teal */
.toggle-switch input:checked+span {
  background-color: #26d0ce !important;
  /* Teal when ON */
}

/* When checked - slide the handle to the right */
.toggle-switch input:checked+span:before {
  transform: translateX(26px);
}

/* Focus state for accessibility */
.toggle-switch input:focus+span {
  box-shadow: 0 0 1px #26d0ce;
}
 