/* =========================================================
   VR QA ACADEMY — GAMESARENA-INSPIRED VISUAL THEME 2026
   Visual layer only: no application/business logic changes.
   ========================================================= */
:root {
  --arena-bg: #050816;
  --arena-bg-2: #0a1024;
  --arena-surface: rgba(11, 18, 42, .72);
  --arena-surface-strong: rgba(13, 21, 49, .92);
  --arena-border: rgba(121, 155, 255, .20);
  --arena-text: #f4f7ff;
  --arena-muted: #9ba9c7;
  --arena-blue: #4f8cff;
  --arena-cyan: #19d8ff;
  --arena-purple: #8b5cf6;
  --arena-pink: #ec4899;
  --arena-green: #22d3a6;
  --arena-glow: 0 0 32px rgba(79, 140, 255, .22);
}

html { background: var(--arena-bg); }

body {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  color: var(--arena-text);
  background:
    radial-gradient(900px 600px at 8% -5%, rgba(79,140,255,.25), transparent 65%),
    radial-gradient(800px 600px at 92% 8%, rgba(139,92,246,.20), transparent 65%),
    radial-gradient(700px 500px at 50% 100%, rgba(25,216,255,.10), transparent 70%),
    linear-gradient(145deg, #040612 0%, #070b1c 45%, #050816 100%);
  overflow-x: hidden;
}

/* Animated arena atmosphere */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 30%, rgba(25,216,255,.12), transparent 19%),
    radial-gradient(circle at 78% 22%, rgba(139,92,246,.13), transparent 20%),
    radial-gradient(circle at 62% 78%, rgba(236,72,153,.08), transparent 18%);
  filter: blur(25px);
  animation: arenaFloat 16s ease-in-out infinite alternate;
}
body::after {
  z-index: -3;
  opacity: .55;
  transform: rotate(8deg) scale(1.15);
  animation-duration: 24s;
  animation-direction: alternate-reverse;
}

/* Futuristic grid floor/background */
.arena-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .25;
  background-image:
    linear-gradient(rgba(103, 144, 255, .065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 144, 255, .065) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 0%, rgba(0,0,0,.72) 55%, transparent 100%);
}

.arena-vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,.48) 100%);
}

/* Global glass treatment */
.app-header,
.site-header,
header {
  background: rgba(5, 8, 22, .70) !important;
  border-bottom: 1px solid rgba(116, 149, 255, .18) !important;
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  box-shadow: 0 8px 35px rgba(0,0,0,.22);
}

.card,
.panel,
.section-card,
.lab-card,
.form-card,
.login-card,
.order-card,
.product-card,
.profile-card,
.table-container,
.container-card {
  background: linear-gradient(145deg, rgba(17,27,58,.78), rgba(7,13,32,.72)) !important;
  border: 1px solid var(--arena-border) !important;
  box-shadow: 0 18px 55px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.055), var(--arena-glow);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}

.card,
.panel,
.lab-card,
.login-card,
.product-card,
.profile-card,
.order-card {
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.card:hover,
.panel:hover,
.lab-card:hover,
.login-card:hover,
.product-card:hover,
.profile-card:hover,
.order-card:hover {
  transform: translateY(-7px);
  border-color: rgba(80, 157, 255, .48) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.38), 0 0 38px rgba(79,140,255,.16), inset 0 1px 0 rgba(255,255,255,.08);
}

/* Buttons become live-event controls */
button,
.btn,
a.btn,
input[type="submit"],
input[type="button"] {
  position: relative;
  overflow: hidden;
  border-radius: 12px !important;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, filter .22s ease;
}
button::after,
.btn::after,
a.btn::after,
input[type="submit"]::after,
input[type="button"]::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  transition: left .55s ease;
  pointer-events: none;
}
button:hover,
.btn:hover,
a.btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(31, 104, 255, .24);
  filter: brightness(1.08);
}
button:hover::after,
.btn:hover::after,
a.btn:hover::after,
input[type="submit"]:hover::after,
input[type="button"]:hover::after { left: 150%; }

/* Inputs */
input, select, textarea {
  background: rgba(4, 9, 25, .58) !important;
  color: var(--arena-text) !important;
  border-color: rgba(116,149,255,.20) !important;
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(25,216,255,.68) !important;
  box-shadow: 0 0 0 4px rgba(25,216,255,.09), 0 0 24px rgba(25,216,255,.12) !important;
  outline: none;
}

/* Hero/banner energy */
.hero-section,
.hero,
.banner-wrapper {
  position: relative;
}
.banner-wrapper,
.hero {
  border: 1px solid rgba(96,145,255,.22);
  box-shadow: 0 28px 80px rgba(0,0,0,.42), 0 0 50px rgba(79,140,255,.14);
}
.banner-wrapper::after,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0 42%, rgba(255,255,255,.10) 48%, transparent 55%);
  transform: translateX(-100%);
  animation: arenaSweep 8s ease-in-out infinite;
}

/* Section headings */
h1, h2, h3 {
  text-shadow: 0 0 26px rgba(79,140,255,.18);
}

/* Links */
a { transition: color .2s ease, text-shadow .2s ease; }
a:hover {
  color: #73e7ff !important;
  text-shadow: 0 0 16px rgba(25,216,255,.30);
}

/* Scroll reveal */
.arena-reveal {
  opacity: 0;
  transform: translateY(22px) scale(.985);
  transition: opacity .65s ease, transform .65s cubic-bezier(.2,.8,.2,1);
}
.arena-reveal.arena-visible { opacity: 1; transform: none; }

@keyframes arenaFloat {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); }
  100% { transform: translate3d(3%, 2%, 0) scale(1.08); }
}
@keyframes arenaSweep {
  0%, 62% { transform: translateX(-100%); }
  82%, 100% { transform: translateX(100%); }
}

@media (max-width: 768px) {
  .arena-grid { background-size: 32px 32px; opacity: .18; }
  .card:hover, .panel:hover, .lab-card:hover, .login-card:hover, .product-card:hover { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .arena-reveal { opacity: 1; transform: none; }
}

/* =========================================================
   FINAL OVERRIDE — make GamesArena theme win over legacy light CSS
   ========================================================= */
html, body, body[data-modern="1"] {
  background-color: #050816 !important;
  color: #f4f7ff !important;
}
body[data-modern="1"] {
  background:
    radial-gradient(1000px 650px at 5% -10%, rgba(25,216,255,.20), transparent 62%),
    radial-gradient(900px 650px at 100% 0%, rgba(139,92,246,.22), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(236,72,153,.10), transparent 65%),
    linear-gradient(145deg, #030510 0%, #071026 48%, #050816 100%) !important;
}
body[data-modern="1"] main,
body[data-modern="1"] .main,
body[data-modern="1"] .page,
body[data-modern="1"] .content,
body[data-modern="1"] .container {
  color: #f4f7ff;
}
body[data-modern="1"] .app-header,
body[data-modern="1"] .site-header,
body[data-modern="1"] header {
  background: rgba(5, 8, 22, .82) !important;
  border-bottom: 1px solid rgba(88, 146, 255, .28) !important;
  box-shadow: 0 10px 40px rgba(0,0,0,.35), 0 0 35px rgba(79,140,255,.08) !important;
}
body[data-modern="1"] .card,
body[data-modern="1"] .panel,
body[data-modern="1"] .section-card,
body[data-modern="1"] .lab-card,
body[data-modern="1"] .form-card,
body[data-modern="1"] .login-card,
body[data-modern="1"] .order-card,
body[data-modern="1"] .product-card,
body[data-modern="1"] .profile-card,
body[data-modern="1"] .table-container,
body[data-modern="1"] .container-card {
  background: linear-gradient(145deg, rgba(15,25,55,.86), rgba(5,11,30,.78)) !important;
  color: #f4f7ff !important;
  border: 1px solid rgba(104,148,255,.24) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.06), 0 0 28px rgba(79,140,255,.10) !important;
}
body[data-modern="1"] h1,
body[data-modern="1"] h2,
body[data-modern="1"] h3,
body[data-modern="1"] h4,
body[data-modern="1"] h5,
body[data-modern="1"] h6,
body[data-modern="1"] p,
body[data-modern="1"] label,
body[data-modern="1"] li,
body[data-modern="1"] td,
body[data-modern="1"] th {
  color: inherit;
}
body[data-modern="1"] .muted,
body[data-modern="1"] .subtitle,
body[data-modern="1"] .description,
body[data-modern="1"] small {
  color: #a8b6d5 !important;
}
body[data-modern="1"] a { color: #7dc8ff; }
body[data-modern="1"] a:hover { color: #a7e7ff; }
body[data-modern="1"] input,
body[data-modern="1"] textarea,
body[data-modern="1"] select {
  color: #eef6ff !important;
  background: rgba(7,14,34,.78) !important;
  border-color: rgba(107,153,255,.30) !important;
}
body[data-modern="1"] input::placeholder,
body[data-modern="1"] textarea::placeholder { color: #8090b2 !important; }
body[data-modern="1"] .hero-section,
body[data-modern="1"] .banner-wrapper { filter: drop-shadow(0 18px 45px rgba(0,0,0,.30)); }
body[data-modern="1"] .banner-wrapper {
  border: 1px solid rgba(93,154,255,.32);
  box-shadow: 0 18px 60px rgba(0,0,0,.42), 0 0 35px rgba(25,216,255,.10);
}
body[data-modern="1"] .banner-nav {
  background: linear-gradient(135deg, #1267c8, #6d3ff5) !important;
  box-shadow: 0 0 25px rgba(25,216,255,.25);
}
body[data-modern="1"] .banner-nav:hover { transform: translateY(-50%) scale(1.08); }

/* Header links remain readable against the dark theme */
body[data-modern="1"] .nav-links a,
body[data-modern="1"] .nav-dropbtn,
body[data-modern="1"] .header-right a,
body[data-modern="1"] .header-actions a,
body[data-modern="1"] .brand,
body[data-modern="1"] .brand span {
  color: #eef6ff !important;
}

/* Make the theme visible even when JS is delayed */
body:not([data-modern="1"]) {
  background:
    radial-gradient(900px 600px at 8% -5%, rgba(25,216,255,.20), transparent 65%),
    radial-gradient(800px 600px at 92% 8%, rgba(139,92,246,.18), transparent 65%),
    linear-gradient(145deg, #040612 0%, #070b1c 45%, #050816 100%) !important;
  color: #f4f7ff !important;
}

@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .arena-grid { animation: none !important; }
}

/* =========================================================
   DROPDOWN SAFETY FIX — preserve functional lab controls
   Prevent animated glass cards from creating stacking contexts
   that clip/cover custom dropdown menus.
   ========================================================= */
body[data-modern="1"] .card:has(.searchable-list),
body[data-modern="1"] .card:has(.multi-panel),
body[data-modern="1"] .card:has(#suggestions) {
  transform: none !important;
  overflow: visible !important;
}

body[data-modern="1"] .card:has(.searchable-list:hover),
body[data-modern="1"] .card:has(.multi-panel:hover),
body[data-modern="1"] .card:has(#suggestions:hover),
body[data-modern="1"] .card:has(.searchable-list.show),
body[data-modern="1"] .card:has(.multi-panel.show) {
  z-index: 1000 !important;
}

body[data-modern="1"] .searchable-list,
body[data-modern="1"] #suggestions,
body[data-modern="1"] .multi-panel {
  position: absolute !important;
  z-index: 10000 !important;
  background: linear-gradient(145deg, rgba(13,22,48,.98), rgba(5,11,29,.98)) !important;
  color: #eef6ff !important;
  border: 1px solid rgba(80,157,255,.45) !important;
  box-shadow: 0 22px 60px rgba(0,0,0,.58), 0 0 28px rgba(25,216,255,.12) !important;
  backdrop-filter: blur(18px) saturate(145%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(145%) !important;
}

body[data-modern="1"] .searchable-item,
body[data-modern="1"] .multi-panel-body > div,
body[data-modern="1"] #suggestions > div {
  color: #eef6ff !important;
  background: transparent !important;
}

body[data-modern="1"] .searchable-item:hover,
body[data-modern="1"] .searchable-item[aria-selected="true"],
body[data-modern="1"] .searchable-item.active,
body[data-modern="1"] .multi-panel-body > div:hover,
body[data-modern="1"] #suggestions > div:hover {
  color: #ffffff !important;
  background: linear-gradient(90deg, rgba(25,216,255,.18), rgba(139,92,246,.18)) !important;
}

body[data-modern="1"] .multi-panel-header {
  color: #ffffff !important;
  background: rgba(79,140,255,.08) !important;
}

/* Native select popup: keep options readable in browsers that honor CSS. */
body[data-modern="1"] select option,
body[data-modern="1"] select optgroup {
  color: #eef6ff !important;
  background-color: #0b1530 !important;
}

/* Do not apply the hover-lift animation to lab cards containing menus. */
body[data-modern="1"] .card:has(.searchable-list):hover,
body[data-modern="1"] .card:has(.multi-panel):hover,
body[data-modern="1"] .card:has(#suggestions):hover {
  transform: none !important;
}
