/* ========================================
   nister.cn - Office Tools Collection
   Minimal & Clean Card Style
   ======================================== */

:root {
  --bg-page: #f5f5f7;
  --bg-card: #ffffff;
  --bg-card-hover: #fafafa;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --border-card: #e8e8ed;
  --border-card-hover: #d2d2d7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --tag-pdf: #fde8e8;
  --tag-pdf-text: #c41e1e;
  --tag-ocr: #e8f4fd;
  --tag-ocr-text: #0056a0;
  --tag-trans: #e8fdf0;
  --tag-trans-text: #00663b;
  --tag-img: #fdf0e8;
  --tag-img-text: #a05100;
  --tag-media: #f0e8fd;
  --tag-media-text: #6b21a8;
  --tag-util: #f0fdf4;
  --tag-util-text: #166534;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* ========================================
   Header / Navigation
   ======================================== */
.header {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid var(--border-card);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.logo-sub {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 400;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Search */
.search-box {
  position: relative;
}

.search-box input {
  width: 240px;
  padding: 8px 14px 8px 36px;
  border: 0.5px solid var(--border-card);
  border-radius: 20px;
  background: var(--bg-card);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
}

.search-box input::placeholder {
  color: var(--text-tertiary);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 14px;
  pointer-events: none;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  text-align: center;
  padding: 60px 24px 40px;
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #1d1d1f 0%, #0071e3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   Categories
   ======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.section {
  margin-bottom: 48px;
}

.section:last-child {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.section-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.section-count {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-left: auto;
}

/* Category-specific colors */
.section.doc .section-icon { background: var(--tag-pdf); }
.section.doc .section-title { color: var(--tag-pdf-text); }
.section.trans .section-icon { background: var(--tag-trans); }
.section.trans .section-title { color: var(--tag-trans-text); }
.section.img .section-icon { background: var(--tag-img); }
.section.img .section-title { color: var(--tag-img-text); }
.section.media .section-icon { background: var(--tag-media); }
.section.media .section-title { color: var(--tag-media-text); }
.section.util .section-icon { background: var(--tag-util); }
.section.util .section-title { color: var(--tag-util-text); }

/* ========================================
   Tool Cards Grid
   ======================================== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.tool-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.tool-card:active {
  transform: translateY(0);
}

.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.tool-name {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.tool-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.4;
  flex: 1;
}

.tool-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 12px;
  align-self: flex-start;
  font-weight: 500;
}

.badge-self {
  background: #e8f4fd;
  color: var(--tag-ocr-text);
}

.badge-link {
  background: #f5f5f7;
  color: var(--text-tertiary);
}

.badge-iframe {
  background: #f0fdf4;
  color: var(--tag-util-text);
}

/* Tool icon backgrounds */
.tool-card.pdf .tool-icon { background: #fde8e8; }
.tool-card.ocr .tool-icon { background: #e8f4fd; }
.tool-card.trans .tool-icon { background: #e8fdf0; }
.tool-card.img .tool-icon { background: #fdf0e8; }
.tool-card.media .tool-icon { background: #f0e8fd; }
.tool-card.util .tool-icon { background: #f0fdf4; }
.tool-card.ai .tool-icon { background: #fef3c7; }

/* ========================================
   Footer
   ======================================== */
.footer {
  border-top: 0.5px solid var(--border-card);
  padding: 32px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer p {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 14px; }
  .header-inner { padding: 12px 16px; }
  .search-box input { width: 180px; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (max-width: 480px) {
  .hero { padding: 40px 16px 30px; }
  .container { padding: 0 12px 40px; }
  .search-box { display: none; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tool-card { padding: 16px; }
  .tool-icon { width: 36px; height: 36px; font-size: 18px; margin-bottom: 10px; }
  .tool-name { font-size: 13px; }
  .tool-desc { font-size: 11px; }
}
