/* Tools.go 页面专用样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  min-height: 100vh;
  display: flex;
}

/* 左侧分类导航 */
.sidebar {
  width: 240px;
  padding: 20px;
}

.sidebar-title {
  color: white;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  text-align: center;
}

.category-item {
  display: block;
  margin-bottom: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  text-decoration: none;
  color: #2c3e50;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
}

.category-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.category-item:hover::before,
.category-item.active::before {
  transform: scaleX(1);
}

.category-item:hover,
.category-item.active {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  background: rgba(255, 255, 255, 0.95);
}

.category-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-emoji {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 8px;
  flex-shrink: 0;
}

.category-info {
  flex: 1;
}

.category-name {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 2px;
}

.category-count {
  font-size: 11px;
  color: #6c757d;
}

.category-item.active .category-emoji {
  background: linear-gradient(135deg, #667eea, #764ba2);
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* 主内容区 */
.main-content {
  flex: 1;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 28px;
  color: white;
}

.hero {
  margin-bottom: 20px;
}

h1 {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 4px 8px rgba(0,0,0,0.3);
  background: linear-gradient(45deg, #fff, #f0f8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1em;
  opacity: 0.9;
  font-weight: 300;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
}

.stat-number {
  font-size: 1.4em;
  font-weight: 700;
  display: block;
}

.stat-label {
  font-size: 0.8em;
  opacity: 0.8;
  margin-top: 2px;
}

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.tool-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
}

.tool-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card-header {
  padding: 20px 16px 16px;
  text-align: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
}

.icon {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  transition: transform 0.3s ease;
}

.tool-card:hover .icon {
  transform: scale(1.05) rotate(2deg);
}

.card-header h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.2em;
  font-weight: 600;
}

.description {
  padding: 12px 16px;
  color: #555;
  font-size: 0.9em;
  line-height: 1.4;
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9em;
  border: none;
  border-radius: 0 0 12px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  background: linear-gradient(135deg, #5a6fd8, #6a42a0);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(102, 126, 234, 0.4);
}

.feature-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  font-size: 0.6em;
  padding: 2px 5px;
  border-radius: 8px;
  font-weight: 600;
}

.hidden {
  display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
  }
  .tools {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 2.2em;
  }
  .stats {
    gap: 12px;
  }
}