/* 全局样式重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue',
    'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC',
    'WenQuanYi Micro Hei', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

/* 响应式设计 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: calc(100vh - 80px);
  height: calc(100vh - 80px);
}

.container.full-width {
  max-width: none;
  padding: 0 30px;
  margin: 0;
  min-height: calc(100vh - 80px);
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .container.full-width {
    padding: 0;
  }
}

/* 工具卡片样式 */
.tool-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.tool-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.tool-description {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .tool-card {
    padding: 16px;
  }

  .tool-title {
    font-size: 16px;
  }

  .tool-description {
    font-size: 13px;
  }
}

/* 工具网格布局 */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

@media (max-width: 768px) {
  .tool-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 16px 0;
  }
}

/* 页面标题 */
.page-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin: 40px 0 20px;
  color: #1a1a1a;
}

@media (max-width: 768px) {
  .page-title {
    font-size: 24px;
    margin: 30px 0 16px;
  }
}

/* 导航栏 */
.navbar {
  background: white;
  padding: 16px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-container.full-width {
  max-width: none;
  padding: 0 30px;
  margin: 0;
}

.nav-brand {
  font-size: 24px;
  font-weight: 700;
  color: #007bff;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-link {
  color: #666;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #007bff;
}

.nav-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 15px;
  }

  .nav-brand {
    font-size: 20px;
  }

  .nav-title {
    display: none;
  }

  .nav-links {
    gap: 16px;
  }
}


/* 按钮基础样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #374151;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  user-select: none;
  white-space: nowrap;
  min-height: 32px;
  line-height: 1;
  vertical-align: middle;
}

.btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

/* 输入框切换按钮特殊样式 */
.btn-input-toggle {
  background: #0fd59d !important;
  border-color: #0fd59d !important;
  color: white !important;
}

.btn-input-toggle:hover {
  background: #0bc085 !important;
  border-color: #0bc085 !important;
  color: white !important;
}

.btn-input-toggle svg path {
  fill: white !important;
}

/* 时间戳显示样式 */
.timestamp-display {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f0f9ff;
  border: 1px solid #0ea5e9;
  border-radius: 6px;
  padding: 4px 10px;
  margin-right: 8px;
  font-size: 12px;
}

.timestamp-label {
  color: #0369a1;
  font-weight: 500;
}

.timestamp-value {
  color: #0c4a6e;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-weight: 600;
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background: #0366d6;
  color: white;
  border-color: #0366d6;
}

.btn-primary:hover {
  background: #0256cc;
  border-color: #0256cc;
}

.btn-danger {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

.btn-danger:hover {
  background: #c82333;
  border-color: #c82333;
}

.btn-success {
  background: #28a745;
  color: white;
  border-color: #28a745;
}

.btn-success:hover {
  background: #218838;
  border-color: #1e7e34;
}

.btn-warning {
  background: #fbbf24;
  color: white;
  border-color: #fbbf24;
}

.btn-warning:hover {
  background: #f59e0b;
  border-color: #f59e0b;
}

.btn-warning svg {
  fill: white !important;
}

.btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
  vertical-align: middle;
}

.btn span {
  font-size: 11px;
  line-height: 12px;
  vertical-align: middle;
}

/* 复选框样式 */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: #374151;
  margin: 0;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
}

/* 工具详情页 */
.tool-detail {
  background: white;
  border-radius: 12px;
  padding: 32px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tool-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.tool-name {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.tool-summary {
  color: #666;
  font-size: 16px;
  line-height: 1.6;
}

.tool-content {
  margin-top: 24px;
}

@media (max-width: 768px) {
  .tool-detail {
    padding: 20px;
    margin: 16px 0;
  }

  .tool-name {
    font-size: 24px;
  }

  .tool-summary {
    font-size: 15px;
  }
}


/* 响应式设计 */
@media (max-width: 768px) {

  .btn {
    padding: 4px 8px;
    font-size: 11px;
    min-height: 28px;
  }

  .btn svg {
    width: 12px;
    height: 12px;
  }

  .btn span {
    font-size: 10px;
  }
}

@media (max-width: 480px) {

  .btn {
    padding: 3px 6px;
    font-size: 10px;
    min-height: 24px;
  }

  .btn svg {
    width: 10px;
    height: 10px;
  }

  .btn span {
    font-size: 9px;
  }

  .checkbox-label {
    font-size: 12px;
  }
}

/* ============================================
   移动端响应式样式
   ============================================ */

/* 平板和移动设备 (768px 及以下) */
@media (max-width: 768px) {
    /* 按钮样式调整 */
    .btn {
        padding: 5px 8px;
        font-size: 11px;
        min-height: 28px;
        gap: 3px;
    }

    .btn svg {
        width: 12px;
        height: 12px;
    }

    .btn span {
        font-size: 10px;
    }
}

/* 小屏幕移动设备 (480px 及以下) */
@media (max-width: 480px) {

    /* 进一步缩小按钮 */
    .btn {
        padding: 4px 6px;
        font-size: 10px;
        min-height: 26px;
    }

    .btn svg {
        width: 11px;
        height: 11px;
    }

    .btn span {
        font-size: 9px;
    }
}

