/* ========================================
   HIVEMIND - UI ELEMENTS STYLES
   ======================================== */

/* === HIVEMIND ICON & TOP RIGHT UI === */

/* New Wrapper for Top-Right UI Elements */
#top-right-ui-cluster {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 120px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

/* HiveMind Icon (Simplified) */
#hivemind-icon {
  width: 100px;
  height: auto;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease-in-out;
}

#hivemind-icon:hover {
  transform: scale(1.05);
}

/* ✅ V2.2.3: HiveMind icon container with text */
#hivemind-icon-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
}

#hivemind-icon-container:hover {
  transform: scale(1.05);
}

#hivemind-icon-container:hover #hivemind-icon {
  transform: scale(1.05);
}

#hivemind-icon-container:hover #hivemind-icon-text {
  color: #007bff;
  font-weight: 700;
}

#hivemind-icon-text {
  margin-top: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #333;
  text-align: center;
  transition: color 0.2s ease-in-out, font-weight 0.2s ease-in-out;
  user-select: none;
  pointer-events: none; /* Text is not separately clickable, container handles clicks */
}

/* Wrapper for HiveMind icon to provide positioning context for pulse indicator */
.hivemind-icon-wrapper {
  position: relative;
  display: inline-block;
}

/* Pulsing red circle indicator for HiveMind icon when data needs saving */
#hivemind-icon-pulse-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #f44336;
  pointer-events: none;
  z-index: -1;
  animation: pulse-ring 2s ease-in-out infinite;
  display: none;
}

@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0.4;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.8;
  }
}

/* === DAILY GOAL TIMER === */

/* Daily Goal Timer Styles */
#daily-goal-timer-container {
  position: absolute;
  top: 130px;
  right: 30px;
  width: 120px;
  height: auto;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding-bottom: 12px;
  transition: opacity 0.3s ease-in-out;
}

#daily-goal-timer-circle-visual {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#daily-goal-timer-container.hidden {
  opacity: 0;
  pointer-events: none;
}

#daily-goal-timer-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

#daily-goal-timer-svg .timer-background {
  fill: none;
  stroke: #e0e0e0;
  stroke-width: 8;
}

#daily-goal-timer-svg .timer-arc {
  fill: none;
  stroke: var(--success-color, #27AE60);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s linear, stroke 0.5s;
}

#daily-goal-timer-text {
  font-size: 1.1rem;
  font-weight: bold;
  color: #000000;
  text-shadow: none;
  display: block;
}

#daily-goal-timer-pause-icon {
  font-size: 1.5rem;
  color: var(--accent-color);
  opacity: 0.8;
  display: none;
}

#daily-goal-timer-paused-text {
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-top: 2px;
  display: none;
}

#daily-goal-timer-caption {
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--light-text-color);
  text-align: center;
}

/* Paused State */
#daily-goal-timer-container.paused #daily-goal-timer-svg .timer-arc {
  stroke: var(--light-text-color, #7F8C8D);
}

#daily-goal-timer-container.paused #daily-goal-timer-text {
  display: none;
}

#daily-goal-timer-container.paused #daily-goal-timer-pause-icon,
#daily-goal-timer-container.paused #daily-goal-timer-paused-text {
  display: block;
}

/* === STREAK WHEEL === */

/* Styles for the Streak Flower Box */
#menu-page .page-container #streak-wheel-main-container {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1000;
  width: 220px;
  min-height: 220px;
  background-color: #fff;
  border: 2px solid var(--border-color, #BDC3C7);
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  padding: 12px 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  text-align: center;
}

/* Styles for the SVG flower itself */
#streak-wheel-main-container #streak-wheel-svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Styles for the caption below the flower */
#streak-wheel-main-container #streak-wheel-caption {
  margin-top: 6px;
  margin-bottom: 14px;
  font-size: 0.92rem;
  font-weight: bold;
  color: #ffb93e;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.7);
  line-height: 1.2;
}

#streak-wheel-main-container #streak-wheel-caption strong {
  color: #1f2a36;
  text-shadow: none;
  font-weight: 700;
}

@media (max-width: 1024px) {
  #menu-page .page-container #streak-wheel-main-container {
    width: 235px;
    min-height: 235px;
    gap: 16px;
  }
  #streak-wheel-main-container #streak-wheel-caption {
    margin-bottom: 18px;
    font-size: 0.95rem;
  }
}

/* Streak wheel animation classes */
#streak-segments-group,
#streak-labels-group {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

#streak-wheel-svg.wheel-loaded #streak-segments-group,
#streak-wheel-svg.wheel-loaded #streak-labels-group {
  opacity: 1;
}

/* === LIVE SESSIONS === */

#live-session-icon-button-container {
  position: absolute;
  top: 130px;
  left: 20px;
  z-index: 1010;
}

#check-live-sessions-icon-btn {
  width: 40px;
  height: 40px;
  cursor: pointer;
  border: 2px solid #dc3545;
  border-radius: 50%;
  padding: 5px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#check-live-sessions-icon-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#check-live-sessions-icon-btn.checking {
  animation: pulse-red-border 1.5s infinite;
  cursor: default;
}

@keyframes pulse-red-border {
  0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* Styling for the area where session links or "no session" message appears */
#live-sessions-display-area .list-group-item {
  font-size: 0.9rem;
}

#live-sessions-display-area .list-group-item strong {
  color: #333;
}

#live-sessions-display-area .alert {
  margin-bottom: 0.5rem;
  padding: 0.5rem 1rem;
}

#check-live-sessions-wrapper {
  position: absolute;
  top: 100px;
  right: 18px;
  z-index: 1010;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 5px;
  border-radius: 8px;
  transition: background-color 0.2s ease-in-out;
}

#check-live-sessions-wrapper:hover {
  background-color: rgba(220, 53, 69, 0.1);
}

#check-live-sessions-fa-btn {
  font-size: 2.5rem;
  color: #dc3545;
  margin-bottom: 5px;
  transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

#check-live-sessions-wrapper:hover #check-live-sessions-fa-btn {
  color: #a71d2a;
  transform: scale(1.1);
}

#check-live-sessions-text {
  font-size: 0.75rem;
  color: #dc3545;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 0;
  text-align: center;
  line-height: 1.2;
}

/* Pulsing animation for when checking */
#check-live-sessions-wrapper.checking #check-live-sessions-fa-btn { 
  animation: pulse-red-icon 1.5s infinite;
}

#check-live-sessions-wrapper.checking #check-live-sessions-text {
  opacity: 0.7;
}

.btn.joining-in-progress {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: white !important;
}

@keyframes pulse-red-icon {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

#check-live-sessions-wrapper.checking {
  animation: pulse-red-border 1.5s infinite;
}

/* === INFO PANEL === */

/* Info Panel Slide-Out */
.info-panel {
  position: absolute;
  top: 5%;
  left: 0;
  width: 30%;
  max-width: 300px;
  height: 90%;
  background-color: #fefefe;
  border: 1px solid #ccc;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
  transform: translateX(-110%);
  transition: transform 0.5s ease;
  overflow-y: auto;
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  padding: 15px;
  z-index: 1500;
}

.info-panel-content h3, .info-panel-content h4 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.info-panel-content p {
  margin-bottom: 1rem;
}

.info-panel.open {
  transform: translateX(0);
}

.info-trigger i.fa-info-circle {
  display: block;
  font-size: 1.5rem;
  color: #ffb93e;
  border: 1px solid #000;
  border-radius: 50%;
  padding: 2px;
  background-color: #fff;
  cursor: pointer;
}

.info-trigger {
  cursor: pointer;
  position: absolute;
}

@media (max-width: 768px) {
  .info-panel {
    width: 50%;
    max-width: none;
    font-size: 0.75rem;
  }
}

/* === SMART SESSION FOOTER === */

.smart-session-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
  padding: 15px 0;
  z-index: 1040;
  transform: translateY(100%);
  transition: transform 0.4s ease-in-out;
}

.smart-session-footer:not(.hidden) {
  transform: translateY(0);
}

#smart-session-question-count-area {
  font-size: 1.2rem;
  font-weight: 500;
}

#smart-session-question-count-area .spinner-border-sm {
  vertical-align: -0.1em;
  margin-right: 0.5rem;
}

#smart-session-start-btn {
  font-weight: bold;
  min-width: 180px;
}

@media (max-width: 576px) {
  .smart-session-footer {
    padding: 10px 0;
  }
  
  #smart-session-question-count-area {
    font-size: 1rem;
  }
  
  #smart-session-start-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    min-width: 140px;
  }
}

/* === FEEDBACK FAB === */

/* Floating Action Button for Feedback */
.feedback-fab {
  /* Deprecated: hide floating bulb to avoid overlapping CTAs (replaced by footer button/chip) */
  display: none !important;
}

.feedback-fab:hover {
  transform: scale(1.1);
  background-color: #1a2531;
}

/* Feedback Popover */
.feedback-popover {
  display: none !important;
}

/* Footer-centered feedback chip (shown when session footer hidden) */
#feedback-footer-chip {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 1040;
  background: #fff;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 20px;
  padding: 6px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  cursor: pointer;
}

/* Mobile-specific positioning for feedback chip - positioned at page bottom, not floating */
@media (max-width: 768px) {
  #feedback-footer-chip {
    position: static !important;
    display: block !important;
    margin: 20px auto 20px auto !important;
    width: fit-content !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    z-index: auto !important;
    /* Add some spacing from page content */
    padding: 12px 20px !important;
  }
}

@media (max-width: 576px) {
  #feedback-footer-chip {
    position: static !important;
    display: block !important;
    margin: 20px auto 20px auto !important;
    width: fit-content !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    z-index: auto !important;
    /* Ensure it's properly sized on small screens */
    min-width: 120px;
    text-align: center;
    padding: 12px 20px !important;
  }
}

/* Additional mobile viewport fixes */
@media screen and (max-width: 768px) and (orientation: portrait) {
  #feedback-footer-chip {
    position: static !important;
    margin: 20px auto 20px auto !important;
  }
}

@media screen and (max-width: 576px) and (orientation: portrait) {
  #feedback-footer-chip {
    position: static !important;
    margin: 20px auto 20px auto !important;
  }
}

.feedback-popover.show-popover {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

/* The speech bubble tail */
.feedback-popover::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #fff;
}

/* Pulse animation for the FAB */
.pulse-attention {
  animation: pulseFab 2s infinite;
}

@keyframes pulseFab {
  0% { box-shadow: 0 0 0 0 rgba(44, 62, 80, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(44, 62, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(44, 62, 80, 0); }
}

/* === QUESTION PAGE LAYOUT === */

/* Enhanced Card Container Depth - Suggestion #1 */
#question-page .page-container {
  padding-right: 155px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 80vh;
  position: relative;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Mode-specific styling for Prime Time, Target Zone, and Master Mind */
/* Background image bleeds off edges to create window effect */
#question-page .page-container[data-mode="PrimeTime"]::before,
#question-page .page-container[data-mode="Mastermind"]::before,
#question-page .page-container[data-mode="TargetZone"]::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -20%;
  right: -20%;
  bottom: -20%;
  background-image: url('/Images/questionBackground.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100%;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

/* Ensure container clips the overflow to create clean edges */
#question-page .page-container[data-mode="PrimeTime"],
#question-page .page-container[data-mode="Mastermind"],
#question-page .page-container[data-mode="TargetZone"] {
  overflow: hidden;
}

/* This targets the main content div that wraps the question text, progress bar etc. */
#question-content-wrapper {
  grid-row: 2 / 3;
  overflow-y: auto;
  padding: 1.5rem 2rem 2rem 2rem;
}

/* Typography & Visual Hierarchy - Suggestion #2 */
#question-page #question-mode-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

#question-page #question-number {
  color: #6c757d;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
}

#question-page #question-text {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: #000000; /* Deep black for better contrast */
  margin-bottom: 2rem;
}

/* Answer text styling - smaller and lighter than question */
#question-page #answer-text {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  color: #1a1a1a; /* Deep dark gray/black for better contrast */
}

/* Visual Separators - Suggestion #6 */
#question-page #question-mode-title::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin-top: 1rem;
}

/* Progress Bar Enhancement - Suggestion #3 */
#question-page .progress {
  height: 25px;
  border-radius: 9px;
  background-color: #e9ecef;
  overflow: hidden;
  margin-bottom: 1.5rem;
  margin-top: 1rem;
  position: relative;
}

/* Add separator above progress bar */
#question-page .progress::before {
  content: '';
  position: absolute;
  top: -1rem;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

#question-page .progress-bar {
  height: 100%;
  border-radius: 9px;
  transition: width 0.4s ease-out;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important; /* Vibrant blue gradient */
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2); /* Shadow and inner highlight */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  min-width: 2%;
  position: relative;
}

/* Add a subtle shine effect to progress bar */
#question-page .progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
  border-radius: 9px 9px 0 0;
  pointer-events: none;
}

/* Button Styling Consistency - Suggestion #4 */
#question-page .btn {
  border-radius: 8px;
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
}

#question-page .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#question-page .btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Test Zone Option Buttons - Solid blue with shiny transparent finish */
#question-page #option-btn-A,
#question-page #option-btn-B,
#question-page #option-btn-C,
#question-page #option-btn-D {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.85) 0%, rgba(0, 86, 179, 0.85) 100%) !important;
  border: 2px solid rgba(13, 110, 253, 0.9) !important;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  opacity: 1;
  transition: all 0.3s ease;
}

/* Shiny effect for Test Zone option buttons */
#question-page #option-btn-A::before,
#question-page #option-btn-B::before,
#question-page #option-btn-C::before,
#question-page #option-btn-D::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  transition: all 0.5s;
}

#question-page #option-btn-A:hover::before,
#question-page #option-btn-B:hover::before,
#question-page #option-btn-C:hover::before,
#question-page #option-btn-D:hover::before {
  left: 100%;
}

#question-page #option-btn-A:hover,
#question-page #option-btn-B:hover,
#question-page #option-btn-C:hover,
#question-page #option-btn-D:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(13, 110, 253, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  background: linear-gradient(135deg, rgba(13, 110, 253, 1) 0%, rgba(0, 86, 179, 1) 100%) !important;
}

/* Selected option - highlighted */
#question-page #option-btn-A.selected-option,
#question-page #option-btn-B.selected-option,
#question-page #option-btn-C.selected-option,
#question-page #option-btn-D.selected-option {
  background: linear-gradient(135deg, rgba(13, 110, 253, 1) 0%, rgba(0, 86, 179, 1) 100%) !important;
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transform: scale(1.05);
  border-color: rgba(13, 110, 253, 1) !important;
}

/* Dimmed options when one is selected */
#question-page #option-btn-A.dimmed-option,
#question-page #option-btn-B.dimmed-option,
#question-page #option-btn-C.dimmed-option,
#question-page #option-btn-D.dimmed-option {
  opacity: 0.5;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.5) 0%, rgba(0, 86, 179, 0.5) 100%) !important;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* Override blue styling when answer is revealed - Incorrect selected answer (red) */
#question-page #option-btn-A.btn-danger,
#question-page #option-btn-B.btn-danger,
#question-page #option-btn-C.btn-danger,
#question-page #option-btn-D.btn-danger {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.85) 0%, rgba(200, 35, 51, 0.85) 100%) !important;
  border: 2px solid rgba(220, 53, 69, 0.9) !important;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  color: #fff !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Override blue styling when answer is revealed - Correct answer (green) */
#question-page #option-btn-A.btn-success,
#question-page #option-btn-B.btn-success,
#question-page #option-btn-C.btn-success,
#question-page #option-btn-D.btn-success {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.85) 0%, rgba(25, 135, 84, 0.85) 100%) !important;
  border: 2px solid rgba(40, 167, 69, 0.9) !important;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  color: #fff !important;
  opacity: 1 !important;
  transform: none !important;
}

/* V2.2.1: Enhanced Button Styling - Response Buttons */

/* Didn't Know It Button */
#question-page .btn-danger {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.85) 0%, rgba(200, 35, 51, 0.85) 100%) !important;
  border: 2px solid rgba(220, 53, 69, 0.9);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

#question-page .btn-danger::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  transition: all 0.5s;
}

#question-page .btn-danger:hover::before {
  left: 100%;
}

#question-page .btn-danger:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 20px rgba(220, 53, 69, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, rgba(220, 53, 69, 1) 0%, rgba(200, 35, 51, 1) 100%) !important;
}

#question-page .btn-danger:active {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 4px 10px rgba(220, 53, 69, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Partially Knew It Button */
#question-page .btn-warning {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.85) 0%, rgba(255, 152, 0, 0.85) 100%) !important;
  border: 2px solid rgba(255, 193, 7, 0.9);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #000;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

#question-page .btn-warning::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  transition: all 0.5s;
}

#question-page .btn-warning:hover::before {
  left: 100%;
}

#question-page .btn-warning:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 20px rgba(255, 193, 7, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, rgba(255, 193, 7, 1) 0%, rgba(255, 152, 0, 1) 100%) !important;
}

#question-page .btn-warning:active {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Knew It Button */
#question-page .btn-success:not(#show-answer-btn) {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.85) 0%, rgba(25, 135, 84, 0.85) 100%) !important;
  border: 2px solid rgba(40, 167, 69, 0.9);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

#question-page .btn-success:not(#show-answer-btn)::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  transition: all 0.5s;
}

#question-page .btn-success:not(#show-answer-btn):hover::before {
  left: 100%;
}

#question-page .btn-success:not(#show-answer-btn):hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 20px rgba(40, 167, 69, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, rgba(40, 167, 69, 1) 0%, rgba(25, 135, 84, 1) 100%) !important;
}

#question-page .btn-success:not(#show-answer-btn):active {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 4px 10px rgba(40, 167, 69, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Show Answer Button */
#question-page #show-answer-btn.btn-success {
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.9) 0%, rgba(25, 135, 84, 0.9) 100%) !important;
  border: 2px solid rgba(40, 167, 69, 0.8);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

#question-page #show-answer-btn.btn-success::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  transition: all 0.5s;
}

#question-page #show-answer-btn.btn-success:hover::before {
  left: 100%;
}

#question-page #show-answer-btn.btn-success:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 20px rgba(40, 167, 69, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, rgba(40, 167, 69, 1) 0%, rgba(25, 135, 84, 1) 100%) !important;
}

#question-page #show-answer-btn.btn-success:active {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 4px 10px rgba(40, 167, 69, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Teacher Support Button */
#question-page #teacher-support-btn {
  border-radius: 8px;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.85) 0%, rgba(41, 128, 185, 0.85) 100%) !important;
  border: 2px solid rgba(52, 152, 219, 0.9);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  font-weight: 600;
}

#question-page #teacher-support-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  transition: all 0.5s;
}

#question-page #teacher-support-btn:hover::before {
  left: 100%;
}

#question-page #teacher-support-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, rgba(52, 152, 219, 1) 0%, rgba(41, 128, 185, 1) 100%) !important;
}

#question-page #teacher-support-btn:active {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Flag Question Button */
#question-page #flag-question-btn {
  border-radius: 8px;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.85) 0%, rgba(255, 152, 0, 0.85) 100%) !important;
  border: 2px solid rgba(255, 193, 7, 0.9);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #000;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
  font-weight: 600;
}

#question-page #flag-question-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: rotate(45deg);
  transition: all 0.5s;
}

#question-page #flag-question-btn:hover::before {
  left: 100%;
}

#question-page #flag-question-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 20px rgba(255, 193, 7, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, rgba(255, 193, 7, 1) 0%, rgba(255, 152, 0, 1) 100%) !important;
}

#question-page #flag-question-btn:active {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Flag button when flagged (red state) */
#question-page #flag-question-btn.flagged {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.85) 0%, rgba(200, 35, 51, 0.85) 100%) !important;
  border: 2px solid rgba(220, 53, 69, 0.9);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#question-page #flag-question-btn.flagged:hover {
  background: linear-gradient(135deg, rgba(220, 53, 69, 1) 0%, rgba(200, 35, 51, 1) 100%) !important;
  box-shadow: 0 8px 20px rgba(220, 53, 69, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Spacing & Whitespace - Suggestion #5 */
/* Additional spacing adjustments for better visual hierarchy */
#question-page #question-text.mb-3 {
  margin-bottom: 2rem !important;
}

.question-page-actions {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  z-index: 10;
}

/* === RESPONSIVE ADJUSTMENTS === */

@media (max-width: 768px) {
  #question-page .page-container, #menu-page .page-container {
    padding-right: 20px;
  }
  
  /* Hide the desktop wrapper on mobile */
  #top-right-ui-cluster {
    display: none;
  }
  
  #question-page .page-container {
    padding-right: 20px;
  }
  
  #daily-goal-timer-container {
    position: fixed;
    top: auto;
    bottom: 15px;
    right: 15px;
    width: 80px;
  }
  
  #daily-goal-timer-circle-visual {
    width: 80px;
    height: 80px;
  }
  
  #daily-goal-timer-text { 
    font-size: 0.75rem; 
  }
  
  #daily-goal-timer-pause-icon { 
    font-size: 1rem; 
  }
  
  #daily-goal-timer-paused-text { 
    font-size: 0.6rem; 
  }
  
  #daily-goal-timer-caption { 
    font-size: 0.6rem; 
    margin-top: 4px; 
  }
  
  .info-panel {
    width: 50%;
    max-width: none;
    font-size: 0.75rem;
  }
  
  /* Adjust button positioning on mobile */
  .question-page-actions {
    bottom: 15px;
    right: 15px;
    gap: 8px;
  }
}

@media (max-width: 576px) {
  .smart-session-footer {
    padding: 10px 0;
  }
  
  #smart-session-question-count-area {
    font-size: 1rem;
  }
  
  #smart-session-start-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    min-width: 140px;
  }
}
