.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

body {
  background-color: #020617;
  color: #F1F5F9;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, sans-serif;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

html {
  height: -webkit-fill-available;
}

#app {
  width: 100%;
  height: 100dvh;
  height: -webkit-fill-available;
  position: relative;
  overflow: hidden;
}

.pb-safe { padding-bottom: env(safe-area-inset-bottom, 20px); }
.pt-safe { padding-top: env(safe-area-inset-top, 20px); }

.clip-hexagon {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.text-chrome-3d {
  background: linear-gradient(180deg, #FFFFFF 0%, #CBD5E1 45%, #64748B 50%, #94A3B8 60%, #FFFFFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0px 0px 10px rgba(255,255,255,0.2));
}

.glass-panel {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

@keyframes float-up {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.05); }
}

#firework-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
}

.control-panel {
  transition: all 0.5s ease;
}

.control-panel.minimized {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

/* 控制面板滚动 */
.control-panel .overflow-y-auto {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.control-panel .overflow-y-auto::-webkit-scrollbar {
  width: 4px;
}

.control-panel .overflow-y-auto::-webkit-scrollbar-track {
  background: transparent;
}

.control-panel .overflow-y-auto::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

.firework-btn {
  aspect-ratio: 1;
  transition: all 0.2s ease;
}

.firework-btn:active {
  transform: scale(0.9);
}

.firework-btn:hover .btn-icon {
  transform: translateY(-4px);
}

.hue-slider {
  background: linear-gradient(to right, 
    #ff0000 0%, #ffff00 17%, #00ff00 33%, 
    #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
}

/* 原生 range input 样式 */
.hue-range-input {
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, 
    #ff0000 0%, #ffff00 17%, #00ff00 33%, 
    #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  border-radius: 9999px;
  outline: none;
}

.hue-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #0ea5e9;
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s ease;
}

.hue-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.hue-range-input::-webkit-slider-thumb:active {
  transform: scale(0.95);
}

.hue-range-input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #0ea5e9;
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.slider-thumb {
  transition: left 0.1s ease;
}

/* 音量滑块样式 */
.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #334155 0%, #64748b 100%);
  border-radius: 9999px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #e2e8f0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s ease, background 0.1s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #f8fafc;
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #e2e8f0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.volume-slider::-moz-range-thumb:hover {
  background: #f8fafc;
}


/* 移动端适配 */
@media (max-height: 700px) {
  .control-panel {
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .control-panel .p-5 {
    padding: 12px;
  }
  
  .control-panel .mb-4 {
    margin-bottom: 8px;
  }
  
  .control-panel .mt-4 {
    margin-top: 8px;
  }
  
  .control-panel .p-3 {
    padding: 8px;
  }
  
  .control-panel .gap-3 {
    gap: 6px;
  }
  
  .firework-btn {
    min-height: 50px;
  }
}

@media (max-height: 600px) {
  .control-panel {
    max-height: 55vh;
  }
  
  .firework-btn {
    min-height: 44px;
  }
  
  .blessing-btn {
    padding: 4px 6px;
    font-size: 9px;
  }
}

/* 横屏模式 */
@media (orientation: landscape) and (max-height: 500px) {
  .control-panel {
    max-height: 70vh;
    padding: 8px !important;
  }
  
  .firework-btn {
    min-height: 40px;
  }
}

/* iOS Safari 底部安全区域 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .pb-safe {
    padding-bottom: max(env(safe-area-inset-bottom), 12px);
  }
}
