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

/* 确保图标正确显示 */
[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;
  }
}

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

/* 响应式布局 - Flexbox Order 控制 */
.responsive-flex-container {
  display: flex;
  flex-direction: column;
}

/* 移动端默认: Calculator在上，Hero在下 */
.hero-section {
  order: -1;
}

.calculator-section {
  order: -2;
}

/* PC端 (sm:640px+): Hero在上，Calculator在下 */
@media (min-width: 640px) {
  .hero-section {
    order: -2;
  }

  .calculator-section {
    order: -1;
  }
}

/* Unit Converter 样式 */
.unit-converter-desktop input:focus,
.unit-converter-desktop select:focus,
.unit-converter-mobile input:focus,
.unit-converter-mobile select:focus {
  outline: 2px solid #21b5f4;
  outline-offset: 2px;
  border-color: #21b5f4;
}

.unit-converter-desktop input,
.unit-converter-desktop select,
.unit-converter-mobile input,
.unit-converter-mobile select {
  transition: all 0.2s ease;
}

.unit-converter-desktop input:hover,
.unit-converter-desktop select:hover,
.unit-converter-mobile input:hover,
.unit-converter-mobile select:hover {
  border-color: #4a5568;
}

.unit-converter-desktop select:hover,
.unit-converter-mobile select:hover {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23e2e8f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* 统一 Unit Converter 控件高度 */
.unit-converter-desktop input,
.unit-converter-desktop select,
.unit-converter-mobile input,
.unit-converter-mobile select {
  font-size: 16px;
  padding: 8px 12px;
  line-height: 1.5;
  min-height: 42px;
}

.unit-converter-desktop select,
.unit-converter-mobile select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  padding-right: 2.5rem;
}

@media (max-width: 640px) {
  .unit-converter-mobile input,
  .unit-converter-mobile select {
    font-size: 16px;
    padding: 8px 12px;
  }
}

/* 移动端Unit Converter背景 */
.unit-converter-mobile {
  order: -3;
}
