/* Mobile-Only UI Components - Hidden on desktop by default */
.mobile-only {
  display: none;
}

/* Mobile UI Activation - Only show on devices ≤ 768px */
@media (max-width: 768px) {
  .mobile-only {
    display: block !important;
  }

  .desktop-only {
    display: none !important;
  }

  /* Hide desktop solar system on mobile */
  .solar-system {
    display: none !important;
  }
}

/* Small phones adjustment */
@media (max-width: 480px) {
  .solar-system {
    transform: scale(0.4);
  }
}

/* Mobile Header */
.mobile-header {
  padding: 20px;
  background: rgba(15, 20, 40, 0.9);
  border-bottom: 1px solid #495670;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-logo {
  font-size: 24px;
  color: #64FFDA;
  font-weight: 600;
}

.mobile-auth-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.mobile-btn-primary {
  padding: 12px 24px;
  background: #64FFDA;
  color: #0A0B1A;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  touch-action: manipulation;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.mobile-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(100, 255, 218, 0.3);
}

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

.mobile-tier-badge {
  font-size: 11px;
  color: #8892B0;
}

/* Mobile Timer Section */
.mobile-timer-section {
  padding: 40px 20px;
  text-align: center;
  background: #0A0B1A;
}

.mobile-timer-display {
  font-size: 72px;
  color: #64FFDA;
  font-weight: 300;
  margin-bottom: 20px;
  font-variant-numeric: tabular-nums;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.mobile-engine-status {
  font-size: 14px;
  color: #8892B0;
  margin-bottom: 30px;
}

.mobile-action-btn {
  width: 100%;
  max-width: 400px;
  padding: 20px;
  background: #64FFDA;
  color: #0A0B1A;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  touch-action: manipulation;
  transition: transform 0.1s ease;
  cursor: pointer;
}

.mobile-action-btn:hover {
  transform: scale(1.02);
}

.mobile-action-btn:active {
  transform: scale(0.98);
}

/* Mobile Duration Sliders (Premium) */
.mobile-duration-controls {
  width: 100%;
  max-width: 400px;
  margin: 30px auto;
  padding: 20px;
  background: rgba(15, 20, 40, 0.6);
  border-radius: 8px;
  border: 1px solid #495670;
}

.mobile-slider-container {
  margin-bottom: 24px;
}

.mobile-slider-container:last-child {
  margin-bottom: 0;
}

.mobile-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mobile-slider-header label {
  font-size: 14px;
  color: #8892B0;
  font-weight: 500;
}

.slider-value {
  font-size: 16px;
  color: #64FFDA;
  font-weight: 600;
  min-width: 60px;
  text-align: right;
}

/* Custom Range Slider Styling */
.mobile-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #495670;
  border-radius: 4px;
  outline: none;
  position: relative;
}

/* Slider Track Fill (Active portion) */
.mobile-slider::-webkit-slider-runnable-track {
  height: 8px;
  background: linear-gradient(
    to right,
    #64FFDA 0%,
    #64FFDA var(--slider-percent, 21%),
    #495670 var(--slider-percent, 21%),
    #495670 100%
  );
  border-radius: 4px;
}

.mobile-slider::-moz-range-track {
  height: 8px;
  background: #495670;
  border-radius: 4px;
}

.mobile-slider::-moz-range-progress {
  height: 8px;
  background: #64FFDA;
  border-radius: 4px;
}

/* Slider Thumb - 32px for easy touch */
.mobile-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  background: #64FFDA;
  border: 3px solid #0A0B1A;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(100, 255, 218, 0.4);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.mobile-slider::-moz-range-thumb {
  width: 32px;
  height: 32px;
  background: #64FFDA;
  border: 3px solid #0A0B1A;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(100, 255, 218, 0.4);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* Active/Focus States */
.mobile-slider:active::-webkit-slider-thumb {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(100, 255, 218, 0.6);
}

.mobile-slider:active::-moz-range-thumb {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(100, 255, 218, 0.6);
}

/* Premium Prompt Message (Free Tier) */
.mobile-premium-message {
  width: 100%;
  max-width: 400px;
  margin: 30px auto;
  padding: 24px;
  background: rgba(100, 255, 218, 0.1);
  border: 1px solid #64FFDA;
  border-radius: 8px;
  text-align: center;
}

.mobile-premium-message p {
  color: #8892B0;
  font-size: 14px;
  margin: 0 0 16px 0;
}

.mobile-upgrade-btn {
  padding: 12px 32px;
  background: #64FFDA;
  color: #0A0B1A;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.1s ease;
}

.mobile-upgrade-btn:hover {
  transform: scale(1.05);
}

.mobile-upgrade-btn:active {
  transform: scale(0.95);
}

/* Mobile Milestone Section */
.mobile-milestone-section {
  padding: 30px 20px;
  background: rgba(15, 20, 40, 0.5);
  border-top: 1px solid #495670;
  border-bottom: 1px solid #495670;
}

.mobile-progress-text {
  font-size: 16px;
  color: #8892B0;
  line-height: 1.6;
  margin-bottom: 20px;
}

.mobile-progress-text .highlight {
  color: #64FFDA;
  font-weight: 600;
}

.mobile-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 10px;
}

.planet-name {
  color: #64FFDA;
}

.progress-ratio {
  color: #8892B0;
}

.mobile-progress-bar {
  width: 100%;
  height: 8px;
  background: #1E2A3A;
  border-radius: 4px;
  overflow: hidden;
}

.mobile-progress-fill {
  height: 100%;
  background: #64FFDA;
  transition: width 0.5s ease;
}

/* Mobile Starship Section (NEW) */
.mobile-starship-section {
  padding: 40px 20px;
  background: #0A0B1A;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.planet-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.planet-label {
  font-size: 12px;
  color: #8892B0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.planet-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(100, 255, 218, 0.2);
  object-fit: cover;
}

.planet-display .planet-name {
  font-size: 18px;
  color: #64FFDA;
  font-weight: 600;
}

.planet-engine {
  font-size: 13px;
  color: #8892B0;
  font-style: italic;
}

.starship-engine-container {
  position: relative;
  padding: 20px;
}

#starship-engine-svg {
  filter: drop-shadow(0 0 10px rgba(100, 255, 218, 0.3));
}

/* Mobile Stats Section */
.mobile-stats-section {
  padding: 30px 20px;
  background: rgba(15, 20, 40, 0.5);
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #2C3E50;
  font-size: 16px;
}

.stat-label {
  color: #8892B0;
}

.stat-value {
  color: #64FFDA;
  font-weight: 600;
}

/* Responsive refinements */
@media (max-width: 480px) {
  .mobile-timer-display {
    font-size: 64px;
  }

  .planet-icon {
    width: 70px;
    height: 70px;
  }

  #starship-engine-svg {
    width: 100px;
    height: 125px;
  }

  .mobile-action-btn {
    padding: 16px;
    font-size: 16px;
  }
}

/* Starship engine nozzle styling */
.nozzle {
  fill: #3A4B5C;
  opacity: 0.3;
  transition: all 0.3s ease;
}

.nozzle.lit {
  fill: #64FFDA;
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(100, 255, 218, 0.8));
}

/* Make existing sliders mobile-friendly */
@media (max-width: 768px) {
  /* Larger timer font */
  .timer-display {
    font-size: 72px !important;
  }

  /* Bigger slider thumb for touch */
  #session-slider::-webkit-slider-thumb,
  #break-slider::-webkit-slider-thumb {
    width: 32px !important;
    height: 32px !important;
  }

  /* Full-width buttons */
  .start-button {
    width: 100% !important;
    padding: 20px !important;
    font-size: 18px !important;
  }

  /* Larger progress bar for mobile */
  .mobile-progress-bar {
    height: 8px !important;
  }

  .progress-text {
    font-size: 16px !important;
  }
}

/* Hide desktop starship section by default */
.starship-engine-section {
  display: none;
}

/* Show starship section only on mobile */
@media (max-width: 768px) {
  .starship-engine-section {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    gap: 30px;
  }
}

/* Mobile Onboarding Styles */
.mobile-onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 11, 26, 0.95);
  z-index: 10000;
  overflow-y: auto;
}

.mobile-onboarding-step {
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.mobile-onboarding-content {
  max-width: 90%;
  text-align: center;
  color: white;
  font-size: 18px;
  line-height: 1.6;
}

.mobile-onboarding-buttons {
  position: fixed;
  bottom: 40px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
}

.mobile-onboarding-btn {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 8px;
  background: #64FFDA;
  color: #0A0B1A;
  border: none;
  font-weight: 600;
  min-width: 120px;
  touch-action: manipulation;
  cursor: pointer;
}

.mobile-progress-dots {
  display: flex;
  gap: 8px;
  margin-top: 30px;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #495670;
  transition: background 0.3s ease;
}

.progress-dot.active {
  background: #64FFDA;
  box-shadow: 0 0 8px rgba(100, 255, 218, 0.6);
}

.mobile-skip-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid #495670;
  border-radius: 20px;
  color: #8892B0;
  font-size: 14px;
  cursor: pointer;
  touch-action: manipulation;
}