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





/* 真实玻璃效果工具容器 - 嵌入式升级 3.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: var(--background-blur);
  -webkit-backdrop-filter: var(--background-blur);
  will-change: transform, backdrop-filter;
  transform: translateZ(0);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  box-shadow: var(--shadow-medium), 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);
}


/* 以下为工具通用样式 */
.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(-1px);
}


/* 针对 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;
}

/* =========================================
   工具页指南与文章通用排版 (SEO文章/引导说明)
   包含折叠面板 Accordion 样式
   ========================================= */
.tool-article-guide {
    width: 100%;
    max-width: 1000px;
    margin: 60px auto 20px;
    padding: 30px 20px 0;
    box-sizing: border-box;
    border-top: 1px dashed var(--glass-border);
    line-height: 1.8;
    color: var(--text-primary);
    text-align: left;
}

.tool-article-guide > h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 0;
    color: var(--text-primary);
}

/* Accordion (details / summary) 样式 - 极简嵌入风格 */
.tool-article-guide details {
    margin-bottom: 16px;
}

.tool-article-guide summary {
    font-size: 16px;
    font-weight: 600;
    padding: 8px 0;
    cursor: pointer;
    list-style: none; /* 隐藏默认箭头 */
    display: flex;
    align-items: center;
    color: var(--text-primary);
    transition: color 0.2s;
    user-select: none;
}

.tool-article-guide details[open] summary {
    color: var(--primary-color);
}

.tool-article-guide summary::-webkit-details-marker {
    display: none; /* Safari 隐藏箭头 */
}

.tool-article-guide summary:hover {
    color: var(--primary-color);
}

/* 自定义左侧箭头 */
.tool-article-guide summary::before {
    content: '▶';
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
    margin-right: 8px;
    display: inline-block;
}

.tool-article-guide details[open] summary::before {
    transform: rotate(90deg);
    color: var(--primary-color);
}

/* 折叠内容区 */
.tool-article-guide-content {
    padding: 8px 0 8px 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tool-article-guide-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 16px 0 10px;
    color: var(--text-primary);
}

.tool-article-guide-content p {
    margin-bottom: 12px;
}

.tool-article-guide-content p:last-child {
    margin-bottom: 0;
}

.tool-article-guide-content ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.tool-article-guide-content ul li {
    margin-bottom: 6px;
}

.tool-article-guide-content ul li b {
    color: var(--primary-color);
    font-weight: 600;
}

.tool-article-guide-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed var(--glass-border);
    text-align: right;
    font-size: 14px;
    color: var(--text-secondary);
}

.tool-article-guide-footer a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.tool-article-guide-footer a:hover {
    color: var(--secondary-color);
}

.tool-article-guide-footer a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--secondary-color);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.tool-article-guide-footer a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

@media (max-width: 768px) {
    .tool-article-guide {
        padding: 20px 16px;
        border-radius: 12px;
        margin: 30px auto 16px;
    }
}