@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@300;400;500;700&display=swap');

/* ===== CSS 变量 ===== */
:root {
  --red: #ff0000;
  --pink: #ff006e;
  --dark: #1a1a2e;
  --darker: #0d0d1a;
  --cyan: #00ffff;
  --yellow: #ffe600;
  --glass-bg: rgba(255,0,110,0.06);
  --glass-border: rgba(255,0,110,0.25);
  --text-primary: #f0e6ff;
  --text-secondary: #b0a0cc;
  --nav-h: 64px;
  --radius-card: 28px;
  --font-heading: 'Noto Naskh Arabic', 'Noto Sans Arabic', Georgia, serif;
  --font-body: 'Noto Sans Arabic', system-ui, -apple-system, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--darker);
  color: var(--text-primary);
}
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  background: var(--darker);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + 8px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pink); text-decoration: none; transition: color 0.2s, text-shadow 0.2s; }
a:hover { color: var(--cyan); text-shadow: 0 0 8px var(--cyan); }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--text-primary);
}
hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 0.75rem 0 1rem;
  box-shadow: 0 0 6px var(--pink);
}

/* ===== CRT 扫描线叠加 ===== */
.crt-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,0.18) 2px,
    rgba(0,0,0,0.18) 4px
  );
  mix-blend-mode: multiply;
}
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: repeating-linear-gradient(
    180deg,
    rgba(255,0,110,0.015) 0px,
    rgba(255,0,110,0.015) 1px,
    transparent 1px,
    transparent 4px
  );
  animation: scanMove 8s linear infinite;
}
@keyframes scanMove {
  0% { background-position: 0 0; }
  100% { background-position: 0 400px; }
}

/* ===== 点阵底纹 ===== */
.dot-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(255,0,110,0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.5;
}

/* ===== Glitch 文字效果 ===== */
.glitch-text {
  position: relative;
  display: inline-block;
}
.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.glitch-text::before {
  color: var(--cyan);
  animation: glitch1 3.5s infinite;
  clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
}
.glitch-text::after {
  color: var(--red);
  animation: glitch2 3.5s infinite;
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
}
@keyframes glitch1 {
  0%,90%,100% { transform: translate(0,0) skewX(0deg); opacity: 0; }
  92% { transform: translate(-3px,0) skewX(-4deg); opacity: 0.8; }
  95% { transform: translate(3px,0) skewX(4deg); opacity: 0.8; }
  97% { transform: translate(0,0); opacity: 0; }
}
@keyframes glitch2 {
  0%,85%,100% { transform: translate(0,0) skewX(0deg); opacity: 0; }
  87% { transform: translate(4px,1px) skewX(3deg); opacity: 0.7; }
  90% { transform: translate(-2px,0) skewX(-2deg); opacity: 0.7; }
  93% { transform: translate(0,0); opacity: 0; }
}

/* ===== 霓虹发光工具 ===== */
.neon-red { text-shadow: 0 0 8px var(--red), 0 0 20px var(--red); color: var(--red); }
.neon-pink { text-shadow: 0 0 8px var(--pink), 0 0 20px var(--pink); color: var(--pink); }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,26,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 0 24px rgba(255,0,110,0.15);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo:hover { text-shadow: none; }
.brand-icon { width: 36px; height: 36px; object-fit: contain; }
.brand-text-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--red), var(--pink));
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 0 12px var(--pink);
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--red), var(--pink), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header-tagline {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  display: none;
}
@media (min-width: 768px) {
  .header-tagline { display: block; }
}

/* ===== HERO ===== */
.hero-section {
  scroll-margin-top: 60px;
}
.hero-article {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 60% at 80% 50%, rgba(255,0,110,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 80% at 10% 50%, rgba(255,0,0,0.08) 0%, transparent 60%),
    var(--darker);
  padding: 4rem 1.5rem;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 3rem;
}
.hero-left {
  flex: 1;
  min-width: 0;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--pink);
  text-shadow: 0 0 8px var(--pink);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.hero-h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #fff 0%, var(--pink) 60%, var(--red) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 480px;
  margin-bottom: 2rem;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 40px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.25s;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
}
.neon-btn {
  background: linear-gradient(135deg, var(--red), var(--pink));
  color: #fff;
  box-shadow: 0 0 18px rgba(255,0,110,0.5), 0 0 40px rgba(255,0,0,0.2);
}
.neon-btn:hover {
  box-shadow: 0 0 28px rgba(255,0,110,0.8), 0 0 60px rgba(255,0,0,0.4);
  transform: translateY(-2px);
  color: #fff;
  text-shadow: none;
}
.hero-right {
  flex: 0 0 420px;
  max-width: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-right .hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  box-shadow: 0 0 40px rgba(255,0,110,0.35), 0 0 80px rgba(255,0,0,0.15);
  border: 1px solid var(--glass-border);
}
.hero-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-card);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  overflow: hidden;
}
.grid-art {
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255,0,110,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,0,110,0.15) 1px, transparent 1px);
  background-size: 40px 40px;
}

@media (max-width: 767px) {
  .hero-content { flex-direction: column; gap: 2rem; }
  .hero-right { flex: none; max-width: 100%; width: 100%; }
  .hero-article { min-height: auto; padding: 3rem 1rem 2rem; }
}

/* ===== 正文区 ===== */
.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.content-section section {
  scroll-margin-top: calc(var(--nav-h) + 8px);
}
.content-article { width: 100%; }
.content-with-aside {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}
.main-content { min-width: 0; }

/* 正文内部样式 */
.main-content h2 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0;
  color: var(--text-primary);
  text-shadow: 0 0 12px rgba(255,0,110,0.3);
}
.main-content h2 + hr {
  margin-bottom: 1.25rem;
}
.main-content h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--pink);
}
.main-content h3 + hr {
  margin-bottom: 1rem;
}
.main-content p {
  margin-bottom: 1.1rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.85;
}
.main-content section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 20px rgba(255,0,110,0.06);
  position: relative;
  overflow: hidden;
}
.main-content section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--pink), transparent);
}
.main-content ul, .main-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.main-content ul li { list-style: none; padding-left: 1rem; position: relative; margin-bottom: 0.4rem; }
.main-content ul li::before {
  content: '▸';
  position: absolute;
  left: -0.5rem;
  color: var(--pink);
  font-size: 0.8em;
}
.main-content ol { list-style: decimal; }
.main-content ol li { margin-bottom: 0.4rem; }
.main-content a {
  color: var(--pink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.main-content strong { color: var(--text-primary); font-weight: 600; }

@media (max-width: 900px) {
  .content-with-aside {
    grid-template-columns: 1fr;
  }
  .sidebar { order: -1; }
}

/* ===== 侧边栏 ===== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 80px;
}
.sidebar-card {
  padding: 1.5rem;
}
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 24px rgba(255,0,110,0.08), inset 0 0 0 1px rgba(255,255,255,0.04);
}
.sidebar-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--pink);
  text-shadow: 0 0 8px rgba(255,0,110,0.4);
  margin-bottom: 0;
}
.sidebar-nav-list li { margin-bottom: 0.4rem; }
.sidebar-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.3rem 0;
  display: block;
  transition: color 0.2s, padding-left 0.2s;
  font-family: var(--font-mono);
}
.sidebar-link:hover {
  color: var(--cyan);
  padding-left: 0.5rem;
}
.sidebar-tip p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== FOOTER ===== */
.site-footer {
  background: linear-gradient(180deg, rgba(26,26,46,0.98) 0%, rgba(13,13,26,1) 100%);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -4px 40px rgba(255,0,110,0.1);
  padding-bottom: calc(var(--nav-h) + 1rem);
}
.footer-top {
  text-align: center;
  padding: 3rem 1.5rem 1rem;
  overflow: hidden;
}
.footer-brand-mega {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, rgba(255,0,0,0.15), rgba(255,0,110,0.15));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  user-select: none;
  letter-spacing: -0.02em;
}
.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-col h4 + hr { margin-bottom: 0.75rem; }
.footer-col address {
  font-style: normal;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.footer-col address a { color: var(--pink); }
.footer-col ul li { margin-bottom: 0.35rem; }
.footer-col ul li a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color 0.2s;
  font-family: var(--font-mono);
  display: inline-block;
  min-height: 40px;
  line-height: 40px;
  padding: 0 0.25rem;
}
.footer-col ul li a:hover { color: var(--cyan); text-shadow: 0 0 6px var(--cyan); }
.footer-bottom {
  text-align: center;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(255,0,110,0.12);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== 底部固定导航条 ===== */
.footer-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(13,13,26,0.97);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -4px 24px rgba(255,0,110,0.2);
  backdrop-filter: blur(16px);
}
.bottom-nav-dl {
  display: flex;
  align-items: stretch;
  height: var(--nav-h);
  padding: 0 0.25rem;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.bottom-nav-dl::-webkit-scrollbar { display: none; }
.bottom-nav-brand {
  flex-shrink: 0;
  padding: 0 0.5rem;
  display: flex;
  align-items: center;
}
.bottom-nav-brand a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
}
.bottom-nav-brand .brand-icon,
.bottom-nav-brand .brand-text-icon {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}
.bottom-nav-dl dt {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
}
.bottom-nav-dl dt a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0 0.3rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
  border-radius: 8px;
}
.bottom-nav-dl dt a:hover {
  color: var(--pink);
  text-shadow: 0 0 6px var(--pink);
  background: rgba(255,0,110,0.08);
}
.bottom-nav-search {
  flex-shrink: 0;
  padding: 0 0.4rem;
  display: flex;
  align-items: center;
}
.search-form {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.search-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 0 0.85rem;
  font-size: 0.8rem;
  color: var(--text-primary);
  outline: none;
  width: 100px;
  font-family: var(--font-mono);
  transition: border-color 0.2s, box-shadow 0.2s;
  height: 44px;
}
.search-input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 8px rgba(255,0,110,0.3);
}
.search-input::placeholder { color: var(--text-secondary); }
.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s;
}
.search-btn:hover { background: rgba(255,0,110,0.12); }

/* ===== 页面内 section scroll margin ===== */
main section, main div section {
  scroll-margin-top: calc(var(--nav-h) + 72px);
}

/* ===== Parallax / 出场动画 ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero-left { animation: fadeSlideUp 0.7s ease both; }
  .hero-right { animation: fadeSlideUp 0.7s 0.15s ease both; }
  @keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .stagger-item.visible {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .glitch-text::before, .glitch-text::after { display: none; }
  .scanlines { animation: none; }
}

/* ===== 响应式兜底 ===== */
@media (max-width: 540px) {
  .bottom-nav-dl dt a { font-size: 0.65rem; padding: 0 0.15rem; }
  .search-input { width: 72px; }
  .content-section { padding: 2rem 1rem; }
  .main-content section { padding: 1.25rem; }
  .hero-h1 { font-size: 1.75rem; }
}

/* ===== 工具 ===== */
.wrap { width: 100%; }

button[aria-expanded]{min-width:44px;min-height:44px}
