/* ============================================================
   Meik7 BLOG — Personal Cyber Security Blog & Shop
   Dark Theme · Neon Accents · Glass Morphism · Matrix Rain
   ============================================================ */

/* ---- 前台安全保护：禁用文本选中 ---- */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 允许表单元素正常选中（搜索框、评论区等） */
input, textarea, select, [contenteditable] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Backgrounds */
  --bg-primary: #0a0a0f;
  --bg-secondary: #0d1117;
  --bg-card: rgba(13, 17, 23, 0.85);
  --bg-card-hover: rgba(22, 27, 34, 0.92);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-nav: rgba(10, 10, 15, 0.78);

  /* Accent Colors — Matrix / Cyberpunk */
  --accent-primary: #00ff41;
  --accent-secondary: #00d4ff;
  --accent-warning: #ffaa00;
  --accent-danger: #ff3366;
  --accent-purple: #b44dff;

  /* Text */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #484f58;
  --text-accent: #00ff41;

  /* Borders */
  --border-subtle: rgba(48, 54, 61, 0.6);
  --border-glow: rgba(0, 255, 65, 0.25);
  --border-glow-cyan: rgba(0, 212, 255, 0.25);

  /* Shadows */
  --shadow-glow-green: 0 0 20px rgba(0, 255, 65, 0.15), 0 0 60px rgba(0, 255, 65, 0.05);
  --shadow-glow-cyan: 0 0 20px rgba(0, 212, 255, 0.15), 0 0 60px rgba(0, 212, 255, 0.05);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);

  /* Typography */
  --font-mono: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --nav-height: 64px;
  --max-width: 1280px;

  /* Admin panel aliases (maps to design-system tokens) */
  --bg: var(--bg-primary);
  --bg-input: var(--bg-secondary);
  --border: var(--border-subtle);
  --text: var(--text-primary);
  --text2: var(--text-secondary);
  --text-muted: var(--text-tertiary);
  --accent: var(--accent-primary);
  --danger: var(--accent-danger);
  --transition: var(--transition-base);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Matrix Rain Canvas */
#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.12;
}

/* Page Wrapper */
.page-wrapper {
  position: relative;
  z-index: 1;
  padding-top: var(--nav-height);
  min-height: 100vh;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

.gradient-text {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-purple {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-base);
}

.navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  border-bottom-color: var(--border-glow);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: var(--transition-base);
}

.nav-logo:hover {
  color: var(--accent-primary);
}

.logo-icon {
  font-size: 1.5rem;
  animation: pulse 2s ease-in-out infinite;
}

.logo-bracket {
  color: var(--accent-primary);
  opacity: 0.8;
}

.logo-slash {
  color: var(--accent-secondary);
  margin: 0 2px;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  list-style: none;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-primary);
  background: rgba(0, 255, 65, 0.06);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 1px;
  box-shadow: 0 0 8px var(--accent-primary);
}

.nav-icon {
  font-size: 1rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-sm);
  background: none;
  border: none;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-base);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - var(--nav-height));
  padding: var(--space-3xl) var(--space-lg);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0, 255, 65, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(0, 212, 255, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  margin-bottom: var(--space-xl);
  border: 1px solid var(--border-glow);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-primary);
  background: rgba(0, 255, 65, 0.04);
  animation: fadeInUp 0.6s ease-out;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-primary);
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease-out;
}

.hero-title .glitch-wrapper {
  display: inline-block;
  position: relative;
}

.hero-title .glitch-text {
  position: relative;
  color: var(--text-primary);
}

.hero-title .glitch-text::before,
.hero-title .glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-title .glitch-text::before {
  color: var(--accent-secondary);
  animation: glitch-top 2s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.hero-title .glitch-text::after {
  color: var(--accent-danger);
  animation: glitch-bottom 2.5s infinite linear alternate-reverse;
  clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

.hero-subtitle {
  max-width: 700px;
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  animation: fadeInUp 1s ease-out;
}

/* Typing Effect */
.typing-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
  font-family: var(--font-mono);
  font-size: 1rem;
  animation: fadeInUp 1.1s ease-out;
}

.typing-prefix {
  color: var(--accent-primary);
}

.typing-text {
  color: var(--text-secondary);
  border-right: 2px solid var(--accent-primary);
  padding-right: 4px;
  animation: blink-caret 0.75s step-end infinite;
  min-width: 1ch;
}

/* Hero CTA Buttons */
.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp 1.2s ease-out;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.94) !important;
  transition: transform 0.06s ease !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #00cc33);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 0 35px rgba(0, 255, 65, 0.4);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: scale(0.95);
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--border-glow);
}

.btn-outline:hover {
  background: rgba(0, 255, 65, 0.06);
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.15);
  transform: translateY(-2px);
}

.btn-outline-cyan {
  background: transparent;
  color: var(--accent-secondary);
  border: 1px solid var(--border-glow-cyan);
}

.btn-outline-cyan:hover {
  background: rgba(0, 212, 255, 0.06);
  border-color: var(--accent-secondary);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
  transform: translateY(-2px);
}

.btn-outline-purple {
  background: transparent;
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.4);
}

.btn-outline-purple:hover {
  background: rgba(167, 139, 250, 0.06);
  border-color: #a78bfa;
  box-shadow: 0 0 15px rgba(167, 139, 250, 0.15);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
}

.btn-icon {
  font-size: 1.1em;
}

/* ---------- Section Styles ---------- */
.section {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  background: rgba(0, 255, 65, 0.04);
}

.section-title {
  margin: var(--space-sm) 0;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-xl);
}

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-base);
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow-green), var(--shadow-card);
}

.card-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 255, 65, 0.08), rgba(0, 212, 255, 0.08));
}

.card-image-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.3;
  transition: var(--transition-base);
}

.card:hover .card-image-inner {
  opacity: 0.6;
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(10, 10, 15, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-primary);
  backdrop-filter: blur(6px);
}

.card-category {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(10, 10, 15, 0.85);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(6px);
}

.card-body {
  padding: var(--space-lg);
}

.card-title {
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.card-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.card-title a:hover {
  color: var(--accent-primary);
}

.card-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.card-tags {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-primary);
  background: rgba(0, 255, 65, 0.06);
  border: 1px solid rgba(0, 255, 65, 0.15);
  border-radius: 50px;
  transition: var(--transition-fast);
}

.tag:hover {
  background: rgba(0, 255, 65, 0.12);
}

.tag-cyan {
  color: var(--accent-secondary);
  background: rgba(0, 212, 255, 0.06);
  border-color: rgba(0, 212, 255, 0.15);
}

.tag-purple {
  color: var(--accent-purple);
  background: rgba(180, 77, 255, 0.06);
  border-color: rgba(180, 77, 255, 0.15);
}

.tag-danger {
  color: var(--accent-danger);
  background: rgba(255, 51, 102, 0.06);
  border-color: rgba(255, 51, 102, 0.15);
}

/* ---------- Blog Page ---------- */
.page-hero {
  padding: var(--space-xl) 0 var(--space-md);
  text-align: center;
  position: relative;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

/* Search */
.search-container {
  max-width: 560px;
  margin: 0 auto var(--space-md);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  outline: none;
  transition: var(--transition-base);
}

.search-box input:focus {
  border-color: var(--border-glow);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

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

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Category Filters */
.category-filters {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.filter-chip {
  padding: var(--space-xs) var(--space-md);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition-base);
  font-family: var(--font-sans);
}

.filter-chip:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.filter-chip.active {
  background: rgba(0, 255, 65, 0.08);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ---------- Product Page ---------- */
.product-card .card-image {
  height: 240px;
  background: linear-gradient(135deg, rgba(0, 255, 65, 0.06), rgba(180, 77, 255, 0.06));
}

.product-price {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin: var(--space-sm) 0;
}

.product-price .currency {
  font-size: 0.9rem;
  opacity: 0.7;
}

.product-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-md);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--accent-warning);
  font-size: 0.85rem;
}

.product-buy-btn {
  padding: 0.5rem 1.2rem;
  background: linear-gradient(135deg, var(--accent-primary), #00cc33);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-base);
  font-family: var(--font-sans);
}

.product-buy-btn:hover {
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
  transform: translateY(-1px);
}

/* Price Filter */
.price-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}

.price-filter label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.price-filter select {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  font-family: var(--font-sans);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 500px;
  width: 90%;
  position: relative;
  transform: translateY(20px);
  transition: var(--transition-base);
  max-height: 85vh;
  overflow-y: auto;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition-base);
}

.modal-close:hover {
  color: var(--accent-danger);
  border-color: var(--accent-danger);
  background: rgba(255, 51, 102, 0.08);
}

.modal-title {
  font-size: 1.3rem;
  margin-bottom: var(--space-md);
  padding-right: var(--space-2xl);
}

.modal-product-name {
  font-family: var(--font-mono);
  color: var(--accent-primary);
  margin-bottom: var(--space-sm);
}

.modal-price-display {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: var(--space-xl);
}

.modal-section {
  margin-bottom: var(--space-lg);
}

.modal-section h4 {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.payment-methods {
  display: flex;
  gap: var(--space-md);
}

.payment-tab {
  flex: 1;
  padding: var(--space-md);
  text-align: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  color: var(--text-secondary);
}

.payment-tab:hover,
.payment-tab.active {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(0, 255, 65, 0.06);
}

.payment-tab-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: var(--space-xs);
}

.qr-placeholder {
  width: 180px;
  height: 180px;
  margin: var(--space-lg) auto;
  background: var(--bg-glass);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.qr-placeholder .qr-icon {
  font-size: 2.5rem;
  opacity: 0.5;
}

.payment-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: var(--space-md);
  background: rgba(255, 170, 0, 0.06);
  border: 1px solid rgba(255, 170, 0, 0.2);
  border-radius: var(--radius-sm);
}

/* ---------- Travel Vlog Page ---------- */
.travel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--space-xl);
}

.travel-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-base);
  cursor: pointer;
}

.travel-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow-cyan);
  box-shadow: var(--shadow-glow-cyan), var(--shadow-card);
}

.travel-card-image {
  position: relative;
  width: 100%;
  height: 240px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(180, 77, 255, 0.08));
  overflow: hidden;
}

.travel-card-image-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  opacity: 0.25;
  transition: var(--transition-base);
}

.travel-card:hover .travel-card-image-inner {
  opacity: 0.5;
  transform: scale(1.08);
}

.travel-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-base);
}

.travel-card:hover .travel-play-btn {
  opacity: 1;
}

.travel-play-icon {
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 2px solid var(--accent-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent-secondary);
  transition: var(--transition-base);
}

.travel-card:hover .travel-play-icon {
  background: var(--accent-secondary);
  color: #000;
}

.travel-location {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(10, 10, 15, 0.85);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  color: var(--accent-secondary);
  backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.travel-location .loc-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-secondary);
  border-radius: 50%;
}

.travel-duration {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(10, 10, 15, 0.85);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  backdrop-filter: blur(6px);
}

.travel-card-body {
  padding: var(--space-lg);
}

.travel-card-title {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.travel-card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Travel Detail Modal */
.travel-detail-image {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(180, 77, 255, 0.1));
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.3;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-3xl);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-2xl);
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: var(--space-md);
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: var(--space-sm);
}

.footer-col ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: var(--transition-fast);
}

.footer-col ul li a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: var(--space-2xl) auto 0;
  padding: var(--space-lg) var(--space-lg) 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Animations ---------- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes glitch-top {
  0% { transform: translate(0); }
  2% { transform: translate(-2px, 2px); }
  4% { transform: translate(-1px, -1px); }
  6% { transform: translate(0); }
  100% { transform: translate(0); }
}

@keyframes glitch-bottom {
  0% { transform: translate(0); }
  3% { transform: translate(2px, -2px); }
  6% { transform: translate(-1px, 1px); }
  9% { transform: translate(0); }
  100% { transform: translate(0); }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--accent-primary); }
}

@keyframes scan-line {
  0% { top: -5%; }
  100% { top: 105%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: var(--transition-slow);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scan line effect for hero */
.scan-line {
  position: absolute;
  top: -5%;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.15), transparent);
  animation: scan-line 4s linear infinite;
  pointer-events: none;
  z-index: 2;
}

/* ---------- Page Transition ---------- */
.page-enter {
  animation: fadeIn 0.4s ease-out;
}

/* ---------- No Results ---------- */
.no-results {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-secondary);
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.3;
}

/* ---------- Toast Notification ---------- */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: 3000;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  color: var(--accent-primary);
  font-size: 0.88rem;
  box-shadow: var(--shadow-glow-green);
  transform: translateX(120%);
  transition: var(--transition-base);
  max-width: 360px;
}

.toast.show {
  transform: translateX(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .travel-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-subtle);
    padding: calc(var(--nav-height) + var(--space-lg)) var(--space-lg) var(--space-lg);
    transition: var(--transition-base);
    gap: var(--space-sm);
    backdrop-filter: blur(20px);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    width: 100%;
    padding: var(--space-md);
    font-size: 1rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .travel-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: var(--space-2xl) var(--space-lg);
  }

  .hero-title {
    font-size: 2rem;
  }

  .stats-bar {
    gap: var(--space-xl);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .category-filters {
    gap: var(--space-xs);
    padding: 0 var(--space-md);
  }

  .filter-chip {
    font-size: 0.75rem;
    padding: var(--space-xs) var(--space-sm);
  }

  .modal {
    padding: var(--space-lg);
    width: 95%;
  }

  .payment-methods {
    flex-direction: column;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

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

  .section {
    padding: var(--space-2xl) 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    flex-direction: column;
    gap: var(--space-md);
  }
}

/* ---------- Transition between pages ---------- */
.fade-transition {
  animation: pageIn 0.4s ease-out;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   Light Theme
   ================================================================ */
html.light-theme {
  --bg-primary: #f6f8fa;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(240, 242, 245, 0.95);
  --bg-glass: rgba(0, 0, 0, 0.02);
  --bg-nav: rgba(246, 248, 250, 0.9);
  --text-primary: #1a1a2e;
  --text-secondary: #57606a;
  --text-muted: #8b949e;
  --text-accent: #05944f;
  --border-subtle: rgba(208, 215, 222, 0.8);
  --border-glow: rgba(5, 148, 79, 0.3);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-glow-green: 0 0 20px rgba(5, 148, 79, 0.1);
}
html.light-theme .card { background: #ffffff; border-color: #d0d7de; }
html.light-theme .card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
html.light-theme .card-title a { color: #1a1a2e; }
html.light-theme .navbar { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
html.light-theme .search-box { background: #f0f2f5; border-color: #d0d7de; }
html.light-theme .search-box input { color: #1a1a2e; }
html.light-theme .filter-chip { background: #f0f2f5; color: #57606a; border-color: #d0d7de; }
html.light-theme .filter-chip.active { background: #05944f; color: #fff; border-color: #05944f; }
html.light-theme .btn-outline { border-color: #d0d7de; color: #1a1a2e; }
html.light-theme .detail-body { color: #1a1a2e; }
html.light-theme .detail-body h2, html.light-theme .detail-body h3 { color: #0d1117; }
html.light-theme #matrix-canvas { opacity: 0.15; }
html.light-theme .site-footer { background: rgba(246,248,250,0.9); }

/* ================================================================
   Mobile Responsive (≤768px)
   ================================================================ */
@media (max-width: 768px) {
  /* Navbar */
  .navbar { padding: 10px 16px; }
  .nav-links { gap: 8px; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .nav-links a { font-size: 0.75rem; padding: 4px 8px; }
  .nav-logo { font-size: 0.85rem; }
  .nav-icon { display: none; }

  /* Hero */
  .hero { padding: 60px 16px 40px !important; min-height: auto !important; }
  .hero h1 { font-size: 1.8rem !important; }
  .hero-subtitle { font-size: 0.9rem !important; }
  .hero-tagline { font-size: 0.7rem !important; }
  .hero-badge { font-size: 0.65rem !important; }
  .hero-stats { gap: 12px; flex-wrap: wrap; }
  .stat-number { font-size: 1.5rem !important; }
  .hero-cta { flex-wrap: wrap; gap: 8px; }

  /* Card grids */
  .card-grid, .product-grid, .travel-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 0 8px;
  }

  /* Category filter chips */
  .filter-bar { flex-wrap: wrap; gap: 6px; padding: 0 8px; }
  .filter-chip { font-size: 0.7rem; padding: 4px 10px; }

  /* Search */
  .search-box { width: 100% !important; margin: 8px 0; }
  .search-box input { font-size: 0.85rem; padding: 0.7rem 0.8rem 0.7rem 2.6rem; }

  /* Content sections */
  .section { padding: 32px 12px !important; }
  .section-header h2 { font-size: 1.2rem; }
  .section-header { flex-direction: column; gap: 8px; align-items: flex-start !important; }

  /* Footer */
  .footer-inner { flex-direction: column !important; gap: 24px !important; text-align: center; }
  .footer-brand { text-align: center; }
  .footer-col { min-width: auto !important; }
  .footer-bottom { font-size: 0.7rem; }

  /* Post detail page */
  .detail-container { padding: 20px 12px !important; }
  .detail-title { font-size: 1.3rem !important; line-height: 1.4; }
  .detail-body { font-size: 0.9rem !important; }
  .detail-meta { flex-wrap: wrap; gap: 8px; }
  .detail-meta span { font-size: 0.7rem; }
  .detail-tags { flex-wrap: wrap; }
  .detail-main-layout { flex-direction: column !important; gap: 16px !important; }
  #toc-container { width: 100% !important; position: relative !important; top: auto !important; max-height: 48px; overflow: hidden; }
  #toc-container.toc-collapsed { max-height: 48px; }
  #toc-container:not(.toc-collapsed) { max-height: 320px; overflow-y: auto; }
  #toc-nav { padding: 10px 14px !important; }
  .detail-footer { flex-direction: column !important; gap: 12px; }
  .prev-next-nav { flex-direction: column; gap: 8px; }
  #related-posts { grid-template-columns: 1fr !important; }

  /* Product detail */
  .product-hero { flex-direction: column !important; padding: 16px !important; }
  .product-hero img, .product-image { width: 100% !important; height: auto !important; }

  /* Travel detail */
  .travel-header { padding: 20px 12px !important; }
  .travel-gallery { grid-template-columns: repeat(2, 1fr) !important; }

  /* Video player */
  .video-player-wrapper { max-width: 100% !important; }
  video { max-width: 100% !important; height: auto !important; }

  /* Comment section */
  #comments-section { padding: 0 4px; }
  .detail-body img { max-width: 100% !important; height: auto !important; }

  /* Tab / modal */
  .modal-box { width: 95vw !important; padding: 16px !important; max-height: 90vh; }
  .form-row { grid-template-columns: 1fr !important; }

  /* Spacing */
  .divider { margin: 16px 0 !important; }
}
