:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #151c2e;
  --bg-hover: #1e293b;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #1e293b;
  --border-bright: #2d3a52;
  --accent: #fbbf24;
  --accent-light: #fcd34d;
  --accent-dark: #d97706;
  --accent-bg: rgba(251, 191, 36, 0.08);
  --accent-glow: rgba(251, 191, 36, 0.3);
  --card-shadow: 0 2px 0 #000, 0 4px 12px rgba(0, 0, 0, 0.4);
  --header-bg: rgba(10, 14, 26, 0.95);
  --grid-color: rgba(251, 191, 36, 0.03);
}

[data-theme="light"] {
  --bg-primary: #f5f5f0;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f0ede6;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #999999;
  --border-color: #e0ddd5;
  --border-bright: #d0cdc5;
  --accent: #d97706;
  --accent-light: #b45309;
  --accent-dark: #92400e;
  --accent-bg: rgba(217, 119, 6, 0.06);
  --accent-glow: rgba(217, 119, 6, 0.15);
  --card-shadow: 0 2px 0 #c0bdb5, 0 4px 12px rgba(0, 0, 0, 0.08);
  --header-bg: rgba(255, 255, 255, 0.95);
  --grid-color: rgba(0, 0, 0, 0.03);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  font-family: 'Vazirmatn', sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  transition: background 0.4s, color 0.4s;
  overflow-x: hidden;  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.015) 2px,
    rgba(0, 0, 0, 0.015) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

[data-theme="light"] body::after {
  background: none;
}

button, a { font-family: 'Vazirmatn', sans-serif; }

.px {
  display: inline-block;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.px svg {
  display: block;
  shape-rendering: crispEdges;
  image-rendering: pixelated;
}

.px-24 { width: 24px; height: 24px; }.px-16 { width: 16px; height: 16px; }
.px-20 { width: 20px; height: 20px; }

.page { display: none; position: relative; z-index: 1; }
.page.active { display: block; animation: pageIn 0.3s ease; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ===== Header ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s, border-color 0.3s;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-logo-text {
  font-family: 'Press Start 2P', cursive;
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 3px;
  text-shadow: 2px 2px 0 var(--accent-dark);
}

.header-actions { display: flex; gap: 8px; align-items: center; }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 0 var(--border-color);
  position: relative;
  text-decoration: none;
}

.icon-btn:hover {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent-dark);
  box-shadow: 0 2px 0 var(--accent-dark);
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* ===== Main Content ===== */
.main-content { padding: 28px 24px 40px; max-width: 1000px; margin: 0 auto; }

.hero-gif {
  width: 100%;
  max-width: 420px;
  margin: 0 auto 32px;
  border-radius: 8px;
  overflow: hidden;  border: 3px solid var(--border-color);
  box-shadow: 0 4px 0 var(--border-color), 0 8px 24px rgba(0, 0, 0, 0.4);
  position: relative;
}

.hero-gif::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-gif img { width: 100%; height: auto; display: block; }

/* ===== Filter Tabs ===== */
.filter-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 32px;
  padding: 4px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
}

.tab {
  flex: 1;
  padding: 10px 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid transparent;
  transition: all 0.15s;
  background: transparent;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.5px;
}

.tab.active {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent-dark);
  box-shadow: 0 2px 0 var(--accent-dark);
}

.tab:hover:not(.active) {  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-bright);
}

/* ===== Sections ===== */
.section { margin-bottom: 40px; scroll-margin-top: 80px; }
.section.hidden { display: none; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--border-color);
}

.section-title {
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.view-all {
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.15s;
  padding: 6px 12px;
  border-radius: 4px;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-all:hover {
  background: var(--accent);
  color: var(--bg-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 0 var(--accent-dark);
}

/* ===== Cards Grid ===== */
.cards-grid {  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
  box-shadow: 0 3px 0 var(--border-color);
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 6px 0 var(--accent-dark), 0 12px 24px rgba(0, 0, 0, 0.3);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  border-bottom: 2px solid var(--border-color);
  transition: filter 0.2s;
}

.card:hover .card-img {
  filter: brightness(1.05) saturate(1.1);
}

.card-body { padding: 16px 18px; flex: 1; }

.card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.7;
}
.card-excerpt {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 18px;
  border-top: 2px dashed var(--border-color);
  background: var(--bg-secondary);
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 3px;
  font-weight: 700;
  border: 1px solid var(--accent);
  letter-spacing: 0.5px;
}

.card-price {
  font-size: 13px;
  font-weight: 900;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-price svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
/* ===== About Container ===== */
.page-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

.page-header {
  text-align: center;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 3px 0 var(--border-color);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent));
  animation: shimmer 3s infinite;
}

.page-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 2px;
  text-shadow: 1px 1px 0 var(--accent-dark);
}

.page-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===== About Cards ===== */
.about-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;  margin-bottom: 16px;
  transition: all 0.2s;
  box-shadow: 0 3px 0 var(--border-color);
}

.about-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--accent-dark);
}

.about-card h3 {
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 14px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-card p, .about-card li {
  font-size: 13px;
  line-height: 2.2;
  color: var(--text-secondary);
}

.about-card ul {
  list-style: none;
  padding: 0;
}

.about-card ul li {
  padding: 6px 0;
  padding-right: 22px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-card ul li::before {
  content: '';
  position: absolute;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--accent);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
/* ===== Footer ===== */
.footer {
  margin-top: 60px;
  background: var(--bg-secondary);
  border-top: 2px solid var(--border-color);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent));
  animation: shimmer 3s infinite;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px 24px;
}

.footer-quick {
  max-width: 560px;
  margin: 0 auto 32px;
  text-align: center;
}

.footer-col h4 {
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

/* ===== Footer Links - Grid 3x2 ===== */
.footer-links {
  list-style: none;
  padding: 0;  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.footer-links li {
  min-width: 0;
}

.footer-links a {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 4px;
  width: 100%;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  white-space: nowrap;
  box-shadow: 0 2px 0 var(--border-color);
}

.footer-links a:hover {
  color: var(--bg-primary);
  background: var(--accent);
  border-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 0 var(--accent-dark);
}

.footer-bottom {
  padding-top: 20px;
  border-top: 2px dashed var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copyright {
  font-size: 11px;
  color: var(--text-muted);  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-made {
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'Press Start 2P', cursive;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pixel-heart {
  display: inline-block;
  animation: heartbeat 1.5s infinite;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  transition: all 0.3s;
  z-index: 1001;
  pointer-events: none;
  border: 2px solid var(--accent);
  box-shadow: 0 3px 0 var(--accent-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .header { padding: 12px 16px; }
  .main-content { padding: 20px 16px 40px; }
  .header-logo-text { font-size: 12px; letter-spacing: 2px; }  .tab { padding: 8px 0; font-size: 10px; }
  .hero-gif { max-width: 100%; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cards-grid { grid-template-columns: 1fr; gap: 16px; }
  .page-container { padding: 20px 16px 40px; }
  .page-title { font-size: 11px; }
  .filter-tabs { gap: 4px; padding: 3px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-inner { padding: 32px 16px 20px; }
  .footer-links {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .footer-links a {
    font-size: 10px;
    padding: 8px 4px;
    gap: 4px;
  }
  .icon-btn { width: 36px; height: 36px; }
}
