/* ==========================================================================
   WEBXR HUB — Modern Dark Cyberpunk & Spatial Computing Theme
   High-tech styling for WebXR, Three.js, Babylon.js & WebGPU
   ========================================================================== */

:root {
  --wx-bg: #06070e;
  --wx-surface: #0c0e1c;
  --wx-surface-hover: #13172e;
  --wx-border: rgba(0, 240, 255, 0.16);
  --wx-border-hover: rgba(0, 240, 255, 0.45);
  --wx-cyan: #00f0ff;
  --wx-violet: #8b5cf6;
  --wx-pink: #ec4899;
  --wx-text: #f1f5f9;
  --wx-muted: #94a3b8;
  --wx-code-bg: #080a14;
}

html.mode-webxr, body.mode-webxr {
  background-color: var(--wx-bg) !important;
  color: var(--wx-text) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.18), transparent 70%),
    radial-gradient(circle at 10% 20%, rgba(0, 240, 255, 0.06), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.05), transparent 40%);
  background-attachment: fixed;
}

/* Typography Headings */
.mode-webxr h1, 
.mode-webxr h2, 
.mode-webxr h3, 
.mode-webxr .brand,
.mode-webxr .wx-heading {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.03em;
  color: #ffffff;
}

/* Header & Navigation */
.mode-webxr .site-header {
  background: rgba(6, 7, 14, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--wx-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.mode-webxr .brand {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, #00f0ff 0%, #a855f7 60%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-webxr .brand::before {
  content: '⬡';
  font-size: 1.4rem;
  -webkit-text-fill-color: #00f0ff;
}

.mode-webxr .site-header nav a {
  color: var(--wx-muted);
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.mode-webxr .site-header nav a:hover {
  color: var(--wx-cyan);
}

/* WebXR Hub Dedicated Custom Header */
.wx-site-header {
  background: rgba(6, 7, 14, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--wx-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.wx-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.wx-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.wx-brand:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.wx-brand-logo {
  height: 44px;
  width: auto;
  display: block;
}

.wx-desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.wx-desktop-nav a {
  color: var(--wx-muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.wx-desktop-nav a:hover {
  color: var(--wx-cyan);
}

.wx-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wx-btn-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #00f0ff, #8b5cf6);
  color: #06070e !important;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 18px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
  transition: all 0.2s ease;
}

.wx-btn-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.45);
}

.wx-mobile-menu {
  display: none;
}

@media (max-width: 860px) {
  .wx-desktop-nav,
  .wx-header-actions {
    display: none;
  }
  .wx-mobile-menu {
    display: block;
    position: relative;
  }
  .wx-mobile-menu summary {
    list-style: none;
    cursor: pointer;
    background: var(--wx-surface);
    border: 1px solid var(--wx-border);
    color: var(--wx-text);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
  }
  .wx-mobile-menu nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: #0c0e1c;
    border: 1px solid var(--wx-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  }
  .wx-mobile-menu nav a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 6px 0;
  }
  .wx-mobile-menu nav a:hover {
    color: var(--wx-cyan);
  }
}

/* Hero Section */
.mode-webxr .wx-hero {
  max-width: 1180px;
  margin: 40px auto 30px;
  padding: 60px 24px;
  text-align: center;
  position: relative;
}

.mode-webxr .wx-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--wx-cyan);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

.mode-webxr .wx-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.08;
  font-weight: 800;
  margin: 0 auto 20px;
  max-width: 950px;
  background: linear-gradient(180deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mode-webxr .wx-hero h1 span.gradient-text {
  background: linear-gradient(135deg, #00f0ff 0%, #8b5cf6 60%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mode-webxr .wx-hero p.lead {
  font-size: 1.22rem;
  color: var(--wx-muted);
  max-width: 720px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.mode-webxr .wx-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.mode-webxr .wx-pill {
  padding: 8px 16px;
  background: var(--wx-surface);
  border: 1px solid var(--wx-border);
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #e2e8f0;
  transition: all 0.2s ease;
}

.mode-webxr .wx-pill:hover {
  border-color: var(--wx-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
  transform: translateY(-2px);
}

/* Post Cards Grid */
.mode-webxr .post-card {
  background: var(--wx-surface);
  border: 1px solid var(--wx-border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}

.mode-webxr .post-card:hover {
  transform: translateY(-5px);
  border-color: var(--wx-border-hover);
  box-shadow: 0 15px 35px rgba(0, 240, 255, 0.12), 0 0 20px rgba(139, 92, 246, 0.1);
}

.mode-webxr .post-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-bottom: 1px solid var(--wx-border);
}

.mode-webxr .post-card-content {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mode-webxr .post-card-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wx-cyan);
  background: rgba(0, 240, 255, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.mode-webxr .post-card h3 {
  font-size: 1.18rem;
  line-height: 1.35;
  margin: 0 0 10px;
  color: #ffffff;
}

.mode-webxr .post-card p {
  color: var(--wx-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 16px;
}

.mode-webxr .post-card-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

/* Article Page Styling */
.mode-webxr .wx-article-container {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.mode-webxr .wx-breadcrumb {
  font-size: 0.86rem;
  color: var(--wx-muted);
  margin-bottom: 24px;
}

.mode-webxr .wx-breadcrumb a {
  color: var(--wx-muted);
  transition: color 0.2s;
}

.mode-webxr .wx-breadcrumb a:hover {
  color: var(--wx-cyan);
}

.mode-webxr .wx-article-header h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 40%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mode-webxr .wx-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-size: 0.9rem;
  color: var(--wx-muted);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--wx-border);
  margin-bottom: 30px;
}

.mode-webxr .wx-article-cover {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--wx-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  margin-bottom: 36px;
}

.mode-webxr .wx-article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Answer-First Box */
.mode-webxr .wx-quick-answer {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid var(--wx-cyan);
  border-left: 5px solid var(--wx-cyan);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.1);
}

.mode-webxr .wx-quick-answer strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wx-cyan);
  margin-bottom: 8px;
}

.mode-webxr .wx-quick-answer p {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.6;
  color: #ffffff;
  font-weight: 500;
}

/* Key Takeaways Box */
.mode-webxr .wx-takeaways {
  background: var(--wx-surface);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
}

.mode-webxr .wx-takeaways h3 {
  font-size: 1.1rem;
  color: #c084fc;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-webxr .wx-takeaways ul {
  margin: 0;
  padding-left: 20px;
}

.mode-webxr .wx-takeaways li {
  margin-bottom: 10px;
  color: #e2e8f0;
  line-height: 1.55;
}

/* Article Body */
.mode-webxr .wx-body {
  font-size: 1.12rem;
  line-height: 1.8;
  color: #cbd5e1;
}

.mode-webxr .wx-body h2 {
  font-size: 1.85rem;
  margin-top: 48px;
  margin-bottom: 20px;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.mode-webxr .wx-body h3 {
  font-size: 1.4rem;
  margin-top: 36px;
  margin-bottom: 16px;
  color: #e2e8f0;
}

.mode-webxr .wx-body p {
  margin-bottom: 24px;
}

.mode-webxr .wx-body a {
  color: var(--wx-cyan);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.mode-webxr .wx-body a:hover {
  color: #ffffff;
}

.mode-webxr .wx-body code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(0, 240, 255, 0.08);
  color: var(--wx-cyan);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.mode-webxr .wx-body pre {
  background: var(--wx-code-bg);
  border: 1px solid var(--wx-border);
  border-radius: 10px;
  padding: 20px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  color: #e2e8f0;
  line-height: 1.6;
  margin: 28px 0;
}

.mode-webxr .wx-body pre code {
  background: transparent;
  padding: 0;
  border: 0;
  color: inherit;
}

.mode-webxr .wx-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 0.96rem;
  background: var(--wx-surface);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--wx-border);
}

.mode-webxr .wx-body th {
  background: rgba(0, 240, 255, 0.1);
  color: #ffffff;
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--wx-border);
  font-weight: 700;
}

.mode-webxr .wx-body td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

.mode-webxr .wx-body tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* FAQ Accordion */
.mode-webxr .wx-faq {
  margin: 50px 0;
  background: var(--wx-surface);
  border: 1px solid var(--wx-border);
  border-radius: 14px;
  padding: 30px;
}

.mode-webxr .wx-faq h2 {
  margin-top: 0;
  color: #ffffff;
  font-size: 1.6rem;
  margin-bottom: 24px;
}

.mode-webxr .wx-faq details {
  background: rgba(6, 7, 14, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s;
}

.mode-webxr .wx-faq details[open] {
  border-color: var(--wx-border);
}

.mode-webxr .wx-faq summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  color: #ffffff;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mode-webxr .wx-faq summary::-webkit-details-marker {
  display: none;
}

.mode-webxr .wx-faq summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--wx-cyan);
  transition: transform 0.2s;
}

.mode-webxr .wx-faq details[open] summary::after {
  content: '−';
}

.mode-webxr .wx-faq details p {
  padding: 0 20px 18px;
  margin: 0;
  color: var(--wx-muted);
  line-height: 1.65;
}

/* Author Box */
.mode-webxr .wx-author-box {
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--wx-surface);
  border: 1px solid var(--wx-border);
  border-radius: 14px;
  padding: 24px;
  margin: 48px 0;
}

.mode-webxr .wx-author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--wx-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.mode-webxr .wx-author-info strong {
  display: block;
  font-size: 1.15rem;
  color: #ffffff;
}

.mode-webxr .wx-author-info small {
  display: block;
  color: var(--wx-cyan);
  font-weight: 600;
  margin-bottom: 8px;
}

.mode-webxr .wx-author-info p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--wx-muted);
  line-height: 1.5;
}

/* Strategic CTA */
.mode-webxr .wx-cta {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(0, 240, 255, 0.15) 100%);
  border: 1px solid var(--wx-border-hover);
  border-radius: 16px;
  padding: 36px;
  margin: 50px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.mode-webxr .wx-cta h3 {
  font-size: 1.65rem;
  margin-top: 0;
  margin-bottom: 14px;
  color: #ffffff;
}

.mode-webxr .wx-cta p {
  color: var(--wx-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.mode-webxr .wx-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00f0ff 0%, #8b5cf6 100%);
  color: #06070e !important;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none !important;
  transition: all 0.25s ease;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.35);
}

.mode-webxr .wx-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.6);
  filter: brightness(1.1);
}
