/* ToolHub 现代化样式 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS变量定义 */
:root {
  --primary: #165DFF;
  --secondary: #36CFC9;
  --accent: #FF7D00;
  --success: #52C41A;
  --warning: #FAAD14;
  --danger: #FF4D4F;
  --dark: #1D2129;
  --dark-2: #4E5969;
  --light-1: #F2F3F5;
  --light-2: #E5E6EB;
  --light-3: #C9CDD4;
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* 基础样式重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.6;
  color: var(--dark);
  background-color: #fafafa;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 工具样式类 */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-blur {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: var(--transition);
  padding: 0.75rem 0;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand:hover {
  color: var(--primary);
  text-decoration: none;
}

.brand-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

/* 搜索框样式 */
.search-container {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--light-2);
  border-radius: 50px;
  background: var(--light-1);
  font-size: 0.875rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dark-2);
  font-size: 0.875rem;
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: white;
  text-decoration: none;
}

.btn-outline {
  background: white;
  color: var(--dark-2);
  border: 1px solid var(--light-2);
}

.btn-outline:hover {
  background: var(--light-1);
  color: var(--dark);
  text-decoration: none;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* 卡片样式 */
.card {
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.card-text {
  color: var(--dark-2);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--light-2);
}

/* 工具卡片样式 */
.tool-card {
  position: relative;
  overflow: hidden;
}

.tool-card .card-img {
  transition: transform 0.5s ease;
}

.tool-card:hover .card-img {
  transform: scale(1.1);
}

.tool-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
}

.tool-badge.hot {
  background: var(--danger);
}

.tool-badge.new {
  background: var(--accent);
}

.tool-badge.recommended {
  background: var(--success);
}

.tool-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--dark-2);
}

.tool-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.rating-stars {
  color: var(--warning);
}

/* 分类标签样式 */
.category-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  margin-bottom: 2rem;
}

.category-tab {
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  background: white;
  color: var(--dark-2);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--light-2);
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
}

.category-tab:hover,
.category-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  text-decoration: none;
}

/* 英雄区域样式 */
.hero {
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.05), rgba(54, 207, 201, 0.05));
  border-radius: var(--border-radius-lg);
  padding: 3rem 2rem;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(22, 93, 255, 0.1), transparent);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(54, 207, 201, 0.1), transparent);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--dark-2);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.hero-stat-label {
  font-size: 0.875rem;
  color: var(--dark-2);
  margin-top: 0.25rem;
}

/* 快速入口样式 */
.quick-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.quick-tool {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: white;
  border: 1px solid var(--light-2);
  border-radius: 50px;
  text-decoration: none;
  color: var(--dark);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.quick-tool:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--dark);
  text-decoration: none;
}

/* 网格布局 */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
}

/* 响应式工具类 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.pt-20 { padding-top: 5rem; }
.pb-16 { padding-bottom: 4rem; }

/* 页脚样式 */
.footer {
  background: var(--dark);
  color: var(--light-3);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: white;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--light-3);
  text-decoration: none;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid var(--dark-2);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--dark-2);
  color: var(--light-3);
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary);
  color: white;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease-out;
}

/* 移动端优化 */
@media (max-width: 767px) {
  .hero {
    padding: 2rem 1rem;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .quick-tools {
    justify-content: center;
  }
  
  .category-tabs {
    justify-content: flex-start;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* 加载状态 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 工具提示 */
.tooltip {
  position: relative;
  cursor: help;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: white;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* 模态框样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
  z-index: 2001;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--light-2);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
}

.modal-header button {
  color: var(--dark-2);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.modal-header button:hover {
  color: var(--dark);
}

.modal-body {
  padding: 1.5rem;
  max-height: calc(90vh - 180px);
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid var(--light-2);
  background: var(--light-1);
}

/* 表单组样式 */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
  font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--light-2);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  transition: var(--transition);
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
}

.form-group input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* 模态框动画 */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Toast 提示样式 */
.toast {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.5rem;
  z-index: 3000;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 400px;
  border-left: 4px solid var(--primary);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast-content i {
  font-size: 1.2rem;
}

.toast-success {
  border-left-color: var(--success);
}

.toast-success .toast-content i {
  color: var(--success);
}

.toast-error {
  border-left-color: var(--danger);
}

.toast-error .toast-content i {
  color: var(--danger);
}

.toast-warning {
  border-left-color: var(--warning);
}

.toast-warning .toast-content i {
  color: var(--warning);
}

.toast-info {
  border-left-color: var(--primary);
}

.toast-info .toast-content i {
  color: var(--primary);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .modal {
    padding: 0.5rem;
  }
  
  .modal-content {
    max-width: 100%;
    max-height: 95vh;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }
  
  .modal-footer {
    flex-direction: column-reverse;
  }
  
  .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }
  
  .toast {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}

/* 移动端菜单动画 */
.mobile-menu {
  background: white;
  border-top: 1px solid var(--light-2);
  box-shadow: var(--shadow);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu.show {
  max-height: 300px;
}

/* ===== 新增样式：毛玻璃效果和背景美化 ===== */

/* 背景装饰 */
.background-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.1), rgba(54, 207, 201, 0.1));
  filter: blur(40px);
  animation: float 20s ease-in-out infinite;
}

.bg-circle-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  left: -150px;
  animation-delay: 0s;
}

.bg-circle-2 {
  width: 400px;
  height: 400px;
  top: 60%;
  right: -200px;
  background: linear-gradient(135deg, rgba(255, 125, 0, 0.1), rgba(255, 77, 79, 0.1));
  animation-delay: -5s;
}

.bg-circle-3 {
  width: 250px;
  height: 250px;
  top: 30%;
  right: 20%;
  background: linear-gradient(135deg, rgba(82, 196, 26, 0.1), rgba(250, 173, 20, 0.1));
  animation-delay: -10s;
}

.bg-circle-4 {
  width: 350px;
  height: 350px;
  bottom: 10%;
  left: 30%;
  background: linear-gradient(135deg, rgba(54, 207, 201, 0.1), rgba(22, 93, 255, 0.1));
  animation-delay: -15s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-20px) rotate(120deg);
  }
  66% {
    transform: translateY(20px) rotate(240deg);
  }
}

/* 毛玻璃导航栏 */
.glass-navbar {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

.glass-navbar.scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
}

/* 毛玻璃页脚 */
.glass-footer {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1) !important;
}

/* 毛玻璃按钮 */
.glass-button {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

.glass-button:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
}

/* 英雄区域样式 */
.hero-section {
  background: linear-gradient(135deg, 
    rgba(22, 93, 255, 0.05) 0%, 
    rgba(54, 207, 201, 0.05) 50%, 
    rgba(255, 125, 0, 0.05) 100%);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  pointer-events: none;
}

/* 内容区域样式 */
.content-section {
  position: relative;
  padding: 3rem 0;
  margin: 0;
}

.content-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

/* 浅色区域 */
.section-light {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.9) 0%, 
    rgba(248, 250, 252, 0.9) 100%);
}

.section-light::before {
  background: linear-gradient(135deg, 
    rgba(22, 93, 255, 0.02) 0%, 
    rgba(54, 207, 201, 0.02) 100%);
}

/* 深色区域 */
.section-dark {
  background: linear-gradient(135deg, 
    rgba(248, 250, 252, 0.9) 0%, 
    rgba(241, 245, 249, 0.9) 100%);
}

.section-dark::before {
  background: linear-gradient(135deg, 
    rgba(54, 207, 201, 0.02) 0%, 
    rgba(255, 125, 0, 0.02) 100%);
}

/* 毛玻璃卡片 */
.glass-card {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  transform: translateY(-8px) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
  border-color: rgba(22, 93, 255, 0.3) !important;
}

/* 快速工具入口美化 */
.quick-tool {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem 2rem;
  text-decoration: none;
  color: var(--dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  min-width: 120px;
}

.quick-tool:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
  border-color: rgba(22, 93, 255, 0.3);
  text-decoration: none;
  color: var(--dark);
}

.quick-tool i {
  font-size: 2rem;
  transition: transform 0.3s ease;
}

.quick-tool:hover i {
  transform: scale(1.1);
}

.quick-tool span {
  font-weight: 600;
  font-size: 0.9rem;
}

/* 区域分隔线 */
.content-section:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(22, 93, 255, 0.1) 20%, 
    rgba(54, 207, 201, 0.1) 50%, 
    rgba(22, 93, 255, 0.1) 80%, 
    transparent 100%);
}

/* 响应式优化 */
@media (max-width: 768px) {
  .content-section {
    padding: 2rem 0;
  }
  
  .hero-section {
    margin-bottom: 1rem;
  }
  
  .quick-tool {
    min-width: 100px;
    padding: 1rem 1.5rem;
  }
  
  .bg-circle {
    display: none;
  }
}

/* 动画增强 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-section {
  animation: fadeInUp 0.6s ease-out;
}

.content-section:nth-child(even) {
  animation-delay: 0.2s;
}

.content-section:nth-child(odd) {
  animation-delay: 0.4s;
}

/* 卡片悬停效果增强 */
.card:not(.glass-card) {
  transition: all 0.3s ease;
}

.card:not(.glass-card):hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 网格布局优化 */
.grid {
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid {
    gap: 2rem;
  }
}

/* 标题样式增强 */
.content-section h3 {
  position: relative;
  padding-bottom: 0.5rem;
}

.content-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

/* 按钮悬停效果增强 */
.btn-outline:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: white !important;
  border-color: transparent !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(22, 93, 255, 0.3) !important;
}

/* 额外样式增强 */
/* 导航栏品牌图标增强 */
.navbar-brand .brand-icon {
  box-shadow: 0 4px 20px rgba(22, 93, 255, 0.3);
  transition: all 0.3s ease;
}

.navbar-brand:hover .brand-icon {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(22, 93, 255, 0.4);
}

/* 页面滚动时的导航栏效果 */
.navbar.scrolled .brand-icon {
  box-shadow: 0 2px 15px rgba(22, 93, 255, 0.2);
}

/* 内容区域阴影效果 */
.content-section {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 卡片内容增强 */
.glass-card .card-body {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

/* 工具统计信息美化 */
.tool-stats {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* 徽章样式增强 */
.badge {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 搜索框毛玻璃效果 */
.search-input {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 8px 32px rgba(22, 93, 255, 0.2) !important;
}

/* 移动端菜单毛玻璃效果 */
.mobile-menu {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

/* 返回顶部按钮增强 */
.back-to-top {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
}

.back-to-top:hover {
  background: rgba(255, 255, 255, 1) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
}

/* 页面加载动画 */
@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-section {
  animation: slideInFromBottom 0.8s ease-out;
}

/* 响应式毛玻璃效果调整 */
@media (max-width: 768px) {
  .glass-navbar,
  .glass-footer,
  .glass-button {
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
  }
  
  .glass-card {
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .glass-navbar {
    background: rgba(0, 0, 0, 0.8) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
  }
  
  .glass-footer {
    background: rgba(0, 0, 0, 0.8) !important;
    border-top-color: rgba(255, 255, 255, 0.1) !important;
  }
  
  .glass-card {
    background: rgba(0, 0, 0, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
  }
  
  .quick-tool {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
  }
  
  .quick-tool:hover {
    background: rgba(0, 0, 0, 0.9);
    color: white;
  }
}

/* 用户中心页面特定样式 */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--light-2);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.favorite-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--light-2);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.favorite-item:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.favorite-item .tool-info {
    flex: 1;
}

.favorite-item .tool-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.favorite-item .tool-description {
    font-size: 0.875rem;
    color: var(--dark-2);
}

.favorite-item .tool-actions {
    display: flex;
    gap: 0.5rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--light-2);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 255, 255, 0.95);
}

.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 头像样式增强 */
.user-avatar {
    position: relative;
    overflow: hidden;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(22, 93, 255, 0.3);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar .avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.user-avatar:hover .avatar-overlay {
    opacity: 1;
}

/* 用户凭据信息样式 */
#userCredentials {
    transition: all 0.3s ease;
    border-left: 3px solid var(--warning);
}

#userCredentials:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(2px);
}

#loginInfo {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    margin-top: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#userNameDisplay, #userPasswordDisplay {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--primary);
    font-weight: 600;
}

/* 信息图标动画 */
#userCredentials i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* ===== 首页移动端优化 ===== */
.responsive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

/* 小屏手机：一列布局，增大卡片间距 */
@media (max-width: 420px) {
  .responsive-grid {
    grid-template-columns: 1fr;
    gap: 1.0rem;
  }
}

/* 中等屏：3列 */
@media (min-width: 768px) {
  .responsive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

/* 大屏：6列（热门区特殊为4列） */
@media (min-width: 1024px) {
  .responsive-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.5rem;
  }
  .responsive-grid.hot-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* 标题在移动端略微减小字号，增加可读性 */
.home-hero-title {
  font-size: 2rem;
}
.home-hero-subtitle {
  font-size: 1rem;
}
@media (min-width: 768px) {
  .home-hero-title { font-size: 2.5rem; }
  .home-hero-subtitle { font-size: 1.1rem; }
}

/* 快速入口在小屏更紧凑 */
.quick-tools-wrap { row-gap: 0.75rem; }
.quick-tool { min-width: 110px; padding: 1.1rem 1.4rem; }
@media (max-width: 360px) {
  .quick-tool { min-width: 100px; padding: 1rem 1.2rem; }
}

/* 卡片中标题与描述的两行截断通用工具类 */
.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 图标圆背景稍微小一点以适配窄屏 */
.card-icon-circle i { font-size: 1.25rem !important; }

/* 区块头在小屏时按钮换行至下一行右对齐 */
.section-header { gap: .75rem; flex-wrap: wrap; }
.section-header .btn { margin-left: auto; }


/* ===== 页脚响应式优化 ===== */
.footer .footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer .footer-links {
  display: flex;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .footer .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }
  .footer .footer-links {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .footer .footer-links a {
    padding: 0.25rem 0.5rem; /* 增加触控区域 */
  }
}


/* ===== 页脚快速链接 ===== */
.footer-quick-links {
  margin: 1.25rem 0 1.5rem;
}
.footer-quick-links .ql-group {
  min-width: 220px; /* 保证每组内容宽度一致 */
}
.footer-quick-links .ql-title {
  font-weight: 600;
  color: var(--light-3);
  margin-bottom: 0.5rem;
}
.footer-quick-links .ql-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-quick-links .ql-list li a {
  display: inline-block;
  color: var(--light-3);
  text-decoration: none;
  padding: 0.25rem 0;
  font-size: 0.9rem;
}
.footer-quick-links .ql-list li a:hover {
  color: #fff;
}

/* 手机：横向滚动，一行显示三个分组（等宽），视觉为单行 */
@media (max-width: 640px) {
  .footer-quick-links {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr; /* 每列等宽 */
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }
  .footer-quick-links::-webkit-scrollbar { height: 6px; }
  .footer-quick-links::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }
  .footer-quick-links .ql-group { min-width: 70vw; } /* 三组在一屏基本可见，便于一行滑动浏览 */
}

/* 大于手机：三列等分网格，不需要滚动 */
@media (min-width: 641px) and (max-width: 1023px) {
  .footer-quick-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
  .footer-quick-links .ql-group { min-width: 0; }
}

@media (min-width: 1024px) {
  .footer-quick-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
  .footer-quick-links .ql-group { min-width: 0; }
}

/* ===== 页脚快速链接无横向滚动修正 ===== */
.footer-quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  overflow-x: visible; /* 禁止出现横向滚动条 */
}
.footer-quick-links .ql-group { min-width: 0; }
.footer-quick-links .ql-title { white-space: normal; }
.footer-quick-links .ql-list li a {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

@media (max-width: 640px) {
  .footer-quick-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }
  .footer-quick-links .ql-title { font-size: 0.95rem; }
  .footer-quick-links .ql-list li a { font-size: 0.85rem; padding: 0.2rem 0; }
}


/* ===== 页脚顶部区域：品牌+描述 + 快速链接 ===== */
.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr; /* 左品牌 右链接 */
  gap: 1.5rem;
  align-items: start;
  margin: 1.5rem 0 1rem;
}
.footer-brand-title {
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}
.footer-brand-desc {
  color: var(--light-3);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* 手机端：上下两行（品牌在上、链接在下） */
@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr; /* 单列 */
    gap: 1rem;
  }
  .footer-brand { text-align: center; }
  .footer-brand-desc { font-size: 0.9rem; }
}