/* ============================================================
   IA CODE STUDIO — Shared Clean Hub Pages Stylesheet
   Used by /3d-studios/, /marketing-widgets/, and /arcade/
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700;800;900&display=swap');

:root {
  --bg: #070912;
  --surface: rgba(15, 23, 42, 0.72);
  --surface-hover: rgba(22, 32, 56, 0.88);
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(139, 92, 246, 0.35);
  --text: #f8fafc;
  --muted: #94a3b8;
  --violet: #8b5cf6;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --emerald: #10b981;
  --amber: #f59e0b;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Subtle Ambient Glow */
.hub-bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 15% 10%, rgba(139, 92, 246, 0.14), transparent 65%),
    radial-gradient(ellipse 55% 45% at 85% 20%, rgba(6, 182, 212, 0.11), transparent 65%),
    radial-gradient(ellipse 50% 40% at 50% 95%, rgba(236, 72, 153, 0.08), transparent 65%);
}

/* Slim 64px Navbar */
.hub-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  padding: 0 24px;
  background: rgba(7, 9, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hub-nav-inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hub-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.6px;
  white-space: nowrap;
}

.hub-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
}

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

.hub-nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 9px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.hub-nav-link:hover,
.hub-nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.hub-nav-link.active {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.14);
}

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

.hub-lang-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}

.hub-lang-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.hub-lang-btn.active {
  background: rgba(139, 92, 246, 0.28);
  color: #fff;
}

.hub-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.hub-cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(6, 182, 212, 0.45);
}

.hub-mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Mobile Drawer */
.hub-mobile-drawer {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(7, 9, 18, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 22px;
  z-index: 99;
  flex-direction: column;
  gap: 8px;
}

.hub-mobile-drawer.open {
  display: flex;
}

.hub-mobile-drawer a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.hub-mobile-drawer a.active {
  border-color: var(--border-accent);
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.14);
}

/* Main Container */
.hub-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* Breadcrumb */
.hub-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.hub-breadcrumb a {
  color: #a78bfa;
  text-decoration: none;
  font-weight: 600;
}

.hub-breadcrumb a:hover {
  text-decoration: underline;
}

/* Hero */
.hub-hero {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 40px;
}

.hub-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hub-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hub-hero p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 650px;
  margin: 0 auto;
}

/* Filter Pills */
.hub-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

.hub-filter-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.hub-filter-pill:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.hub-filter-pill.active {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(139, 92, 246, 0.6);
  color: #fff;
}

/* Cards Grid */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
  margin-bottom: 56px;
}

.hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  backdrop-filter: blur(12px);
}

.hub-card:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

.hub-card.featured {
  border-color: rgba(6, 182, 212, 0.45);
  background: linear-gradient(155deg, rgba(6, 182, 212, 0.08), rgba(15, 23, 42, 0.85));
}

.hub-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.hub-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
}

.hub-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.hub-badge.free {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.hub-badge.pro {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.hub-badge.hot {
  background: rgba(6, 182, 212, 0.16);
  border-color: rgba(6, 182, 212, 0.4);
  color: #22d3ee;
}

.hub-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.32rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.hub-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
}

.hub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.hub-tag {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 3px 9px;
  border-radius: 6px;
}

.hub-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hub-btn-launch {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  transition: all 0.2s;
}

.hub-card:hover .hub-btn-launch,
.hub-card.featured .hub-btn-launch {
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  border-color: transparent;
}

.hub-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 14px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  transition: all 0.2s;
}

.hub-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Section Heading */
.hub-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.hub-section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.hub-section-header p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Compact Quick Links Strip */
.hub-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 56px;
}

.hub-mini-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: #fff;
  text-decoration: none;
  transition: all 0.2s;
}

.hub-mini-card:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateY(-2px);
}

.hub-mini-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.hub-mini-card strong {
  display: block;
  font-size: 0.92rem;
  color: #fff;
}

.hub-mini-card span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Bottom IDE Banner */
.hub-ide-callout {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 22px;
  padding: 36px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.hub-ide-callout h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.hub-ide-callout p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 580px;
}

/* Footer */
.hub-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  background: rgba(5, 7, 15, 0.85);
}

.hub-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.hub-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.hub-footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Arcade Welcome Gift Pill (Lives ONLY in /arcade/) */
.arcade-gift-pill {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), 0 0 20px rgba(245, 158, 11, 0.25);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s;
}

.arcade-gift-pill:hover {
  transform: translateY(-2px);
}

.arcade-gift-pill-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 4px;
  margin-left: 4px;
}

.arcade-gift-pill-close:hover {
  color: #fff;
}

.arcade-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.arcade-modal-overlay.active {
  display: flex;
}

.arcade-modal-card {
  background: linear-gradient(145deg, #0f172a, #030712);
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  border-radius: 22px;
  max-width: 440px;
  width: 100%;
  padding: 34px 28px;
  text-align: center;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
}

.arcade-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
}

.arcade-modal-close:hover {
  color: #fff;
}

@media (max-width: 960px) {
  .hub-nav-links {
    display: none;
  }
  .hub-mobile-toggle {
    display: inline-flex;
  }
}

@media (max-width: 600px) {
  .hub-navbar {
    padding: 0 14px;
  }
  .hub-brand span {
    font-size: 0.92rem;
  }
  .hub-cta-primary span.cta-label-long {
    display: none;
  }
  .hub-main {
    padding: 32px 16px 64px;
  }
  .hub-grid {
    grid-template-columns: 1fr;
  }
  .hub-ide-callout {
    padding: 24px 20px;
  }
}
