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

:root {
  --bg: #0a0a0f;
  --bg2: #0f0f1a;
  --bg3: #13131f;
  --surface: #1a1a2e;
  --surface2: #1e1e35;
  --border: rgba(255,255,255,0.07);
  --purple: #7c3aed;
  --blue: #2563eb;
  --purple-light: #a78bfa;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --radius: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

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

/* ─── Header ─── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon { width: 32px; height: 32px; }

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.logo-dot { color: var(--purple-light); }

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}

.site-nav a {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color .2s, background .2s;
}

.site-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.nav-highlight {
  color: var(--purple-light) !important;
  border: 1px solid rgba(124,58,237,0.25);
}

.nav-highlight:hover {
  background: rgba(124,58,237,0.12) !important;
  border-color: rgba(124,58,237,0.45);
}

/* ─── Language Switcher ─── */
.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.15);
  color: #fff;
}

.lang-flag { font-size: 1rem; line-height: 1; }
.lang-code { font-size: 0.8rem; letter-spacing: 0.5px; }

.lang-arrow {
  width: 10px; height: 6px;
  transition: transform .2s;
  opacity: 0.6;
}

.lang-switcher.open .lang-arrow { transform: rotate(180deg); }

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  min-width: 150px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  z-index: 200;
  animation: dropIn .15s ease;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lang-switcher.open .lang-dropdown { display: block; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: none;
  border-radius: 7px;
  color: var(--text-dim);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background .15s, color .15s;
  text-align: left;
}

.lang-option:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}

.lang-option.lang-active {
  background: rgba(124,58,237,0.15);
  color: var(--purple-light);
  font-weight: 600;
}

.lang-option span { font-size: 1.1rem; }

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

.members-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.btn-join {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: opacity .2s, transform .15s;
  white-space: nowrap;
}

.btn-join:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-lg {
  padding: 14px 36px;
  font-size: 1rem;
  border-radius: 10px;
}

.burger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: auto;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, rgba(124,58,237,0.12) 0%, transparent 70%),
              var(--bg);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 100px 24px 60px;
  max-width: 780px;
}

.hero-badge {
  display: inline-block;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  color: var(--purple-light);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  color: #fff;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--purple-light), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-dim);
  margin-bottom: 40px;
  line-height: 1.7;
}

.br-desk { display: block; }

/* Search */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 560px;
  margin: 0 auto 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}

.search-wrap:focus-within {
  border-color: rgba(124,58,237,0.5);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

.search-icon {
  position: absolute;
  left: 16px;
  width: 18px; height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
  padding: 14px 14px 14px 46px;
}

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

.search-btn {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
  border: none;
  padding: 10px 22px;
  margin: 6px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
  white-space: nowrap;
}

.search-btn:hover { opacity: 0.85; }

/* Tags */
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.tag {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

.tag:hover {
  background: rgba(124,58,237,0.15);
  border-color: rgba(124,58,237,0.4);
  color: var(--purple-light);
}

/* Scroll hint */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  animation: fadeInUp 1s ease 1s both;
}

.scroll-arrow {
  width: 20px; height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(6px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── Stats Bar ─── */
.stats-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 20px 24px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 32px;
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff, var(--purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ─── Sections ─── */
.section {
  padding: 80px 0;
}

.section-dark {
  background: var(--bg2);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.see-all {
  font-size: 0.875rem;
  color: var(--purple-light);
  transition: color .2s;
}

.see-all:hover { color: #fff; }

/* ─── Tutorial Cards ─── */
.cards-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--surface2) transparent;
}

.cards-scroll::-webkit-scrollbar { height: 4px; }
.cards-scroll::-webkit-scrollbar-track { background: transparent; }
.cards-scroll::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 4px; }

.tutorial-card {
  flex-shrink: 0;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  cursor: pointer;
}

.tutorial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border-color: rgba(124,58,237,0.3);
}

.card-thumb {
  position: relative;
  height: 150px;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  overflow: hidden;
}

.thumb-blender { background: linear-gradient(135deg, #1a0a00, #3d2000, #1a0a00); }
.thumb-ue5     { background: linear-gradient(135deg, #001030, #002060, #001030); }
.thumb-maya    { background: linear-gradient(135deg, #001a2e, #003366, #001a2e); }
.thumb-zbrush  { background: linear-gradient(135deg, #1a0020, #3d0050, #1a0020); }
.thumb-c4d     { background: linear-gradient(135deg, #200030, #4b0082, #200030); }

.card-3d-deco {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-size: 60px 60px;
}

.deco-1 { background-image: repeating-linear-gradient(0deg, #f5a623 0, #f5a623 1px, transparent 0, transparent 50%), repeating-linear-gradient(90deg, #f5a623 0, #f5a623 1px, transparent 0, transparent 50%); }
.deco-2 { background-image: repeating-linear-gradient(0deg, #0070f3 0, #0070f3 1px, transparent 0, transparent 50%), repeating-linear-gradient(90deg, #0070f3 0, #0070f3 1px, transparent 0, transparent 50%); }
.deco-3 { background-image: repeating-linear-gradient(0deg, #38bdf8 0, #38bdf8 1px, transparent 0, transparent 50%), repeating-linear-gradient(90deg, #38bdf8 0, #38bdf8 1px, transparent 0, transparent 50%); }
.deco-4 { background-image: repeating-linear-gradient(0deg, #e879f9 0, #e879f9 1px, transparent 0, transparent 50%), repeating-linear-gradient(90deg, #e879f9 0, #e879f9 1px, transparent 0, transparent 50%); }
.deco-5 { background-image: repeating-linear-gradient(0deg, #a78bfa 0, #a78bfa 1px, transparent 0, transparent 50%), repeating-linear-gradient(90deg, #a78bfa 0, #a78bfa 1px, transparent 0, transparent 50%); }

.card-tag {
  position: relative;
  z-index: 1;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.tag-blender  { background: rgba(245,166,35,0.2);  color: #fbbf24; border: 1px solid rgba(245,166,35,0.3); }
.tag-ue5      { background: rgba(0,112,243,0.2);   color: #60a5fa; border: 1px solid rgba(0,112,243,0.3); }
.tag-maya     { background: rgba(56,189,248,0.2);  color: #7dd3fc; border: 1px solid rgba(56,189,248,0.3); }
.tag-zbrush   { background: rgba(232,121,249,0.2); color: #e879f9; border: 1px solid rgba(232,121,249,0.3); }
.tag-c4d      { background: rgba(167,139,250,0.15);color: #c4b5fd; border: 1px solid rgba(167,139,250,0.3); }

.card-body { padding: 16px; }

.card-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-body p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

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

.meta-author strong { color: var(--text-dim); }

/* ─── Categories ─── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 16px;
}

.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: transform .2s, border-color .2s, background .2s;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124,58,237,0.4);
  background: var(--surface2);
}

.cat-icon { width: 44px; height: 44px; }

.category-card span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.category-card em {
  font-size: 0.72rem;
  font-style: normal;
  color: var(--text-muted);
}

/* ─── Split Layout ─── */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: start;
}

/* Articles */
.articles-list { display: flex; flex-direction: column; gap: 0; }

.article-row {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.article-row:last-child { border-bottom: none; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.art-tag {
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

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

.article-row h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.4;
}

.article-row h3 a {
  color: #fff;
  transition: color .2s;
}

.article-row h3 a:hover { color: var(--purple-light); }

.article-row p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Addons */
.addons-list { display: flex; flex-direction: column; gap: 16px; }

.addon-card {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color .2s, transform .2s;
}

.addon-card:hover {
  border-color: rgba(124,58,237,0.3);
  transform: translateX(3px);
}

.addon-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.addon-blender { background: rgba(245,166,35,0.1); }
.addon-c4d     { background: rgba(232,121,249,0.1); }

.addon-icon svg { width: 28px; height: 28px; }

.addon-info { flex: 1; min-width: 0; }

.addon-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.addon-header strong { font-size: 0.9rem; color: #fff; }

.badge {
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-blender { background: rgba(245,166,35,0.15); color: #fbbf24; }
.badge-c4d     { background: rgba(167,139,250,0.15); color: #c4b5fd; }

.addon-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.4;
}

.addon-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
}

.stars { color: #f59e0b; }
.stars em { font-style: normal; color: var(--text-muted); margin-left: 2px; }
.downloads { color: var(--text-muted); }

.btn-sm {
  margin-left: auto;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  color: var(--purple-light);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.btn-sm:hover {
  background: rgba(124,58,237,0.3);
  color: #fff;
}

/* ─── CTA Section ─── */
.cta-section {
  position: relative;
  overflow: hidden;
  padding: 100px 0;
  background: radial-gradient(ellipse at center, rgba(124,58,237,0.2) 0%, transparent 70%), var(--bg2);
  text-align: center;
}

#cta-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

.cta-inner {
  position: relative;
  z-index: 2;
}

.cta-inner h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.cta-inner p {
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 36px;
}

/* ─── Footer ─── */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding-top: 64px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.7;
}

.footer-brand .logo { margin-bottom: 4px; }

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color .2s;
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
  .split-layout { grid-template-columns: 1fr; }
  .split-right { order: -1; }
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  .header-right { display: none; }
  .burger { display: block; }

  .stats-inner { gap: 0; }
  .stat-item { padding: 8px 16px; }
  .stat-divider { height: 30px; }

  .categories-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom .container { flex-direction: column; gap: 6px; text-align: center; }

  .br-desk { display: none; }
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-inner { flex-wrap: wrap; }
  .stat-divider { display: none; }
  .stat-item { padding: 10px 20px; }
  .footer-links { grid-template-columns: 1fr 1fr; }
}
