/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow: hidden;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #000;
  color: #fff;
  position: relative;
}

/* Loading Screen - Enhanced Design */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  overflow: hidden;
}

.loading-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.loading-particles {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.loading-particles:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 8s;
}

.loading-particles:nth-child(2) {
  top: 60%;
  right: 15%;
  animation-delay: 2s;
  animation-duration: 10s;
}

.loading-particles:nth-child(3) {
  bottom: 30%;
  left: 20%;
  animation-delay: 4s;
  animation-duration: 12s;
}

.loading-particles:nth-child(4) {
  top: 40%;
  right: 25%;
  animation-delay: 1s;
  animation-duration: 9s;
}

.loading-particles:nth-child(5) {
  bottom: 60%;
  right: 10%;
  animation-delay: 3s;
  animation-duration: 11s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.3; }
  50% { transform: translateY(-20px) rotate(180deg); opacity: 1; }
}

.loading-content {
  text-align: center;
  max-width: 400px;
  width: 90%;
  position: relative;
  z-index: 2;
}

.loading-logo {
  margin-bottom: 40px;
  animation: fadeInUp 1s ease-out;
}

.logo-icon {
  font-size: 48px;
  margin-bottom: 10px;
  animation: pulse 2s ease-in-out infinite;
}

.logo-text {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(45deg, #fff, #a8e6cf);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.loading-spinner-container {
  margin-bottom: 30px;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.loading-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(1) {
  animation-delay: 0s;
  border-top-color: #a8e6cf;
}

.spinner-ring:nth-child(2) {
  width: 60px;
  height: 60px;
  top: 10px;
  left: 10px;
  animation-delay: 0.2s;
  animation-duration: 1.2s;
  border-top-color: #ff8b94;
}

.spinner-ring:nth-child(3) {
  width: 40px;
  height: 40px;
  top: 20px;
  left: 20px;
  animation-delay: 0.4s;
  animation-duration: 0.9s;
  border-top-color: #ffd3b6;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading-text {
  margin-bottom: 30px;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.loading-text h2 {
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  margin: 0 0 8px 0;
}

.loading-text p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.progress-container {
  margin-bottom: 40px;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 15px;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #a8e6cf, #ff8b94, #ffd3b6);
  width: 0%;
  transition: width 0.5s ease;
  position: relative;
  border-radius: 3px;
}

.progress-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#progress-text {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.progress-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.loading-tips {
  animation: fadeInUp 1s ease-out 0.8s both;
}

.tip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  cursor: default;
}

.tip-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.tip-item:last-child {
  margin-bottom: 0;
}

.tip-icon {
  font-size: 16px;
  width: 24px;
  text-align: center;
  animation: bounce 2s ease-in-out infinite;
}

.tip-item:nth-child(2) .tip-icon {
  animation-delay: 0.5s;
}

.tip-item:nth-child(3) .tip-icon {
  animation-delay: 1s;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-3px); }
  60% { transform: translateY(-2px); }
}

.tip-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  flex: 1;
}

/* Welcome Screen */
#blocker {
  position: absolute;
  width: 100%;
  height: 100%;
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  display: flex;
  align-items: center;
  justify-content: center;
}

#instructions {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#instructions-content {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.welcome-header {
  margin-bottom: 28px;
}

.logo-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.welcome-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
}

.controls-info {
  margin-bottom: 24px;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.control-item:last-child {
  border-bottom: none;
}

.control-icon {
  font-size: 16px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-text {
  flex: 1;
  text-align: left;
}

.control-label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  color: #fff;
  margin-bottom: 1px;
}

.control-desc {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.enter-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.enter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-icon {
  font-size: 14px;
}

.tip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  justify-content: center;
}

.tip-icon {
  font-size: 14px;
}

/* Navigation Menu */
#navigation-menu {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 20px;
  z-index: 1000;
  min-width: 280px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.nav-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.nav-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.nav-indicator {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  text-decoration: none;
  width: 100%;
  font-size: 13px;
}

.dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.toggle-text {
  font-weight: 500;
}

.toggle-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.dropdown-toggle.active .toggle-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  margin-top: 8px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  background: none;
  border: none;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dropdown-item.selected {
  background: rgba(102, 126, 234, 0.2);
  border-left: 3px solid #667eea;
}

.dropdown-item:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.item-content {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.item-number {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

.item-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.item-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1px;
}

.item-subtitle {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}

/* Point Description */
#point-description {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  z-index: 2000;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.description-content {
  padding: 24px;
}

.desc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

#desc-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.desc-body {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  font-size: 14px;
}

/* 360 Mode Instructions */
#mode-instructions {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1500;
}

.mode-content {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 20px;
  max-width: 280px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.mode-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.mode-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.mode-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.mode-info {
  margin-bottom: 16px;
}

.mode-info p {
  margin: 6px 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  text-align: left;
}

.mode-actions {
  margin-bottom: 12px;
}

.exit-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.exit-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.exit-icon {
  font-size: 14px;
}

.mode-hints {
  text-align: center;
}

.mode-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* Mobile-specific classes */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}


.hidden {
  display: none !important;
}

/* Responsive design */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
  
  .mobile-only {
    display: block !important;
  }
  
  /* Move instructions to bottom on mobile */
  
  #instructions-content {
    max-width: 100%;
    top: auto;
    bottom: 20px;
    left: 16px;
    right: 16px;
  }
  
  .welcome-header h1 {
    font-size: 28px;
  }
  
  .subtitle {
    font-size: 14px;
  }
  
  #navigation-menu {
    top: 16px;
    right: 16px;
    left: 16px;
    min-width: auto;
    padding: 20px;
  }
  
  .nav-header h3 {
    font-size: 16px;
  }
  
  .dropdown-toggle {
    padding: 14px 16px;
    font-size: 14px;
  }
  
  .dropdown-menu {
    margin-top: 6px;
  }
  
  .dropdown-item {
    padding: 14px 16px;
  }
  
  .item-number {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }
  
  .item-title {
    font-size: 13px;
  }
  
  .item-subtitle {
    font-size: 11px;
  }
  
  #point-description {
    margin: 20px auto;
    max-width: calc(100% - 40px);
    min-width: auto;
    left: 50%;
    transform: translate(-50%, -50%);
    right: auto;
  }
  
  .description-content {
    padding: 24px;
  }
  
  #desc-title {
    font-size: 20px;
  }
  
  .desc-body {
    font-size: 14px;
  }
  
  /* Move mode instructions to bottom on mobile */
  #mode-instructions {
    top: auto;
    bottom: 20px;
    left: 16px;
    right: 16px;
  }
  
  .mode-content {
    max-width: none;
    padding: 20px;
  }
  
  .mode-header h3 {
    font-size: 16px;
  }
  
  .mode-info p {
    font-size: 13px;
  }
  
  .exit-btn {
    padding: 10px 14px;
    font-size: 13px;
  }
  

}

@media (max-width: 480px) {
  /* Adjust instructions for smaller screens */
  #instructions {
    padding-bottom: 16px;
  }
  
  #instructions-content {
    padding: 20px 16px;
    margin: 0 16px;
    max-width: 320px;
  }
  
  .welcome-header h1 {
    font-size: 24px;
  }
  
  .logo-icon {
    font-size: 40px;
  }
  
  .control-item {
    padding: 10px 0;
  }
  
  .control-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  .enter-btn {
    padding: 14px 20px;
    font-size: 15px;
  }
  
  #navigation-menu {
    padding: 16px;
  }
  
  .dropdown-toggle {
    padding: 12px 14px;
    font-size: 13px;
  }
  
  .dropdown-item {
    padding: 12px 14px;
  }
  
  .item-number {
    width: 22px;
    height: 22px;
    font-size: 9px;
  }
  
  .item-title {
    font-size: 12px;
  }
  
  .item-subtitle {
    font-size: 10px;
  }
  
  .description-content {
    padding: 20px;
  }
  
  #desc-title {
    font-size: 18px;
  }
  
  .desc-body {
    font-size: 13px;
  }
  
  /* Adjust mode instructions for smaller screens */
  #mode-instructions {
    bottom: 16px;
    left: 12px;
    right: 12px;
  }
  
  .mode-content {
    padding: 16px;
  }
  
  .mode-header h3 {
    font-size: 15px;
  }
  
  .mode-info p {
    font-size: 12px;
  }
  
  
}

/* Mobile Arrow Navigation Buttons */
#mobile-arrow-buttons {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1001;
  touch-action: manipulation;
  /* background: rgba(255,255,255,0.1); */
  /* backdrop-filter: blur(20px); */
  /* border: 1px solid rgba(255,255,255,0.2); */
  border-radius: 16px;
  padding: 16px 24px 12px 24px;
  pointer-events: none;
}
.arrow-row {
  display: flex;
  flex-direction: row;
  gap: 16px;
  justify-content: center;
  background: none;
  pointer-events: auto;
  margin-bottom: 10px;
}
.arrow-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 2.1rem;
  font-weight: 600;
  transition: background 0.18s, color 0.18s, border 0.18s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  box-shadow: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}
.arrow-btn:active {
  background: #ffb347;
  color: #222;
  border: 1.5px solid #ffb347;
}
.arrow-btn:focus {
  outline: 2px solid #ffb347;
}
.arrow-btn:hover {
  background: rgba(255,255,255,0.28);
}
@media (min-width: 769px) {
  #mobile-arrow-buttons { display: none; }
}
