/**
 * ui-enhancements.css
 * Premium UI/UX Pro Max styles for AlignIt Games website.
 * Hand-crafted animations, glassmorphism, and neon glows.
 */

/* 1. GPU-Accelerated Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  filter: blur(4px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.reveal.reveal-active {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

/* 2. Interactive Neon Hover Glows on Game Cards (with 3D Parallax Tilt) */
.homepage-game-grid .game-card {
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.homepage-game-grid .game-card:hover {
  border-color: var(--card-accent);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55),
              0 0 32px var(--card-glow);
}

/* 3D Depth Layering for Card Children */
.homepage-game-grid .game-card .game-icon {
  transform: translateZ(32px);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.homepage-game-grid .game-card .game-tag {
  transform: translateZ(20px);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.homepage-game-grid .game-card h3 {
  transform: translateZ(28px);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.homepage-game-grid .game-card p {
  transform: translateZ(18px);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.homepage-game-grid .game-card .store-actions {
  transform: translateZ(36px);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 3D Parallax Tilt for Directory Cards on apps.html */
.app-directory-grid .directory-card {
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.app-directory-grid .directory-card:hover {
  border-color: var(--gold);
}

.app-directory-grid .directory-card-head {
  transform-style: preserve-3d;
}

.app-directory-grid .directory-card .directory-icon {
  transform: translateZ(32px);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.app-directory-grid .directory-card .game-tag {
  transform: translateZ(20px);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.app-directory-grid .directory-card h3 {
  transform: translateZ(28px);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.app-directory-grid .directory-card p {
  transform: translateZ(18px);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.app-directory-grid .directory-card .directory-meta {
  transform: translateZ(24px);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.app-directory-grid .directory-card .store-actions {
  transform: translateZ(36px);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 3. Floating Accent Color Customizer & Audio Controls */
.theme-customizer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 12px;
}

.customizer-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 17, 29, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              background-color 0.25s ease,
              border-color 0.25s ease;
}

.customizer-toggle:hover {
  transform: scale(1.1);
  background: rgba(20, 17, 29, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
}

.customizer-toggle svg {
  transition: transform 0.3s ease;
}

.customizer-toggle:hover svg {
  transform: rotate(15deg);
}

.customizer-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(20, 17, 29, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.customizer-menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              border-color 0.2s ease;
}

.color-swatch:hover {
  transform: scale(1.2);
}

.color-swatch.active {
  border-color: #ffffff;
  transform: scale(1.1);
}

/* 4. Showcase Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 7, 10, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 18px;
}

.modal-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: rgba(20, 17, 29, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  width: min(100%, 560px);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.75);
  position: relative;
  transform: scale(0.9) translateY(24px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 36px;
}

.modal-overlay.is-active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  color: var(--ink);
  transform: scale(1.1);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.modal-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.modal-title {
  margin: 0;
  font-size: 26px;
  color: var(--ink);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
}

.modal-tag {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 6px;
}

.modal-body {
  color: var(--ink-soft);
}

.modal-desc {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-features {
  margin-bottom: 28px;
}

.modal-features h3 {
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.features-list li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.4;
}

.features-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--gold);
}

.modal-qr-section {
  display: flex;
  align-items: center;
  gap: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  flex-wrap: wrap;
}

.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qr-code-placeholder {
  background: #ffffff;
  color: #0b090f;
  padding: 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.qr-caption {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.modal-links {
  flex-grow: 1;
  min-width: 200px;
}

.modal-links h3 {
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

.modal-store-actions {
  display: flex;
  gap: 10px;
}

.modal-store-actions .store-btn {
  justify-content: center;
  min-height: 42px;
  padding: 8px 14px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.modal-store-actions .store-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

/* 5. Support FAQ Accordion */
.support-faq-section {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  padding-top: 56px;
}

.faq-accordion-container {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: rgba(20, 17, 29, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.faq-item.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 20px var(--gold-shadow, rgba(255, 179, 0, 0.08));
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  color: var(--ink);
  padding: 20px 24px;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  font-size: 20px;
  font-weight: 400;
  color: var(--ink-soft);
  transition: transform 0.25s ease, color 0.25s ease;
}

.faq-item.is-active .faq-icon {
  transform: rotate(45deg);
  color: var(--gold);
}

.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.is-active .faq-panel {
  grid-template-rows: 1fr;
}

.faq-content {
  overflow: hidden;
}

.faq-content p {
  padding: 0 24px 20px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* 6. Dynamic Scroll Progress Bar (GPU Accelerated Layout) */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 10000;
  pointer-events: none;
  background: transparent;
}

.scroll-progress-bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold), 0 0 16px var(--gold);
  transition: background-color 0.3s ease;
  will-change: transform;
}

/* 7. Ambient Particle Canvas */
.hero-particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.75;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

/* Ambient Neon Grid Pulse Canvas */
.hero-grid-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  width: 100%;
  height: 100%;
  mask-image: radial-gradient(circle at 76% 42%, rgba(0, 0, 0, 0.72), transparent 62%);
  -webkit-mask-image: radial-gradient(circle at 76% 42%, rgba(0, 0, 0, 0.72), transparent 62%);
  mix-blend-mode: screen;
  opacity: 0.6;
}

/* 8. GPU Acceleration Optimizations to prevent black background flicker/lag on scroll */
.site-header {
  -webkit-backdrop-filter: blur(18px); /* Safari support */
}

.hero,
.apps-hero {
  transform: translate3d(0, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.hero-showcase,
.hero-stage,
.hero-icon-cloud {
  transform: translate3d(0, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.hero-icon-card {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* 9. 3D Dice Roller Scene, Faces & Dot Grids */
.dice-scene {
  width: 120px;
  height: 120px;
  margin: 16px auto 32px;
  perspective: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dice-cube {
  width: 64px;
  height: 64px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1.6s cubic-bezier(0.18, 0.85, 0.25, 1.15);
  will-change: transform;
}

.dice-cube.no-transition {
  transition: none !important;
}

.dice-cube.is-idle {
  animation: dice-float 8s ease-in-out infinite;
}

@keyframes dice-float {
  0% {
    transform: rotateX(15deg) rotateY(20deg) rotateZ(0deg) translate3d(0, 0, 0);
  }
  50% {
    transform: rotateX(-10deg) rotateY(40deg) rotateZ(10deg) translate3d(0, -6px, 0);
  }
  100% {
    transform: rotateX(15deg) rotateY(20deg) rotateZ(0deg) translate3d(0, 0, 0);
  }
}

.dice-face {
  position: absolute;
  width: 64px;
  height: 64px;
  background: rgba(25, 22, 37, 0.78);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  display: flex;
  padding: 10px;
  box-sizing: border-box;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 
    inset 0 0 10px rgba(255, 255, 255, 0.05),
    0 10px 24px rgba(0, 0, 0, 0.45);
}

.dice-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  display: block;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Faces rotation and placement in 3D */
.face-1 { transform: rotateY(0deg) translateZ(32px); }
.face-6 { transform: rotateY(180deg) translateZ(32px); }
.face-2 { transform: rotateX(90deg) translateZ(32px); }
.face-5 { transform: rotateX(-90deg) translateZ(32px); }
.face-3 { transform: rotateY(90deg) translateZ(32px); }
.face-4 { transform: rotateY(-90deg) translateZ(32px); }

/* Dot alignments */
.face-1 {
  justify-content: center;
  align-items: center;
}

.face-2 {
  flex-direction: column;
  justify-content: space-between;
}
.face-2 .dice-dot:nth-child(2) {
  align-self: flex-end;
}

.face-3 {
  flex-direction: column;
  justify-content: space-between;
}
.face-3 .dice-dot:nth-child(2) {
  align-self: center;
}
.face-3 .dice-dot:nth-child(3) {
  align-self: flex-end;
}

.face-4 {
  justify-content: space-between;
}
.face-4 .dice-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.face-5 {
  justify-content: space-between;
}
.face-5 .dice-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.face-5 .dice-column:nth-child(2) {
  justify-content: center;
}

.face-6 {
  justify-content: space-between;
}
.face-6 .dice-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dice-widget-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 40px 48px;
  width: min(100% - 32px, var(--container));
  margin: 56px auto 0;
  background: radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08), transparent 50%), 
              radial-gradient(circle at 20% 80%, rgba(234, 179, 8, 0.04), transparent 50%), 
              rgba(20, 17, 29, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: left;
  box-sizing: border-box;
}

.dice-widget-info {
  flex: 1;
}

.dice-widget-info h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 50%, #dcd7e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dice-widget-info p {
  color: var(--ink-soft);
  max-width: 520px;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.dice-widget-action {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-shrink: 0;
}

/* Responsive adjustment for full screen width */
@media (max-width: 991px) {
  .dice-widget-banner {
    flex-direction: column;
    text-align: center;
    padding: 36px 32px;
    gap: 32px;
  }
  .dice-widget-info p {
    margin: 0 auto;
  }
  .dice-widget-action {
    flex-direction: column;
    gap: 20px;
    width: 100%;
  }
  .dice-widget-action .dice-scene {
    margin: 0 auto;
  }
  .dice-widget-action .dice-roll-btn {
    width: 100%;
  }
}



/* Dice highlight flash keyframes */
@keyframes dice-flash-glow {
  0%, 100% {
    border-color: var(--line);
    box-shadow: var(--shadow-soft);
  }
  50% {
    border-color: var(--gold);
    box-shadow: 0 0 36px var(--gold);
    transform: scale(1.03);
  }
}

.dice-selected-flash {
  animation: dice-flash-glow 0.8s ease-in-out 2 !important;
}


/* Reduced Motion Settings */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .homepage-game-grid .game-card,
  .customizer-toggle,
  .customizer-menu,
  .color-swatch,
  .modal-overlay,
  .modal-card,
  .modal-store-actions .store-btn,
  .faq-item,
  .faq-icon,
  .faq-panel,
  .scroll-progress-bar,
  .hero-particles-canvas {
    transition: none !important;
    transform: none !important;
    animation: none !important;
    filter: none !important;
  }
  .hero-particles-canvas {
    display: none !important;
  }
}

/* 12. "Versus Matchmaker" Game Selector Styles */
.matchmaker-widget-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  padding: 48px;
  width: min(100% - 32px, var(--container));
  margin: 56px auto 0;
  background: radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08), transparent 50%), 
              radial-gradient(circle at 20% 80%, rgba(234, 179, 8, 0.04), transparent 50%), 
              rgba(20, 17, 29, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  box-sizing: border-box;
}

.matchmaker-header h3 {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 50%, #dcd7e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.matchmaker-header p {
  color: var(--ink-soft);
  max-width: 600px;
  font-size: 15px;
  line-height: 1.6;
  margin: 0 auto;
}

.matchmaker-arena {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  width: 100%;
  max-width: 680px;
}

.matchmaker-card {
  flex: 1;
  max-width: 180px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

.matchmaker-you {
  border-color: rgba(16, 185, 129, 0.2);
}

.matchmaker-you .matchmaker-avatar {
  background: rgba(16, 185, 129, 0.05);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.matchmaker-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.online-indicator {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #10b981;
  border: 2px solid #141221;
  box-shadow: 0 0 10px #10b981;
  animation: pulse 2s infinite;
}

.matchmaker-card .player-tag {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-transform: uppercase;
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  box-sizing: border-box;
}

.directory-card h3 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.matchmaker-card .player-status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 20px;
}

.matchmaker-you .player-status {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

/* VS Separator */
.matchmaker-vs {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  border: 2px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  font-style: italic;
  color: var(--ink-soft);
  position: relative;
  z-index: 2;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.4);
}

.vs-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--purple));
  opacity: 0.15;
  filter: blur(8px);
  z-index: -1;
  animation: pulse 3s infinite;
}

/* Opponent Slot */
.matchmaker-opponent {
  border-color: rgba(255, 255, 255, 0.06);
}

.matchmaker-opponent.is-matching {
  animation: pulse-border-purple 0.4s infinite alternate;
}

.matchmaker-opponent.is-matched {
  border-color: var(--gold-shadow, rgba(255, 179, 0, 0.4));
  box-shadow: 0 0 30px var(--gold-shadow, rgba(255, 179, 0, 0.15));
}

.matchmaker-opponent.is-matched .matchmaker-avatar {
  border-color: var(--gold);
  box-shadow: 0 0 24px var(--gold-shadow, rgba(255, 179, 0, 0.2));
}

.opponent-placeholder-icon {
  font-size: 44px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.15);
  font-family: 'Outfit', sans-serif;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.opponent-icon {
  border-radius: 12px;
  padding: 4px;
}

.opponent-status {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-soft);
}

.matchmaker-opponent.is-matching .opponent-status {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
}

.matchmaker-opponent.is-matched .opponent-status {
  background: var(--gold-shadow, rgba(255, 179, 0, 0.1));
  color: var(--gold);
}

/* Radar Scan Animations */
.radar-searching::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(168, 85, 247, 0.12) 0deg, transparent 180deg);
  animation: radar-sweep 2s linear infinite;
  pointer-events: none;
}

.radar-scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #a855f7, transparent);
  box-shadow: 0 0 8px #a855f7;
  opacity: 0.4;
  animation: scanline-sweep 1.5s linear infinite;
  display: none;
}

.radar-searching .radar-scanline {
  display: block;
}

.matchmaker-controls {
  margin-top: 12px;
}

/* Animations Keyframes */
@keyframes radar-sweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes scanline-sweep {
  0% { transform: translateY(-10px); }
  100% { transform: translateY(106px); }
}

@keyframes pulse-border-purple {
  0% { border-color: rgba(168, 85, 247, 0.2); }
  100% { border-color: rgba(168, 85, 247, 0.6); }
}

/* Matchmaker highlight flash */
@keyframes matchmaker-flash-glow {
  0%, 100% {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-soft);
  }
  50% {
    border-color: var(--gold);
    box-shadow: 0 0 36px var(--gold);
    transform: scale(1.02);
  }
}

.matchmaker-selected-flash {
  animation: matchmaker-flash-glow 0.8s ease-in-out 2 !important;
}

/* Responsive Versus Layout */
@media (max-width: 768px) {
  .matchmaker-widget-banner {
    padding: 36px 24px;
    gap: 32px;
  }
  
  .matchmaker-arena {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }
  
  .matchmaker-vs {
    width: 48px;
    height: 48px;
    font-size: 14px;
  }
  
  .matchmaker-card {
    width: 100%;
    max-width: 240px;
  }
}

/* Button theme overrides to fix default yellow showing on hover when accent color shifts */
.button-primary {
  box-shadow: 0 16px 34px var(--gold-shadow, rgba(255, 179, 0, 0.28)) !important;
}

.button-primary:hover {
  background: var(--gold-dark) !important;
  box-shadow: 0 20px 40px var(--gold-shadow, rgba(255, 179, 0, 0.35)) !important;
}

.nav-links .nav-cta {
  box-shadow: 0 10px 22px var(--gold-shadow, rgba(255, 179, 0, 0.25)) !important;
}

.nav-links .nav-cta:hover {
  background: var(--gold-dark) !important;
  box-shadow: 0 12px 24px var(--gold-shadow, rgba(255, 179, 0, 0.35)) !important;
}

