/* ==========================================================================
   j360More - Official GitHub Pages Stylesheet
   Theme: Modern Cyber Gaming / Dark Xbox Neon
   ========================================================================== */

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1f242d;
  --bg-card-hover: #262c36;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(16, 124, 65, 0.4);
  
  --xbox-green: #107c41;
  --xbox-neon: #10cf65;
  --xbox-glow: rgba(16, 207, 101, 0.25);
  
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  
  --accent-blue: #58a6ff;
  --accent-purple: #bc8cff;
  --accent-amber: #d29922;
  --accent-red: #f85149;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--xbox-glow);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: clip;
  position: relative;
}

/* Background grid effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 50% 10%, rgba(16, 124, 65, 0.15), transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(16, 207, 101, 0.08), transparent 35%);
  pointer-events: none;
  z-index: -1;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  filter: drop-shadow(0 2px 6px rgba(16, 207, 101, 0.4));
}

.logo span {
  color: var(--xbox-neon);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--xbox-neon);
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
  list-style: none;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  transition: all 0.2s ease;
}

.nav-dropdown-toggle:hover,
.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown.active .nav-dropdown-toggle {
  color: var(--xbox-neon);
  background: rgba(16, 207, 101, 0.08);
}

.nav-dropdown-toggle svg {
  transition: transform 0.25s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle svg,
.nav-dropdown.active .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #161b22;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  min-width: 190px;
  list-style: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu li {
  width: 100%;
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  white-space: nowrap;
  transition: all 0.15s ease;
  text-decoration: none;
}

.nav-dropdown-menu a:hover {
  background: rgba(16, 207, 101, 0.12);
  color: var(--xbox-neon);
}

.btn-nav {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease !important;
}

.btn-nav:hover {
  border-color: var(--xbox-neon) !important;
  background: var(--bg-card-hover);
  box-shadow: 0 0 10px var(--xbox-glow);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Language Switcher */
.lang-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  color: #000000;
  background: var(--xbox-neon);
  box-shadow: 0 0 10px var(--xbox-glow);
}

.lang-divider {
  color: var(--text-muted);
  font-size: 0.75rem;
  opacity: 0.5;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 5rem 1.5rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.badge-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: rgba(16, 207, 101, 0.15);
  border: 1px solid rgba(16, 207, 101, 0.4);
  color: var(--xbox-neon);
}

.badge-secondary {
  background: rgba(88, 166, 255, 0.15);
  border: 1px solid rgba(88, 166, 255, 0.4);
  color: var(--accent-blue);
}

.hero-title {
  font-size: 3.25rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -1px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, var(--xbox-neon) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--xbox-neon) 0%, var(--xbox-green) 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--xbox-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(16, 207, 101, 0.4);
}

.btn-outline {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--xbox-neon);
  transform: translateY(-2px);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.controller-preview-card {
  position: relative;
  background: linear-gradient(145deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  text-align: center;
  width: 100%;
  max-width: 440px;
}

.controller-preview-card img {
  width: 100%;
  max-width: 340px;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
  animation: float 5s ease-in-out infinite;
}

.controller-tag {
  margin-top: 1rem;
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  background: rgba(16, 124, 65, 0.2);
  border: 1px solid rgba(16, 207, 101, 0.3);
  font-size: 0.85rem;
  color: var(--xbox-neon);
  font-weight: 600;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ==========================================================================
   Highlight Bar / Stats
   ========================================================================== */
.stats-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 2.5rem 1.5rem;
}

.stats-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--xbox-neon);
  margin-bottom: 0.25rem;
}

.stat-item p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.section {
  padding: 6rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--xbox-neon);
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-sm), 0 0 20px rgba(16, 207, 101, 0.1);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(16, 124, 65, 0.2);
  border: 1px solid rgba(16, 207, 101, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--xbox-neon);
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   Drivers & Requirements Section (CRITICAL FOCUS)
   ========================================================================== */
.drivers-section {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
  padding: 6rem 1.5rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

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

.drivers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.driver-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.3s ease;
}

.driver-card.mandatory {
  border-color: rgba(16, 207, 101, 0.4);
  box-shadow: 0 0 25px rgba(16, 124, 65, 0.15);
}

.driver-card.recommended {
  border-color: rgba(88, 166, 255, 0.4);
  box-shadow: 0 0 25px rgba(88, 166, 255, 0.1);
}

.driver-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.driver-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.driver-badge-tag {
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.driver-badge-tag.obligatory {
  background: rgba(16, 207, 101, 0.2);
  color: var(--xbox-neon);
  border: 1px solid rgba(16, 207, 101, 0.5);
}

.driver-badge-tag.optional {
  background: rgba(88, 166, 255, 0.2);
  color: var(--accent-blue);
  border: 1px solid rgba(88, 166, 255, 0.5);
}

.driver-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.driver-author {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.driver-body {
  margin-bottom: 2rem;
}

.driver-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.driver-purpose-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.driver-purpose-box h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.driver-purpose-box.vigem h4 {
  color: var(--xbox-neon);
}

.driver-purpose-box.hidhide h4 {
  color: var(--accent-blue);
}

.driver-purpose-box p {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.driver-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.driver-bullets li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.driver-bullets li::before {
  content: "✓";
  color: var(--xbox-neon);
  font-weight: bold;
}

.driver-footer {
  margin-top: auto;
}

.btn-driver-download {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.btn-driver-download.vigem {
  background: rgba(16, 207, 101, 0.15);
  border: 1px solid rgba(16, 207, 101, 0.5);
  color: var(--xbox-neon);
}

.btn-driver-download.vigem:hover {
  background: var(--xbox-neon);
  color: #000000;
  box-shadow: 0 4px 18px var(--xbox-glow);
}

.btn-driver-download.hidhide {
  background: rgba(88, 166, 255, 0.15);
  border: 1px solid rgba(88, 166, 255, 0.5);
  color: var(--accent-blue);
}

.btn-driver-download.hidhide:hover {
  background: var(--accent-blue);
  color: #000000;
  box-shadow: 0 4px 18px rgba(88, 166, 255, 0.3);
}

/* System Requirements Spec Table */
.requirements-card {
  margin-top: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.requirements-card h3 {
  font-size: 1.35rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.requirements-table {
  width: 100%;
  border-collapse: collapse;
}

.requirements-table th, 
.requirements-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.requirements-table th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.requirements-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  width: 25%;
}

.requirements-table td:last-child {
  color: var(--text-secondary);
}

/* ==========================================================================
   Quick Start Steps
   ========================================================================== */
.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  position: relative;
}

.step-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(16, 207, 101, 0.2);
  line-height: 1;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Code Snippet Box */
.code-box {
  background: #000000;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--xbox-neon);
}

.copy-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-grid {
  display: grid;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: var(--border-accent);
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--xbox-neon);
  transition: transform 0.2s ease;
}

.faq-item.active .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ==========================================================================
   CTA Banner
   ========================================================================== */
.cta-banner {
  background: linear-gradient(135deg, rgba(16, 124, 65, 0.3) 0%, rgba(22, 27, 34, 0.9) 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  margin: 4rem auto;
  max-width: 1000px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.cta-banner h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-banner p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  padding: 3.5rem 1.5rem 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand h4 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand p {
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 400px;
}

.footer-col h5 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Media queries moved to the end of stylesheet for proper cascade override */

/* ==========================================================================
   Screenshots Showcase & Lightbox Modal
   ========================================================================== */
.screenshots-section {
  padding: 5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.25rem;
  margin-top: 2.5rem;
}

.screenshot-card {
  background: linear-gradient(160deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.screenshot-card:hover {
  transform: translateY(-6px);
  border-color: var(--xbox-neon);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

.window-mockup {
  position: relative;
  background: #11141a;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.window-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.window-dot.red { background: #ff5f56; }
.window-dot.yellow { background: #ffbd2e; }
.window-dot.green { background: #27c93f; }

.window-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screenshot-img-wrapper {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #000000;
}

.screenshot-zoomable {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.screenshot-img-wrapper:hover .screenshot-zoomable {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.screenshot-overlay {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--xbox-neon);
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.25s ease;
  pointer-events: none;
}

.screenshot-img-wrapper:hover .screenshot-overlay {
  opacity: 1;
  transform: translateY(0);
}

.screenshot-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.screenshot-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(16, 207, 101, 0.12);
  color: var(--xbox-neon);
  border: 1px solid rgba(16, 207, 101, 0.3);
}

.screenshot-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.screenshot-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Interactive Image Switcher in Screenshot Card */
.image-switch-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 4px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  margin-left: auto;
}

.img-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.img-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.img-tab-btn.active {
  background: var(--xbox-neon);
  color: #0b0f14;
  font-weight: 700;
}

.card-mini-thumbs {
  display: flex;
  gap: 6px;
  align-items: center;
}

.mini-thumb {
  width: 44px;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  padding: 0;
  border: 2px solid var(--border-color);
  background: #000;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-thumb:hover {
  opacity: 0.9;
  border-color: rgba(16, 207, 101, 0.6);
}

.mini-thumb.active {
  opacity: 1;
  border-color: var(--xbox-neon);
  box-shadow: 0 0 8px rgba(16, 207, 101, 0.4);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.92);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 1100px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lightbox-content img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), var(--shadow-glow);
  border: 1px solid var(--border-color);
}

.lightbox-caption {
  color: var(--text-primary);
  font-size: 0.95rem;
  text-align: center;
  background: rgba(22, 27, 34, 0.85);
  padding: 6px 18px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.lightbox-counter {
  background: rgba(16, 207, 101, 0.15);
  color: var(--xbox-neon);
  border: 1px solid rgba(16, 207, 101, 0.35);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2010;
}

.lightbox-close:hover {
  color: var(--xbox-neon);
  border-color: var(--xbox-neon);
  transform: scale(1.08);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 2015;
  backdrop-filter: blur(8px);
}

.lightbox-nav:hover {
  color: var(--xbox-neon);
  border-color: var(--xbox-neon);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 18px rgba(16, 207, 101, 0.45);
}

.lightbox-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
  left: 28px;
}

.lightbox-next {
  right: 28px;
}

/* ==========================================================================
   Comprehensive Responsive System (Mobile, Tablet & Small Screens)
   ========================================================================== */

/* 1. Prevent any accidental horizontal overflow */
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
}

/* 2. Navigation Breakpoint (Tablets & Mobile < 980px) */
@media (max-width: 980px) {
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
  }

  .menu-toggle:hover {
    border-color: var(--xbox-neon);
    color: var(--xbox-neon);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 75px);
    overflow-y: auto;
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1.5rem 1.25rem 2rem;
    gap: 0.6rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  }

  .nav-links.show {
    display: flex;
    animation: navSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    text-align: center;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
  }

  .nav-links li a:hover {
    background: rgba(16, 207, 101, 0.15);
    color: var(--xbox-neon);
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    box-shadow: none;
    min-width: 100%;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    margin: 0.35rem 0 0.5rem;
    border-radius: var(--radius-sm);
  }

  .nav-dropdown-menu a {
    justify-content: center;
    padding: 0.65rem 1rem;
    text-align: center;
  }

  .nav-links .lang-switch-wrapper {
    margin: 0.4rem auto;
    width: fit-content;
    justify-content: center;
    padding: 0.35rem 1rem;
  }

  .nav-links .btn-nav {
    justify-content: center;
    padding: 0.85rem 1rem;
    background: var(--bg-card);
  }
}

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

/* 3. Medium Screens (< 960px) */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 3.5rem 1.25rem 3rem;
    gap: 2.5rem;
  }

  .hero-content {
    align-items: center;
  }

  .badge-wrapper {
    justify-content: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .drivers-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
}

/* 4. Mobile Screens (< 768px) */
@media (max-width: 768px) {
  .hero {
    padding: 2.25rem 1rem 2rem;
    gap: 2rem;
  }

  .hero-title {
    font-size: clamp(1.9rem, 7.5vw, 2.5rem);
    letter-spacing: -0.5px;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    padding: 0 0.25rem;
    line-height: 1.6;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
  }

  .badge-wrapper {
    gap: 0.4rem;
  }

  .badge {
    font-size: 0.72rem;
    padding: 0.25rem 0.6rem;
  }

  .controller-preview-card {
    max-width: 100%;
    padding: 0;
  }

  /* General sections */
  .section {
    padding: 3.5rem 1rem;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .section-title {
    font-size: 1.7rem;
    line-height: 1.25;
  }

  .section-desc {
    font-size: 0.95rem;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .feature-card {
    padding: 1.5rem 1.25rem;
  }

  .feature-card h3 {
    font-size: 1.15rem;
  }

  /* Screenshots Gallery */
  .screenshots-section {
    padding: 3.5rem 1rem;
  }

  .screenshots-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .screenshot-info {
    padding: 1.25rem;
  }

  .screenshot-title {
    font-size: 1.1rem;
  }

  .screenshot-desc {
    font-size: 0.88rem;
  }

  /* Drivers */
  .drivers-section {
    padding: 3.5rem 1rem;
  }

  .driver-card {
    padding: 1.5rem 1.25rem;
  }

  .driver-title {
    font-size: 1.5rem;
  }

  .driver-desc {
    font-size: 0.92rem;
  }

  .btn-driver-download {
    font-size: 0.85rem;
    padding: 0.85rem 0.6rem;
    text-align: center;
  }

  /* Requirements Table converted into clean mobile cards */
  .requirements-card {
    padding: 1.5rem 1rem;
    margin-top: 2rem;
  }

  .requirements-card h3 {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
  }

  .table-responsive {
    width: 100%;
  }

  .requirements-table,
  .requirements-table tbody,
  .requirements-table tr,
  .requirements-table td {
    display: block;
    width: 100%;
  }

  .requirements-table thead {
    display: none;
  }

  .requirements-table tr {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
  }

  .requirements-table tr:last-child {
    margin-bottom: 0;
  }

  .requirements-table td {
    border: none;
    padding: 0.35rem 0;
    font-size: 0.88rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: right;
  }

  .requirements-table td.req-comp {
    color: var(--xbox-neon);
    font-size: 1.05rem;
    font-weight: 700;
    text-align: left;
    display: block;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .requirements-table td:not(.req-comp)::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 95px;
    text-align: left;
    padding-top: 1px;
  }

  /* Steps / Quickstart */
  .steps-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .step-card {
    padding: 1.5rem 1.25rem;
  }

  .code-box {
    max-width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
  }

  /* FAQ */
  .faq-question {
    padding: 1rem 1.25rem;
    font-size: 0.98rem;
  }

  .faq-answer {
    padding: 0 1.25rem 1rem;
    font-size: 0.88rem;
  }

  /* CTA Banner */
  .cta-banner {
    margin: 2.5rem 1rem;
    padding: 2.5rem 1.25rem;
  }

  .cta-banner h2 {
    font-size: 1.55rem;
    line-height: 1.3;
  }

  .cta-banner p {
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
  }

  .cta-banner .btn {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }

  /* Footer */
  .footer {
    padding: 2.5rem 1rem 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  /* Lightbox on mobile */
  .lightbox-modal {
    padding: 1rem 0.5rem;
  }

  .lightbox-content img {
    max-height: 72vh;
  }

  .lightbox-caption {
    font-size: 0.85rem;
    padding: 6px 12px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }

  .lightbox-nav {
    width: 42px;
    height: 42px;
    background: rgba(13, 17, 23, 0.92);
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }
}

/* 5. Extra Small Devices (< 480px) */
@media (max-width: 480px) {
  .logo span {
    font-size: 1.1rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stat-item h3 {
    font-size: 1.6rem;
  }

  .stat-item p {
    font-size: 0.78rem;
  }

  .driver-header {
    flex-direction: column;
    gap: 0.6rem;
  }

  .requirements-table td {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.2rem;
  }

  .requirements-table td:not(.req-comp)::before {
    margin-bottom: 0.15rem;
  }
}

/* ==========================================================================
   Dual Emulation Section (Xbox 360 & DualShock 4)
   ========================================================================== */
.dual-emulation-section {
  position: relative;
}

.dual-controllers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.25rem;
  margin-top: 2.5rem;
}

.dual-controller-card {
  background: linear-gradient(165deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.dual-controller-card.xbox-card:hover {
  transform: translateY(-6px);
  border-color: var(--xbox-neon);
  box-shadow: 0 16px 40px rgba(16, 124, 65, 0.25), 0 0 20px rgba(16, 207, 101, 0.15);
}

.dual-controller-card.ds4-card:hover {
  transform: translateY(-6px);
  border-color: #38bdf8;
  box-shadow: 0 16px 40px rgba(56, 189, 248, 0.25), 0 0 20px rgba(56, 189, 248, 0.15);
}

.dual-controller-card.dualsense-card:hover {
  transform: translateY(-6px);
  border-color: #818cf8;
  box-shadow: 0 16px 40px rgba(129, 140, 248, 0.25), 0 0 20px rgba(129, 140, 248, 0.15);
}

.dual-controller-card.switch-card:hover {
  transform: translateY(-6px);
  border-color: #ff4b55;
  box-shadow: 0 16px 40px rgba(255, 75, 85, 0.25), 0 0 20px rgba(255, 75, 85, 0.15);
}

.dual-controller-card.joycon-card:hover {
  transform: translateY(-6px);
  border-color: #00c3e3;
  box-shadow: 0 16px 40px rgba(0, 195, 227, 0.25), 0 0 20px rgba(255, 69, 84, 0.2);
}

.dual-controller-card.elite-card:hover {
  transform: translateY(-6px);
  border-color: #f59e0b;
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.25), 0 0 20px rgba(245, 158, 11, 0.15);
}

.dual-controller-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.dual-badge {
  padding: 0.4rem 0.95rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dual-badge.xbox-badge {
  background: rgba(16, 207, 101, 0.15);
  color: var(--xbox-neon);
  border: 1px solid rgba(16, 207, 101, 0.4);
}

.dual-badge.ds4-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.dual-badge.dualsense-badge {
  background: rgba(129, 140, 248, 0.15);
  color: #818cf8;
  border: 1px solid rgba(129, 140, 248, 0.4);
}

.dual-badge.switch-badge {
  background: rgba(255, 75, 85, 0.15);
  color: #ff4b55;
  border: 1px solid rgba(255, 75, 85, 0.4);
}

.dual-count-pill {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.dual-svg-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 1rem;
  margin-bottom: 1.5rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  border-radius: var(--radius-md);
  min-height: 220px;
}

.dual-controller-svg {
  max-width: 100%;
  max-height: 200px;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
  transition: transform 0.4s ease, filter 0.4s ease;
}

.xbox-card:hover .dual-controller-svg {
  transform: scale(1.05);
  filter: drop-shadow(0 12px 28px rgba(16, 207, 101, 0.35));
}

.ds4-card:hover .dual-controller-svg {
  transform: scale(1.05);
  filter: drop-shadow(0 12px 28px rgba(56, 189, 248, 0.35));
}

.dualsense-card:hover .dual-controller-svg {
  transform: scale(1.05);
  filter: drop-shadow(0 12px 28px rgba(129, 140, 248, 0.35));
}

.switch-card:hover .dual-controller-svg {
  transform: scale(1.05);
  filter: drop-shadow(0 12px 28px rgba(255, 75, 85, 0.35));
}

.driver-purpose-box.viiper {
  border-left: 3px solid #bc8cff;
  background: rgba(188, 140, 255, 0.05);
}

.btn-driver-download.viiper {
  background: rgba(188, 140, 255, 0.12);
  color: #d8b4fe;
  border: 1px solid rgba(188, 140, 255, 0.35);
}

.btn-driver-download.viiper:hover {
  background: rgba(188, 140, 255, 0.25);
  border-color: #bc8cff;
  color: #fff;
}

.driver-badge-tag.default-tag {
  background: rgba(16, 207, 101, 0.15);
  color: var(--xbox-neon);
  border: 1px solid rgba(16, 207, 101, 0.35);
}

.driver-badge-tag.alternative-tag {
  background: rgba(88, 166, 255, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(88, 166, 255, 0.35);
}

.driver-badge-tag.hidmaestro-tag {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.driver-purpose-box.hidmaestro {
  border-left: 3px solid #38bdf8;
  background: rgba(56, 189, 248, 0.05);
}

.driver-purpose-box.hidmaestro h4 {
  color: #38bdf8;
}

.btn-driver-download.hidmaestro {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.btn-driver-download.hidmaestro:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #fff;
}

.dual-badge.joycon-badge {
  background: rgba(0, 195, 227, 0.15);
  color: #00c3e3;
  border: 1px solid rgba(0, 195, 227, 0.35);
}

.dual-badge.elite-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.dual-controller-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.dual-controller-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}


/* Mixed Mode Banner */
.mixed-mode-banner {
  margin-top: 3rem;
  background: linear-gradient(135deg, rgba(16, 207, 101, 0.08) 0%, rgba(56, 189, 248, 0.08) 50%, rgba(188, 140, 255, 0.08) 100%);
  border: 1px solid rgba(188, 140, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.mixed-banner-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(188, 140, 255, 0.2);
  color: #bc8cff;
  border: 1px solid rgba(188, 140, 255, 0.4);
  margin-bottom: 0.75rem;
}

.mixed-banner-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.mixed-banner-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.mixed-banner-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mixed-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================================================
   Documentation Portal Layout & Sidebar (docs/plugins.html)
   ========================================================================== */

.docs-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

/* Sidebar Container */
.docs-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 85px;
  align-self: start;
  height: fit-content;
  max-height: calc(100vh - 105px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.docs-sidebar::-webkit-scrollbar {
  width: 6px;
}
.docs-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Search Box in Sidebar */
.sidebar-search-box {
  position: relative;
  width: 100%;
}

.sidebar-search-box input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem 0.65rem 2.25rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

.sidebar-search-box input:focus {
  border-color: var(--xbox-neon);
  box-shadow: 0 0 10px var(--xbox-glow);
  background: rgba(0, 0, 0, 0.55);
}

.sidebar-search-box .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.6;
  pointer-events: none;
}

/* Nav Groups in Sidebar */
.doc-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.doc-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.doc-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
}

.doc-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.doc-nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.doc-nav-link.active {
  color: #ffffff !important;
  background: rgba(16, 207, 101, 0.16) !important;
  border-left: 3px solid var(--xbox-neon) !important;
  font-weight: 700 !important;
}

.doc-nav-link.active span:first-child {
  color: var(--xbox-neon) !important;
  text-shadow: 0 0 10px rgba(16, 207, 101, 0.4);
}

.doc-nav-link .nav-tag {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.doc-nav-link.active .nav-tag {
  background: rgba(16, 207, 101, 0.2);
  color: var(--xbox-neon);
}

.search-no-results {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem 0.5rem;
  display: none;
}

/* ==========================================================================
   Documentation Main Content Area
   ========================================================================== */

.docs-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  min-width: 0;
}

.doc-section {
  scroll-margin-top: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.doc-section h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-top: 0;
}

.doc-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
}

.doc-section p, .doc-section li {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.doc-section ul, .doc-section ol {
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.doc-section code:not(.code-content code) {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #38bdf8;
  font-family: 'Consolas', monospace;
}

/* Callout Box */
.doc-callout {
  background: rgba(16, 207, 101, 0.08);
  border-left: 4px solid var(--xbox-neon);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.doc-callout.warning {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: #f59e0b;
}

.doc-callout-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Spec Table */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.doc-table th, .doc-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.doc-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-weight: 700;
}

.doc-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   IDE Code Block Card with Header, Syntax Highlighting & Copy Button
   ========================================================================== */

.code-editor-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 1.25rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.code-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 0.6rem 1rem;
}

.code-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.code-window-dots {
  display: flex;
  gap: 6px;
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.code-dot.red { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #27c93f; }

.code-file-title {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c9d1d9;
}

.code-lang-tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.code-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  color: #c9d1d9;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.code-copy-btn:hover {
  background: #30363d;
  border-color: #8b949e;
  color: #ffffff;
}

.code-copy-btn.copied {
  color: var(--xbox-neon);
  border-color: var(--xbox-neon);
  background: rgba(16, 207, 101, 0.15);
}

.code-copy-btn svg {
  width: 14px;
  height: 14px;
}

.code-content {
  margin: 0;
  padding: 1.25rem 1.5rem;
  background: #0d1117;
  overflow-x: auto;
  font-family: 'Consolas', 'Cascadia Code', 'Courier New', monospace;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #e6edf3;
  tab-size: 4;
}

.code-content code {
  font-family: inherit;
  font-size: inherit;
}

/* Syntax Highlighting Tokens */
.tok-kw   { color: #ff7b72; font-weight: 600; } /* Keywords: void, int, def, class, import */
.tok-str  { color: #a5d6ff; }                   /* Strings: "Auto", 'GAS:' */
.tok-num  { color: #79c0ff; }                   /* Numbers: 115200, 16, 0.03 */
.tok-com  { color: #8b949e; font-style: italic; } /* Comments: //, #, /* */
.tok-fn   { color: #d2a8ff; }                   /* Functions: setup(), read(), flush() */
.tok-type { color: #ffa657; font-weight: 600; } /* Types / Classes: PluginDevice, Serial */
.tok-prop { color: #7ee787; }                   /* JSON Properties / Attributes */
.tok-op   { color: #ff7b72; }                   /* Operators: =, +, ==, | */

/* Mobile Floating Sidebar Toggle Button */
.sidebar-mobile-toggle {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 99;
  background: var(--xbox-neon);
  color: #000;
  border: none;
  border-radius: 50px;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px var(--xbox-glow);
  cursor: pointer;
  align-items: center;
  gap: 0.5rem;
}

/* Responsive Doc Layout */
@media (max-width: 960px) {
  .docs-wrapper {
    grid-template-columns: 1fr;
    padding-top: 1.5rem;
  }

  .docs-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 290px;
    height: 100vh;
    max-height: 100vh;
    z-index: 1000;
    border-radius: 0;
    transition: left 0.3s ease;
    background: #0d1117;
  }

  .docs-sidebar.open {
    left: 0;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.85);
  }

  .sidebar-mobile-toggle {
    display: inline-flex;
  }

  .doc-section {
    padding: 1.5rem 1.25rem;
  }
}

