/* ==========================================================================
   1. COURTROOM BACKGROUND GRAPHIC & LAYOUT
   ========================================================================== */
body.ace-attorney-theme {
  /* 🖼️ Pinned wallpaper effect using your specified background image */
  background-image: url("../../images/backgrounds/ace_attorney_background.webp") !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: #1a0f0a; /* Dark mahogany fallback color */
  color: #f7f9fa !important;
}

/* Disables the homepage blue code backdrop automatically on this page */
.ace-attorney-theme #cyberStormCanvas {
  display: none !important;
}

/* ==========================================================================
   2. LAWYER HUD SIDEBAR NAVIGATION OVERRIDES
   ========================================================================== */
.ace-attorney-theme .cyber-terminal {
  background-color: #18284c !important; /* 🔵 Phoenix Wright Signature Suit Royal Blue */
  border: 2px solid #dca434 !important; /* 🟡 Courtroom Emblem Polished Gold */
  box-shadow:
    0 0 25px rgba(220, 164, 52, 0.2),
    inset 0 0 20px rgba(0, 0, 0, 0.7) !important;
}

.ace-attorney-theme .status-dot {
  background-color: #dca434 !important; /* Gold status pulse */
  box-shadow: 0 0 8px #dca434 !important;
  animation: pulseGlowAA 2.5s infinite ease-in-out !important;
}

.ace-attorney-theme .terminal-title {
  color: #dca434 !important;
}

.ace-attorney-theme .terminal-divider {
  background: linear-gradient(to right, #dca434, transparent) !important;
}

/* 🌟 RETAINED CORE GLOBAL DESIGN: Removed monospace override to preserve universal nav font style */
.ace-attorney-theme .nav-item {
  color: #b0c2de !important; /* Soft steel blue text link color */
}

.ace-attorney-theme .nav-bracket {
  color: #dca434 !important; /* Brackets match the gold trim framework */
}

.ace-attorney-theme .nav-item:hover {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(220, 164, 52, 0.6) !important;
}

.ace-attorney-theme .nav-item.active {
  color: #dca434 !important; /* Active page locks onto bright gold */
  text-shadow: 0 0 6px rgba(220, 164, 52, 0.4) !important;
}

.ace-attorney-theme .nav-item.active .nav-bracket {
  color: #dca434 !important;
}

@keyframes pulseGlowAA {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
    box-shadow: 0 0 4px #dca434;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 0 12px #dca434;
  }
}

/* ==========================================================================
   3. HEADERS (WIDESCREEN SPLIT HUD TEXT)
   ========================================================================== */
h1.re-clean-tech-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

/* Left path: Golden judicial marker text */
h1.re-clean-tech-title .path-left {
  font-family: "Courier New", Courier, monospace;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 1px;
  color: #dca434;
  text-shadow:
    0 0 10px rgba(220, 164, 52, 0.3),
    2px 2px 4px rgba(0, 0, 0, 0.9);
}

/* Right path: Large bold case title */
h1.re-clean-tech-title .title-right {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffffff; /* 🌟 Shifted to crisp marble white to reference courtroom pillars */
  text-shadow:
    2px 2px 4px rgba(0, 0, 0, 0.9),
    0 0 12px rgba(255, 255, 255, 0.15);
}

/* Sub-section transcript logs */
.ace-attorney-theme h2 {
  font-family:
    "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; /* 🌟 Styled for an elegant, modern legal layout */
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  padding-left: 5px;
  color: #dca434; /* Elegant gold print */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Clean legal underline track */
.ace-attorney-theme h2::after {
  content: "";
  width: 100%;
  max-width: 280px;
  height: 2px;
  background: linear-gradient(to right, #dca434, #502b19, transparent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ace-attorney-theme h2:hover {
  color: #ffffff;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.4),
    2px 2px 4px rgba(0, 0, 0, 0.9);
  transition:
    color 0.15s ease,
    text-shadow 0.15s ease;
}

/* ==========================================================================
   4. WOODEN BENCH SHELF & GOLD WALL ARCHIVE CUBBIES
   ========================================================================== */
.ace-attorney-theme .wooden-shelf {
  border: 15px solid #502b19 !important; /* Mahogany wood outer borders */
  background-color: #caa04c !important; /* Golden-yellow wood wall background panelling */
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 4px,
      rgba(80, 43, 25, 0.15) 4px,
      rgba(80, 43, 25, 0.15) 8px
    ),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent) !important;
  box-shadow:
    inset 0 0 50px rgba(0, 0, 0, 0.6),
    0 10px 30px rgba(0, 0, 0, 0.8) !important;
}

.ace-attorney-theme .shelf-cubby {
  background-color: #32190f !important; /* Dark mahogany bench interior slots */
  background-image: none !important;
  border-radius: 4px;
  box-shadow:
    inset 6px 6px 15px rgba(0, 0, 0, 0.95),
    inset -4px -4px 15px rgba(255, 255, 255, 0.02),
    0 6px 0 #502b19 !important;
}

.ace-attorney-theme .shelf-cubby:hover {
  transform: scale(1.03) !important;
  box-shadow:
    inset 4px 4px 10px rgba(0, 0, 0, 0.95),
    0 5px 20px rgba(220, 164, 52, 0.4) !important;
}

.ace-attorney-theme .game-title {
  color: #caa04c !important;
  font-family: "Courier New", Courier, monospace !important;
}

/* ==========================================================================
   5. EVIDENCE BLOCK READOUTS & TRIAL OVERRIDES
   ========================================================================== */
.ace-attorney-theme .game-description {
  background: rgba(
    50,
    25,
    15,
    0.85
  ) !important; /* Legal portfolio dark binder look */
  border-left: 4px solid #dca434 !important;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6) !important;
}

.ace-attorney-theme .game-description h2 {
  color: #dca434 !important;
}

.ace-attorney-theme .game-description p {
  color: #e5dec9 !important; /* Vintage legal parchment off-white paper print text */
}

.ace-attorney-theme .fullscreen-btn {
  background-color: rgba(24, 40, 76, 0.9) !important;
  color: #dca434 !important;
  border: 2px solid #dca434 !important;
}

.ace-attorney-theme .fullscreen-btn:hover {
  background-color: #dca434 !important;
  color: #18284c !important;
  box-shadow: 0 0 14px #dca434 !important;
}

.ace-attorney-theme model-viewer:fullscreen {
  background-color: #1a0f0a !important;
}
