/* ============================================================
   统一移动端交互与笔记区规范
   ============================================================ */





/* 真实玻璃效果工具容器 - 嵌入式升级 2.0：保留毛玻璃，无边界 */
.tool-container {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  will-change: transform, backdrop-filter;
  transform: translateZ(0);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  box-shadow: var(--shadow-soft), inset 0 1px 1px rgba(255, 255, 255, 0.6), inset 0 -1px 1px rgba(255, 255, 255, 0.2);
  max-width: 800px;
  width: 90%;
  max-height: none;
  /* 允许全屏滚动 */
  padding: 32px;
  transition: all .3s var(--ease-liquid);
  overflow: visible;
}


/* 已通过 box-shadow 替代高光伪元素 */

/* 玻璃容器的纹理效果 */
.tool-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--noise-texture);
  opacity: 0.03;
  border-radius: 24px;
  pointer-events: none;
  mix-blend-mode: overlay;
}


/* 真实玻璃效果结果卡片 - 嵌入式升级：透明平铺 */
.result-card {
  position: relative;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-top: 1px dashed var(--glass-border);
  /* 仅保留顶部虚线分隔 */
  border-radius: 16px;
  padding: 20px;
  margin: 16px 0;
  box-shadow: none;
  transition: all .3s var(--ease-liquid);
}


/* 已通过 box-shadow 替代高光伪元素 */

.result-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--noise-texture);
  opacity: 0.02;
  border-radius: 16px;
  pointer-events: none;
  mix-blend-mode: overlay;
}


/* 以下为工具通用样式 */
.tool-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
  text-align: center;
}


.tool-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  text-align: center;
  padding: 0 10px;
}


.tool-instructions {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 16px 0;
  line-height: 1.6;
  font-weight: 400
}
@media (min-width: 1024px) {

  .tool-container {
    padding: 48px;
    max-width: 900px;
  }
}
@media (max-width: 768px) {


  .tool-container {
    max-width: 95%;
    width: 95%;
    padding: 24px;
    border-radius: 16px;
    margin: 80px 16px 16px 16px;
    /* 顶部留出导航栏空间 */
    max-height: calc(100vh - 96px);
    /* 调整最大高度，考虑顶部边距 */
  }

  /* 覆盖 .tool-container 基类的 margin/width，确保标准容器撑满 */
  .tool-container.tool-container-standard {
    width: calc(100% - 4px) !important;
    max-width: calc(100% - 4px) !important;
    margin-left: 2px !important;
    margin-right: 2px !important;
    border-radius: 4px !important;
    max-height: none !important;
  }
}
@media (max-width: 480px) {


  .tool-container {
    max-width: 100%;
    width: 100%;
    padding: 20px;
    border-radius: 12px;
    margin: 76px 12px 12px 12px;
    /* 顶部留出导航栏空间 */
    max-height: calc(100vh - 100px);
    /* 调整最大高度，考虑顶部边距 */
  }

  /* 覆盖 .tool-container 基类的 margin/width */
  .tool-container.tool-container-standard {
    width: calc(100% - 4px) !important;
    max-width: calc(100% - 4px) !important;
    margin-left: 2px !important;
    margin-right: 2px !important;
    border-radius: 4px !important;
    max-height: none !important;
  }
}


/* ==================== 统一工具页面容器样式 ==================== */

/* 标准工具容器 - 嵌入式升级 2.0：保留毛玻璃，背景微透 */
.tool-container-standard {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 800px;
  /* 放宽容器，提升 Web 端阅读体验 */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px 24px 40px 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  will-change: transform, backdrop-filter;
  transform: translateZ(0);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  box-shadow: var(--shadow-soft), inset 0 1px 1px rgba(255, 255, 255, 0.6), inset 0 -1px 1px rgba(255, 255, 255, 0.2);
  animation: fadeInScale .4s var(--ease-bounce) forwards;
  overflow-y: visible;
  height: auto;
  max-height: none !important;
  /* 允许根据内容无限延伸 */
  min-height: 400px;
  /* 保持一个基础的体面高度 */
  -webkit-overflow-scrolling: touch;
}


/* --- 统一工具输入框样式 (全站生效) --- */
.tool-container-standard input,
.tool-container-standard select,
.tool-container-standard textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: var(--element-blur);
  -webkit-backdrop-filter: var(--element-blur);
  border: 1.5px solid var(--primary-color);
  border-radius: 12px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}


/* 针对 iOS 日期时间选择器的特殊优化，防止溢出并统一高度 */
.tool-container-standard input[type="date"],
.tool-container-standard input[type="datetime-local"],
.tool-container-standard input[type="time"] {
  min-width: 0;
  max-width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 46px;
  /* 显式高度以对齐普通输入框 */
  padding: 12px 16px;
  /* 显式内边距 */
  background: rgba(255, 255, 255, 0.05);
  /* 确保背景一致 */
  backdrop-filter: var(--element-blur);
  -webkit-backdrop-filter: var(--element-blur);
  line-height: normal;
  color-scheme: light dark;
  /* 适配系统亮暗色下的原生文本 */
}


/* 鼠标悬停：亮度提升 */
.tool-container-standard input:hover,
.tool-container-standard select:hover,
.tool-container-standard textarea:hover {
  border-color: var(--secondary-color);
  /* 悬停使用次要色(天青/蓝绿)微调 */
  background: var(--glass-bg-hover);
  box-shadow: 0 0 15px var(--mystic-glow);
}


/* 焦点状态：加强发光与浮起 */
.tool-container-standard input:focus,
.tool-container-standard select:focus,
.tool-container-standard textarea:focus {
  border-color: var(--primary-color);
  background: var(--glass-bg-hover);
  box-shadow: 0 0 0 4px var(--mystic-glow),
    0 0 25px var(--mystic-glow);
  transform: translateY(-2px);
}


/* 针对 Select 的箭头优化 */
.tool-container-standard select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230891b2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}


/* Placeholder 颜色 */
.tool-container-standard ::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}
@media (min-width: 768px) {

  .tool-container-standard {
    max-width: 800px;
    padding: 48px 40px;
  }
}
@media (max-width: 767px) {

  .tool-container-standard {
    width: calc(100% - 4px) !important;
    max-width: calc(100% - 4px) !important;
    margin-left: 2px !important;
    margin-right: 2px !important;
    padding: 32px 20px;
    border-radius: 4px !important;
  }
}


/* 统一页脚样式 */
.tool-footer {
  width: 100%;
  text-align: center;
  padding: 40px 20px;
  margin-top: 40px;
  color: var(--text-secondary);
  font-size: 14px;
  opacity: 0.8;
  box-sizing: border-box;
}