/* ============================================
   时予 - Luminous Utility Design System
   Dark Theme / Neon Lime Accent
   ============================================ */

/* CSS Variables */
:root {
  --surface: #131313;
  --surface-dim: #131313;
  --surface-bright: #3a3939;
  --surface-container-lowest: #0e0e0e;
  --surface-container-low: #1c1b1b;
  --surface-container: #201f1f;
  --surface-container-high: #2a2a2a;
  --surface-container-highest: #353534;
  --on-surface: #e5e2e1;
  --on-surface-variant: #bdcbae;
  --outline: #88957b;
  --outline-variant: #3e4a34;
  --primary: #fffff7;
  --on-primary: #163800;
  --primary-container: #7cff01;
  --on-primary-container: #347200;
  --neon-lime: #7cff01;
  --neon-lime-dim: #6ce000;
  --deep-obsidian: #050505;
  --surface-gray: #1e1e1e;
  --text-muted: #888888;
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-border-hover: rgba(255, 255, 255, 0.1);

  --font-headline: "Hanken Grotesk", "PingFang SC", "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "PingFang SC", "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--surface-container-lowest);
  color: var(--on-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  padding-bottom: 0;
}

::selection {
  background: rgba(124, 255, 1, 0.2);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font-family: inherit;
}

.material-symbols-outlined {
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

/* ============================================
   Atmosphere Background
   ============================================ */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.03;
  pointer-events: none;
  z-index: 100;
}

.atmosphere {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: var(--surface-container-lowest);
  overflow: hidden;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.mesh-blob {
  position: absolute;
  border-radius: 100%;
  filter: blur(120px);
  opacity: 0.15;
  transition: transform 2s ease-in-out;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: #064e3b;
  top: -10%;
  left: -10%;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: #1f2937;
  bottom: -5%;
  right: -5%;
}

.blob-3 {
  width: 400px;
  height: 400px;
  background: #064e3b;
  top: 40%;
  right: 10%;
  opacity: 0.08;
}

/* ============================================
   Utilities
   ============================================ */
.neon-text-gradient {
  background: linear-gradient(to bottom right, #7cff01, #b1ff6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 4px 24px -1px rgba(0, 0, 0, 0.2),
    inset 0 0 20px rgba(255, 255, 255, 0.01);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 80px;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  background: transparent;
}

.nav.scrolled {
  height: 64px;
  background: rgba(14, 14, 14, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-inner {
  width: 100%;
  max-width: 1200px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-headline);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--on-surface-variant);
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a.active {
  color: var(--neon-lime);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--neon-lime);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px rgba(124, 255, 1, 0.5);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--neon-lime);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: var(--radius-lg);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  border: none;
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(124, 255, 1, 0.3);
  transform: scale(1.02);
}

.btn-primary:active {
  transform: scale(0.96);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-lg {
  padding: 14px 36px;
  font-size: 15px;
  border-radius: var(--radius-lg);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 180px 24px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(124, 255, 1, 0.2);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--on-surface-variant);
  margin-bottom: 32px;
}

.hero-badge span {
  color: var(--neon-lime);
}

.hero-title {
  font-family: var(--font-headline);
  font-size: 56px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #fff;
  max-width: 900px;
  margin: 0 auto 32px;
}

.hero-desc {
  font-size: 17px;
  color: var(--on-surface-variant);
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.7;
  opacity: 0.8;
}

/* Search Box */
.search-box {
  display: flex;
  align-items: center;
  max-width: 640px;
  margin: 0 auto 32px;
  height: 64px;
  padding: 0 8px 0 20px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 4px 24px -1px rgba(0, 0, 0, 0.2),
    inset 0 0 20px rgba(255, 255, 255, 0.01);
  transition: all 0.5s ease;
}

.search-box:focus-within {
  border-color: rgba(124, 255, 1, 0.4);
}

.search-icon {
  color: var(--on-surface-variant);
  margin-right: 12px;
  transition: color 0.3s ease;
}

.search-box:focus-within .search-icon {
  color: var(--neon-lime);
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 16px;
  min-width: 0;
}

.search-box input::placeholder {
  color: var(--on-secondary-fixed-variant, #474746);
}

.search-btn {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  margin-right: 12px;
}

.search-btn:hover {
  background: var(--neon-lime);
  color: #000;
  border-color: var(--neon-lime);
}

.search-shortcut {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  flex-shrink: 0;
}

/* Filter Chips */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 80px;
}

.chip {
  padding: 10px 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--on-surface-variant);
  transition: all 0.3s ease;
  cursor: pointer;
}

.chip:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.chip.active {
  color: var(--neon-lime);
  background: rgba(124, 255, 1, 0.05);
  border-color: rgba(124, 255, 1, 0.3);
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 80px 0;
  position: relative;
  z-index: 10;
}

.section-header {
  margin-bottom: 48px;
}

.apps-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-title {
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 8px;
}

.section-accent {
  width: 48px;
  height: 3px;
  background: var(--neon-lime);
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.section-header .section-accent {
  margin-bottom: 12px;
}

.section-desc {
  color: var(--on-surface-variant);
  font-size: 16px;
  opacity: 0.7;
}

.filter-summary {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--on-surface-variant);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: var(--radius-md);
}

/* ============================================
   Grid Layout
   ============================================ */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

/* ============================================
   Tool Cards
   ============================================ */
.tool-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 40px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 4px 24px -1px rgba(0, 0, 0, 0.2),
    inset 0 0 20px rgba(255, 255, 255, 0.01);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
  text-align: left;
}

.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 128px;
  height: 128px;
  border-radius: 100%;
  background: var(--card-blob, rgba(124, 255, 1, 0.06));
  filter: blur(40px);
  opacity: 0.4;
  transform: translate(40%, -40%);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.tool-card:hover {
  transform: translateY(-8px);
  border-color: rgba(124, 255, 1, 0.2);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.tool-card:hover::before {
  opacity: 0.1;
}

.tool-card:hover .arrow-icon {
  transform: translate(4px, -4px);
  color: var(--neon-lime);
}

.tool-card:hover .tool-title {
  color: var(--neon-lime);
}

.tool-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.tool-icon-wrap .material-symbols-outlined {
  font-size: 28px;
}

.tool-title {
  font-family: var(--font-headline);
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

.tool-desc {
  font-size: 15px;
  color: var(--on-surface-variant);
  line-height: 1.7;
  opacity: 0.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tool-category {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  opacity: 0.5;
}

.arrow-icon {
  color: rgba(255, 255, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ============================================
   Category Filters
   ============================================ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.filter-btn {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  font-size: 14px;
  font-weight: 500;
  color: var(--on-surface-variant);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-body);
}

.filter-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-border-hover);
}

.filter-btn.active {
  background: rgba(124, 255, 1, 0.1);
  color: var(--neon-lime);
  border-color: rgba(124, 255, 1, 0.3);
}

.filter-btn .count {
  opacity: 0.6;
  font-size: 0.9em;
  margin-left: 6px;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  padding: 40px 0 100px;
  position: relative;
  z-index: 10;
}

.cta-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  padding: 64px;
  border-radius: 2.5rem;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(124, 255, 1, 0.05), transparent);
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

.cta-card:hover .cta-glow {
  opacity: 1;
}

.cta-content {
  flex: 1;
  position: relative;
  z-index: 1;
  text-align: center;
}

.cta-content h2 {
  font-family: var(--font-headline);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 24px;
}

.cta-content p {
  font-size: 17px;
  color: var(--on-surface-variant);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.7;
  opacity: 0.8;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.cta-visual {
  position: relative;
  width: 100%;
  max-width: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(124, 255, 1, 0.1);
  border-radius: 100%;
  filter: blur(80px);
  opacity: 0.4;
}

.icon-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  transform: rotate(-12deg);
  transition: transform 0.7s ease-out;
}

.cta-visual:hover .icon-grid {
  transform: rotate(0deg);
}

.icon-cell {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
}

.icon-cell .material-symbols-outlined {
  font-size: 24px;
  color: var(--neon-lime);
}

.icon-cell.dim .material-symbols-outlined {
  color: rgba(255, 255, 255, 0.4);
}

.icon-cell:nth-child(1),
.icon-cell:nth-child(3),
.icon-cell:nth-child(6),
.icon-cell:nth-child(8) {
  border-color: rgba(124, 255, 1, 0.2);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--glass-border);
  background: var(--surface-container-lowest);
  position: relative;
  z-index: 10;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.footer-brand img {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  opacity: 0.8;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-surface-variant);
  opacity: 0.5;
}

.footer-copy a {
  color: var(--on-surface-variant);
  transition: color 0.2s ease;
}

.footer-copy a:hover {
  color: var(--neon-lime);
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-size: 14px;
  color: var(--on-surface-variant);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--neon-lime);
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 20px;
  color: var(--on-surface-variant);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-xl);
  font-size: 15px;
}

/* ============================================
   Mobile Bottom Navigation
   ============================================ */
.mobile-nav {
  display: none;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .nav {
    height: 64px;
  }

  .nav-links {
    display: none;
  }

  .nav-actions .btn-primary {
    padding: 8px 16px;
    font-size: 13px;
  }

  .hero {
    padding: 120px 16px 0;
  }

  .hero-title {
    font-size: 34px;
  }

  .hero-desc {
    font-size: 15px;
    margin-bottom: 32px;
  }

  .search-box {
    height: 56px;
    padding: 0 6px 0 14px;
  }

  .search-box input {
    font-size: 15px;
  }

  .search-btn {
    padding: 8px 18px;
    font-size: 13px;
  }

  .search-shortcut {
    display: none;
  }

  .filter-chips {
    margin-bottom: 48px;
  }

  .section {
    padding: 48px 0;
  }

  .section-title {
    font-size: 26px;
  }

  .apps-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tool-card {
    padding: 28px;
  }

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

  .filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .cta-card {
    padding: 40px 24px;
    border-radius: var(--radius-xl);
  }

  .cta-content h2 {
    font-size: 28px;
  }

  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .icon-grid {
    gap: 12px;
  }

  .icon-cell {
    width: 52px;
    height: 52px;
  }

  .footer-inner {
    gap: 16px;
  }

  .footer-links {
    gap: 20px;
  }

  /* Mobile Bottom Nav */
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(14, 14, 14, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 50;
  }

  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    color: var(--on-surface-variant);
    font-size: 11px;
    font-weight: 500;
    gap: 4px;
    transition: color 0.2s;
  }

  .mobile-nav-item.active {
    color: var(--neon-lime);
  }

  .mobile-nav-item .material-symbols-outlined {
    font-size: 22px;
  }

  body {
    padding-bottom: 70px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-title {
    font-size: 28px;
  }

  .tool-card {
    padding: 24px;
  }

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