/* 自定义样式 - 暗色主题优化版 */

/* 旋转滑块样式 */
.slider {
  -webkit-appearance: none;
  appearance: none;
  background: #666;
  outline: none;
  border-radius: 5px;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #007acc;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #007acc;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.slider::-webkit-slider-track {
  background: #666;
  border-radius: 5px;
  height: 8px;
}

.slider::-moz-range-track {
  background: #666;
  border-radius: 5px;
  height: 8px;
  border: none;
}

/* 确保图标正确显示 */
[data-lucide] {
  display: inline-block;
  width: 1em;
  height: 1em;
  stroke-width: 2;
}

/* FAQ过渡效果 */
.faq-content {
  transition: all 0.3s ease;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 按钮悬停效果 - 暗色主题优化 */
button:hover {
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}

/* Select下拉箭头样式 */
select {
  background-image: none; /* 移除默认箭头，使用自定义箭头 */
}

/* Tools select 固定宽度，但下拉选项可以更宽 */
select option {
  white-space: normal;
  word-wrap: break-word;
}

/* 响应式优化 */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
}

/* 移动端优化 */
@media (max-width: 640px) {
  select {
    font-size: 14px;
    padding: 6px 8px;
  }
  
  /* Logo在移动端稍微缩小 */
  nav img {
    width: 20px !important;
    height: 20px !important;
  }
}

/* 移动端导航菜单动画效果 */
#mobile-menu {
  transition: all 0.3s ease-in-out;
  max-height: 0;
  overflow: hidden;
}

#mobile-menu:not(.hidden) {
  max-height: 200px;
}

/* 移动菜单按钮动画效果 */
#mobile-menu-button {
  transition: transform 0.2s ease;
}

#mobile-menu-button:hover {
  transform: scale(1.05);
}

/* 移动菜单项动画效果 */
#mobile-menu a {
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

#mobile-menu a:hover {
  border-left-color: #21b5f4;
  background-color: rgba(33, 181, 244, 0.1);
  padding-left: 12px;
}

/* 确保桌面端隐藏移动菜单 */
@media (min-width: 768px) {
  #mobile-menu {
    display: none !important;
  }
}

/* 图片预览区域响应式内边距优化 */
#preview-img {
  /* 移动端：较小边距，为按钮区域预留空间 */
  max-height: calc(100% - 2rem) !important;
  max-width: calc(100% - 2rem) !important;
}

/* 平板端：中等边距，为按钮区域预留空间 */
@media (min-width: 640px) {
  #preview-img {
    max-height: calc(100% - 4rem) !important;
    max-width: calc(100% - 4rem) !important;
  }
}

/* PC端：更大边距，为按钮区域预留空间 */
@media (min-width: 1024px) {
  #preview-img {
    max-height: calc(100% - 6rem) !important;
    max-width: calc(100% - 6rem) !important;
  }
}

/* 图片预览容器布局优化 */
#image-preview .flex-1.min-h-0 {
  /* 确保图片区域不会挤压按钮区域 */
  overflow: hidden;
}

/* 暗色主题专用样式 */
.faq-toggle:focus {
  outline: 2px solid #21b5f4;
  outline-offset: 2px;
}

/* 应用状态切换过渡效果 */
#photo-editor-hero,
#photo-editor-content,
#convert-to-jpg-hero,
#convert-to-jpg-content,
#page-footer {
  transition: opacity 0.4s ease-in-out, 
              height 0.4s ease-in-out,
              padding 0.4s ease-in-out,
              margin 0.4s ease-in-out;
}

/* 确保隐藏状态下的元素不占用布局空间 */
#photo-editor-hero.hidden-state,
#photo-editor-content.hidden-state,
#convert-to-jpg-hero.hidden-state,
#convert-to-jpg-content.hidden-state {
  opacity: 0;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
}