/* ===== ODYSSEY MATRIX — ALWAYS ON, MAXIMUM ===== */

/* Base state — matrix always active */
.ody-matrix-mode {
  --mx-perspective: 1400px;
  --mx-tilt: 12deg;
  --mx-lift: 14px;
  --mx-z: 20px;
}

/* Matrix rain — MAXIMUM */
.ody-matrix-mode #fx-matrix {
  opacity: 0.55 !important;
  z-index: -1 !important;
  filter: brightness(1.5) contrast(1.25) saturate(1.2) !important;
}

/* Scanlines overlay — uses dedicated div, NOT body::after */
#mx-scanlines {
  display: none;
}
.ody-matrix-mode #mx-scanlines {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(0, 0, 0, 0.06) 1px,
    rgba(0, 0, 0, 0.06) 3px
  );
  opacity: 0.5;
}

/* Vignette overlay — uses dedicated div, NOT body::before */
#mx-vignette {
  display: none;
}
.ody-matrix-mode #mx-vignette {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 9996;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.55) 100%);
  opacity: 0.65;
}

/* ===== CARDS — MAXIMUM 3D + GLOW ===== */
.ody-matrix-mode .card,
.ody-matrix-mode .course-card,
.ody-matrix-mode .stat-card,
.ody-matrix-mode .fx-card,
.ody-matrix-mode .ody-feature,
.ody-matrix-mode .ocard {
  transform-style: preserve-3d !important;
  transition: transform .5s cubic-bezier(.34,1.56,.64,1), box-shadow .5s, border-color .3s !important;
}
.ody-matrix-mode .card:hover,
.ody-matrix-mode .course-card:hover,
.ody-matrix-mode .stat-card:hover,
.ody-matrix-mode .fx-card:hover,
.ody-matrix-mode .ody-feature:hover,
.ody-matrix-mode .ocard:hover {
  transform: perspective(1400px) rotateY(12deg) rotateX(-12deg) translateY(-14px) translateZ(20px) scale(1.025) !important;
  box-shadow:
    0 28px 70px rgba(0,0,0,.7),
    0 0 50px rgba(0,229,255,.3),
    0 0 100px rgba(0,229,255,.12),
    0 0 150px rgba(0,229,255,.05),
    inset 0 1px 0 rgba(255,255,255,.12) !important;
  border-color: rgba(0,229,255,.55) !important;
}

/* ===== BUTTONS — MAXIMUM 3D ===== */
.ody-matrix-mode .btn-3d {
  transition: all .25s cubic-bezier(.34,1.56,.64,1) !important;
}
.ody-matrix-mode .btn-3d:hover {
  transform: translateY(-6px) rotateX(-3deg) !important;
  box-shadow:
    0 14px 0 #005f6b,
    0 22px 50px rgba(0,212,255,.55),
    0 6px 14px rgba(0,0,0,.5),
    0 0 30px rgba(0,229,255,.2) !important;
}
.ody-matrix-mode .btn-3d:active {
  transform: translateY(7px) rotateX(2deg) !important;
  box-shadow: 0 2px 0 #005f6b, 0 3px 12px rgba(0,212,255,.25) !important;
  transition-duration: .05s !important;
}

/* ===== NAVBAR — MAXIMUM GLASS ===== */
.ody-matrix-mode .navbar {
  backdrop-filter: blur(28px) saturate(220%) !important;
  background: rgba(3,6,14,0.92) !important;
  border-bottom: 1px solid rgba(0,229,255,.35) !important;
  box-shadow:
    0 6px 40px rgba(0,0,0,.6),
    0 0 60px rgba(0,229,255,.12),
    inset 0 1px 0 rgba(255,255,255,.07) !important;
}

/* ===== HERO TITLE — MAXIMUM GLITCH + GLOW ===== */
.ody-matrix-mode .ody-title[data-glitch] {
  text-shadow:
    0 0 15px rgba(0,229,255,1),
    0 0 40px rgba(0,229,255,.65),
    0 0 80px rgba(0,229,255,.35),
    0 0 120px rgba(0,229,255,.15),
    3px 3px 0 rgba(255,0,255,.4),
    -3px -3px 0 rgba(0,255,255,.4),
    6px 0 0 rgba(255,0,128,.2),
    -6px 0 0 rgba(0,128,255,.2) !important;
  animation: mxGlitch 4s ease-in-out infinite !important;
}
@keyframes mxGlitch {
  0%, 100% { transform: translate(0); }
  2% { transform: translate(-3px, 1px); }
  4% { transform: translate(3px, -1px); }
  6% { transform: translate(0); }
  92% { transform: translate(0); }
  93% { transform: translate(2px, -1px) skewX(-1deg); }
  94% { transform: translate(-2px, 1px); }
  95% { transform: translate(0); }
}

/* ===== ALL HEADINGS — GLOW ===== */
.ody-matrix-mode h1, .ody-matrix-mode h2, .ody-matrix-mode h3,
.ody-matrix-mode h4, .ody-matrix-mode .ody-h3 {
  text-shadow: 0 0 20px rgba(0,229,255,.5), 0 0 40px rgba(0,229,255,.2), 0 0 60px rgba(0,229,255,.08) !important;
}

/* ===== MODALS — MAXIMUM GLASS ===== */
.ody-matrix-mode .modal-overlay {
  backdrop-filter: blur(12px) saturate(180%) !important;
}
.ody-matrix-mode .modal-box {
  background: rgba(8,12,24,0.97) !important;
  border: 1px solid rgba(0,229,255,.4) !important;
  border-radius: 20px !important;
  box-shadow:
    0 30px 90px rgba(0,0,0,.85),
    0 0 80px rgba(0,229,255,.18),
    0 0 160px rgba(0,229,255,.06),
    inset 0 1px 0 rgba(255,255,255,.1) !important;
}

/* ===== INPUTS — MAXIMUM NEON FOCUS ===== */
.ody-matrix-mode input:focus,
.ody-matrix-mode textarea:focus,
.ody-matrix-mode select:focus {
  border-color: rgba(0,229,255,.7) !important;
  box-shadow:
    0 0 22px rgba(0,229,255,.35),
    0 0 45px rgba(0,229,255,.15),
    0 0 80px rgba(0,229,255,.05),
    inset 0 0 15px rgba(0,229,255,.08) !important;
  outline: none !important;
}

/* ===== LINKS — MAXIMUM GLOW ===== */
.ody-matrix-mode a:hover {
  text-shadow: 0 0 14px rgba(0,229,255,.8), 0 0 28px rgba(0,229,255,.35) !important;
  color: #00e5ff !important;
}

/* ===== AUTH CARD — MAXIMUM TILT ===== */
.ody-matrix-mode .ody-auth__card {
  transform-style: preserve-3d !important;
  transition: transform .6s cubic-bezier(.34,1.56,.64,1), box-shadow .5s, border-color .3s !important;
}
.ody-matrix-mode .ody-auth__card:hover {
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) translateY(-10px) translateZ(15px) !important;
  box-shadow:
    0 30px 70px rgba(0,0,0,.7),
    0 0 60px rgba(0,229,255,.25),
    0 0 120px rgba(0,229,255,.08),
    inset 0 1px 0 rgba(255,255,255,.1) !important;
  border-color: rgba(0,229,255,.45) !important;
}

/* ===== AUTH BUTTONS — MAXIMUM 3D ===== */
.ody-matrix-mode .ody-auth__btn {
  transform-style: preserve-3d !important;
  box-shadow:
    0 8px 0 #005f6b,
    0 14px 32px rgba(0,212,255,.4),
    0 3px 8px rgba(0,0,0,.45) !important;
}
.ody-matrix-mode .ody-auth__btn:hover {
  transform: translateY(-5px) rotateX(-3deg) !important;
  box-shadow:
    0 12px 0 #005f6b,
    0 20px 45px rgba(0,212,255,.55),
    0 5px 12px rgba(0,0,0,.45),
    0 0 35px rgba(0,229,255,.2) !important;
}
.ody-matrix-mode .ody-auth__btn:active {
  transform: translateY(6px) rotateX(2deg) !important;
  box-shadow: 0 2px 0 #005f6b, 0 3px 12px rgba(0,212,255,.25) !important;
  transition-duration: .05s !important;
}

/* ===== FOOTER — GLOWING LINE ===== */
.ody-matrix-mode .footer {
  border-top: 1px solid rgba(0,229,255,.22) !important;
  box-shadow: 0 -6px 40px rgba(0,229,255,.1), inset 0 1px 0 rgba(255,255,255,.03) !important;
}

/* ===== TOASTS — NEON BORDER GLOW ===== */
.ody-matrix-mode .toast {
  box-shadow:
    0 10px 35px rgba(0,0,0,.65),
    0 0 30px rgba(0,212,255,.22),
    0 0 60px rgba(0,229,255,.08) !important;
  border-color: rgba(0,229,255,.4) !important;
}

/* ===== DROPDOWNS — DEEP GLASS ===== */
.ody-matrix-mode .user-dropdown,
.ody-matrix-mode .notif-panel {
  backdrop-filter: blur(24px) saturate(180%) !important;
  background: rgba(8,12,24,0.97) !important;
  border: 1px solid rgba(0,229,255,.3) !important;
  border-radius: 14px !important;
  box-shadow:
    0 16px 50px rgba(0,0,0,.7),
    0 0 40px rgba(0,229,255,.14),
    0 0 80px rgba(0,229,255,.04) !important;
}

/* ===== SCROLLBAR — NEON GLOW ===== */
.ody-matrix-mode ::-webkit-scrollbar {
  width: 12px;
  background: rgba(3,6,14,0.94) !important;
}
.ody-matrix-mode ::-webkit-scrollbar-track {
  background: rgba(0,229,255,.04) !important;
  border-radius: 6px !important;
}
.ody-matrix-mode ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0,229,255,.4), rgba(0,229,255,.15)) !important;
  border-radius: 6px !important;
  border: 2px solid rgba(0,229,255,.15) !important;
  box-shadow: 0 0 12px rgba(0,229,255,.2) !important;
}
.ody-matrix-mode ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(0,229,255,.6), rgba(0,229,255,.3)) !important;
  box-shadow: 0 0 18px rgba(0,229,255,.4) !important;
}

/* ===== SELECTION — BRIGHT NEON ===== */
.ody-matrix-mode ::selection {
  background: rgba(0,229,255,.4) !important;
  color: #fff !important;
  text-shadow: 0 0 12px rgba(0,229,255,.7) !important;
}

/* ===== 3D FLIP CARDS ===== */
.ody-matrix-mode .ody-flip-card {
  perspective: 1200px !important;
}
.ody-matrix-mode .ody-flip-inner {
  transition: transform .7s cubic-bezier(.4,0,.2,1) !important;
  transform-style: preserve-3d !important;
}

/* ===== TILT CARDS — WIDER RANGE ===== */
.ody-matrix-mode [data-tilt],
.ody-matrix-mode .ody-tilt-card,
.ody-matrix-mode .ody-card-3d {
  perspective: 1200px !important;
  transform-style: preserve-3d !important;
}

/* ===== COURSE CARDS — EXTRA SHIMMER ===== */
.ody-matrix-mode .course-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 30%,
    rgba(0,229,255,.06) 45%,
    rgba(0,229,255,.1) 50%,
    rgba(0,229,255,.06) 55%,
    transparent 70%
  );
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
}
.ody-matrix-mode .course-card:hover::before {
  opacity: 1;
  animation: shimmerSweep 2s ease-in-out infinite;
}
@keyframes shimmerSweep {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

/* ===== NAV LINKS — GLOW ON HOVER ===== */
.ody-matrix-mode .nav-link {
  transition: all .3s cubic-bezier(.34,1.56,.64,1) !important;
}
.ody-matrix-mode .nav-link:hover {
  text-shadow: 0 0 10px rgba(0,229,255,.6), 0 0 20px rgba(0,229,255,.25) !important;
  color: #00e5ff !important;
}

/* ===== LOGO — SUBTLE GREEN GLOW ===== */
.ody-matrix-mode .nav-logo {
  filter: drop-shadow(0 0 6px rgba(0,255,102,.3)) !important;
  transition: filter .3s !important;
}
.ody-matrix-mode .nav-logo:hover {
  filter: drop-shadow(0 0 10px rgba(0,255,102,.5)) drop-shadow(0 0 18px rgba(0,255,102,.15)) !important;
}

/* ===== COINS BADGE — GLOW ===== */
.ody-matrix-mode .coins-badge {
  box-shadow: 0 0 15px rgba(251,191,36,.25), 0 0 30px rgba(251,191,36,.08) !important;
  border-color: rgba(251,191,36,.35) !important;
}

/* ===== NOTIFICATION DOT — PULSE GLOW ===== */
.ody-matrix-mode .notif-dot {
  box-shadow: 0 0 8px rgba(239,68,68,.6), 0 0 16px rgba(239,68,68,.25) !important;
  animation: notifPulse 1.5s ease-in-out infinite !important;
}
@keyframes notifPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(239,68,68,.6), 0 0 16px rgba(239,68,68,.25); }
  50% { box-shadow: 0 0 14px rgba(239,68,68,.8), 0 0 24px rgba(239,68,68,.4); }
}

/* ===== PAYMENT PROVIDER BUTTONS ===== */
.ody-matrix-mode .pay-provider-btn {
  transition: all .35s cubic-bezier(.34,1.56,.64,1) !important;
}
.ody-matrix-mode .pay-provider-btn:hover {
  transform: translateY(-4px) rotateX(-3deg) translateZ(8px) !important;
  box-shadow:
    0 16px 40px rgba(0,0,0,.5),
    0 0 30px rgba(0,229,255,.2),
    0 0 60px rgba(0,229,255,.06) !important;
  border-color: rgba(0,229,255,.4) !important;
}
.ody-matrix-mode .pay-provider-btn__3d {
  opacity: 0.7 !important;
  filter: blur(8px) brightness(1.3) !important;
}

/* ===== HERO SECTION ===== */
.ody-matrix-mode .ody-hero {
  position: relative;
}
.ody-matrix-mode .ody-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(0,229,255,.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ===== STAT CARDS ===== */
.ody-matrix-mode .stat-card {
  border-color: rgba(0,229,255,.18) !important;
}
.ody-matrix-mode .stat-card:hover {
  border-color: rgba(0,229,255,.45) !important;
  box-shadow:
    0 18px 50px rgba(0,0,0,.5),
    0 0 35px rgba(0,229,255,.2),
    inset 0 1px 0 rgba(255,255,255,.08) !important;
}

/* ===== SECTION HEADERS ===== */
.ody-matrix-mode .section-title,
.ody-matrix-mode .ody-h2 {
  text-shadow: 0 0 18px rgba(0,229,255,.4), 0 0 35px rgba(0,229,255,.12) !important;
}

/* ===== TABS ===== */
.ody-matrix-mode .ody-tab {
  transition: all .3s cubic-bezier(.34,1.56,.64,1) !important;
}
.ody-matrix-mode .ody-tab:hover,
.ody-matrix-mode .ody-tab.active {
  box-shadow: 0 0 15px rgba(0,229,255,.2), inset 0 0 10px rgba(0,229,255,.06) !important;
  border-color: rgba(0,229,255,.35) !important;
}
.ody-matrix-mode .ody-tab.active {
  background: rgba(0,229,255,.08) !important;
  box-shadow: 0 0 20px rgba(0,229,255,.25), inset 0 0 12px rgba(0,229,255,.08) !important;
}

/* ===== BADGES / TAGS ===== */
.ody-matrix-mode .badge,
.ody-matrix-mode .tag,
.ody-matrix-mode .chip {
  box-shadow: 0 0 8px rgba(0,229,255,.12) !important;
}
.ody-matrix-mode .badge:hover,
.ody-matrix-mode .tag:hover {
  box-shadow: 0 0 14px rgba(0,229,255,.25) !important;
}

/* ===== PROGRESS BARS ===== */
.ody-matrix-mode .ody-progress-bar {
  box-shadow: 0 0 10px rgba(0,229,255,.15) !important;
}
.ody-matrix-mode .ody-progress-fill {
  box-shadow: 0 0 12px rgba(0,229,255,.35), 0 0 24px rgba(0,229,255,.12) !important;
}

/* ===== CODE BLOCKS ===== */
.ody-matrix-mode pre,
.ody-matrix-mode code,
.ody-matrix-mode .ody-code {
  box-shadow: 0 0 20px rgba(0,229,255,.08), inset 0 0 15px rgba(0,229,255,.03) !important;
  border-color: rgba(0,229,255,.2) !important;
}

/* ===== IMAGES — SUBTLE GLOW ===== */
.ody-matrix-mode img {
  filter: contrast(1.05) saturate(1.1);
}
.ody-matrix-mode img:hover {
  filter: contrast(1.08) saturate(1.15) drop-shadow(0 0 8px rgba(0,229,255,.2));
}

/* ===== SKELETON / LOADING ===== */
.ody-matrix-mode .ody-skeleton {
  background: linear-gradient(90deg, rgba(0,229,255,.04) 25%, rgba(0,229,255,.1) 50%, rgba(0,229,255,.04) 75%) !important;
  background-size: 200% 100% !important;
  animation: skeletonShimmer 1.5s ease-in-out infinite !important;
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== MOBILE — TONED DOWN BUT STILL MAX ===== */
@media (max-width: 768px) {
  .ody-matrix-mode #mx-scanlines {
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.04) 2px,
      rgba(0,0,0,0.04) 4px
    );
    opacity: 0.4;
  }
  .ody-matrix-mode #fx-matrix {
    opacity: 0.38 !important;
    filter: brightness(1.25) contrast(1.1) !important;
  }
  .ody-matrix-mode #mx-vignette {
    opacity: 0.5;
  }
  .ody-matrix-mode .card:hover,
  .ody-matrix-mode .course-card:hover {
    transform: perspective(800px) rotateY(5deg) rotateX(-3deg) translateY(-6px) translateZ(8px) scale(1.01) !important;
  }
}

/* ===== LIGHT THEME — MAXIMUM ADAPTED ===== */
.ody-theme-light.ody-matrix-mode {
  --mx-perspective: 1200px;
}
.ody-theme-light.ody-matrix-mode .card:hover,
.ody-theme-light.ody-matrix-mode .course-card:hover,
.ody-theme-light.ody-matrix-mode .ocard:hover {
  box-shadow:
    0 16px 45px rgba(0,0,0,.1),
    0 0 35px rgba(0,150,200,.22),
    0 0 70px rgba(0,150,200,.06),
    inset 0 1px 0 rgba(255,255,255,.2) !important;
}
.ody-theme-light.ody-matrix-mode .navbar {
  background: rgba(255,255,255,0.92) !important;
  border-bottom: 1px solid rgba(0,150,200,.25) !important;
  box-shadow:
    0 4px 30px rgba(0,0,0,.08),
    0 0 40px rgba(0,150,200,.06) !important;
}
.ody-theme-light.ody-matrix-mode .modal-box {
  background: rgba(255,255,255,0.97) !important;
  border: 1px solid rgba(0,150,200,.3) !important;
}
.ody-theme-light.ody-matrix-mode #mx-scanlines {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  ) !important;
  opacity: 0.3 !important;
}
.ody-theme-light.ody-matrix-mode #mx-vignette {
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.12) 100%) !important;
  opacity: 0.4 !important;
}
.ody-theme-light.ody-matrix-mode ::selection {
  background: rgba(0,150,200,.3) !important;
}
.ody-theme-light.ody-matrix-mode .user-dropdown,
.ody-theme-light.ody-matrix-mode .notif-panel {
  background: rgba(255,255,255,0.97) !important;
}

/* ===== ANIMATION INTENSITY BOOST ===== */
.ody-matrix-mode .ody-hero__orb {
  animation-duration: 15s !important;
  filter: drop-shadow(0 0 12px rgba(0,229,255,.25)) !important;
}
.ody-matrix-mode .ody-welcome-3d {
  animation-duration: 2.5s !important;
  filter: drop-shadow(0 0 28px rgba(0,229,255,.35)) !important;
}
.ody-matrix-mode .ody-3d-check__ring {
  animation-duration: .6s !important;
}
.ody-matrix-mode .ody-3d-check__tick svg {
  filter: drop-shadow(0 0 12px #00ff88) !important;
}

/* ===== EXTRA: HOVER SPOTLIGHT ON CARDS ===== */
.ody-matrix-mode .card,
.ody-matrix-mode .course-card,
.ody-matrix-mode .ocard {
  background-image: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(0,229,255,.06) 0%,
    transparent 50%
  ) !important;
  background-size: 200% 200% !important;
}
