/* ==========================================================================
   ManaSentry Oracle Suite - Dedicated SaaS Architecture CSS
   Outfit & JetBrains Mono | Full Light & Dark Mode Parity | Pure SVG Outlines
   ========================================================================== */

:root {
  --os-bg-dark: #070913;
  --os-bg-gradient: radial-gradient(ellipse at 50% 12%, rgba(0, 242, 254, 0.12) 0%, rgba(7, 9, 19, 0.95) 65%, #070913 100%);
  --os-card-bg: rgba(13, 21, 39, 0.75);
  --os-card-border: rgba(0, 242, 254, 0.2);
  --os-card-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --os-text-main: #f8fafc;
  --os-text-muted: #94a3b8;
  --os-primary-cyan: #00f2fe;
  --os-secondary-blue: #00b4db;
  --os-btn-cta-bg: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --os-btn-cta-text: #070913;
  --os-btn-cta-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
  --os-input-bg: rgba(9, 15, 28, 0.85);
  --os-input-border: rgba(0, 242, 254, 0.25);
  --os-header-bg: rgba(7, 9, 19, 0.92);
  --os-subnav-bg: rgba(8, 12, 22, 0.96);
  --os-footer-bg: linear-gradient(180deg, rgba(8, 12, 22, 0.98) 0%, #04070e 100%);
  --os-footer-border: rgba(0, 242, 254, 0.2);
}

:root[data-theme="light"] {
  --os-bg-dark: #f4f6fb;
  --os-bg-gradient: radial-gradient(ellipse at 50% 12%, rgba(2, 132, 199, 0.1) 0%, rgba(244, 246, 251, 0.95) 65%, #f4f6fb 100%);
  --os-card-bg: #ffffff;
  --os-card-border: #e2e8f0;
  --os-card-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --os-text-main: #0f172a;
  --os-text-muted: #475569;
  --os-primary-cyan: #0284c7;
  --os-secondary-blue: #0369a1;
  --os-btn-cta-bg: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  --os-btn-cta-text: #ffffff;
  --os-btn-cta-shadow: 0 4px 16px rgba(217, 119, 6, 0.3);
  --os-input-bg: #ffffff;
  --os-input-border: rgba(2, 132, 199, 0.35);
  --os-header-bg: rgba(255, 255, 255, 0.94);
  --os-subnav-bg: rgba(248, 250, 252, 0.98);
  --os-footer-bg: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  --os-footer-border: rgba(2, 132, 199, 0.3);
}

/* ==========================================================================
   GLOBAL BODY & WRAPPER
   ========================================================================== */
.oracle-suite-body {
  background: var(--os-bg-dark);
  background-image: var(--os-bg-gradient);
  background-attachment: fixed;
  color: var(--os-text-main);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ==========================================================================
   HEADER GLOBALE (STILE MODERN SAAS EDHCHECK)
   ========================================================================== */
.os-header {
  position: relative;
  z-index: 900;
  background: var(--os-header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--os-card-border);
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s ease;
}

.os-brand-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.os-header-logo {
  height: 32px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.5));
  vertical-align: middle;
  transition: all 0.2s ease;
}
:root[data-theme="light"] .os-header-logo {
  filter: drop-shadow(0 0 6px rgba(2, 132, 199, 0.25));
}

/* Logo Bicolore Opzione 3: Outfit 800 + Doppio Gradiente */
.os-brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 0;
  line-height: 1.1;
  display: inline-block;
  font-family: 'Outfit', sans-serif;
}
.os-brand-title .mana-part {
  background: linear-gradient(135deg, #e0f2fe 0%, #7dd3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.os-brand-title .sentry-part {
  background: linear-gradient(135deg, #00f2fe 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
:root[data-theme="light"] .os-brand-title .mana-part {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
:root[data-theme="light"] .os-brand-title .sentry-part {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.os-brand-version {
  font-size: 0.70rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--os-primary-cyan);
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  vertical-align: middle;
  white-space: nowrap;
}
:root[data-theme="light"] .os-brand-version {
  background: rgba(2, 132, 199, 0.1) !important;
  border-color: rgba(2, 132, 199, 0.3) !important;
  color: #0284c7 !important;
}

/* Macro-Pilastri Navigation in Header */
.os-macro-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.os-macro-tab,
.top-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--os-text-muted);
  padding: 6px 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.80rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.os-macro-tab:hover,
.top-tab-btn:hover {
  color: var(--os-primary-cyan);
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.3);
}

.os-macro-tab.active,
.top-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(0, 180, 219, 0.15));
  color: var(--os-primary-cyan);
  border-color: rgba(0, 242, 254, 0.5);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

:root[data-theme="light"] .os-macro-tab,
:root[data-theme="light"] .top-tab-btn {
  color: #475569 !important;
}

:root[data-theme="light"] .os-macro-tab:hover,
:root[data-theme="light"] .top-tab-btn:hover {
  color: #0284c7 !important;
  background: rgba(2, 132, 199, 0.08) !important;
  border-color: rgba(2, 132, 199, 0.3) !important;
}

:root[data-theme="light"] .os-macro-tab.active,
:root[data-theme="light"] .top-tab-btn.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(0, 180, 219, 0.12)) !important;
  color: #0284c7 !important;
  border-color: rgba(2, 132, 199, 0.45) !important;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.15) !important;
}

/* Barra Avvisi Full-Width a Scorrimento Continuo */
@keyframes tickerFullScroll {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

.ms-announcement-bar {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background: rgba(11, 19, 41, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px var(--ticker-glow, rgba(0, 0, 0, 0.4));
  padding: 8px 0;
  overflow: hidden;
  z-index: 90;
  position: relative;
  transition: all 0.3s ease;
}

.ms-ticker-track {
  width: 100vw;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.ms-ticker-content {
  display: inline-block;
  white-space: nowrap;
  animation: tickerFullScroll var(--ticker-duration, 25s) linear infinite;
  will-change: transform;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ticker-accent, #f59e0b);
  text-shadow: 0 0 10px var(--ticker-glow, rgba(245, 158, 11, 0.32));
  letter-spacing: 0.3px;
  cursor: default;
}

.ms-ticker-content:hover {
  animation-play-state: paused;
}

:root[data-theme="light"] .ms-announcement-bar {
  background: #ffffff !important;
  border-top: 1px solid rgba(203, 213, 225, 0.9) !important;
  border-bottom: 1px solid rgba(203, 213, 225, 0.9) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
}

/* Isolamento Gruppi Subpage */
.main-subpage-content {
  display: none;
}
.main-subpage-content.active {
  display: block;
}

/* Command Center Button */
.os-btn-command-center {
  background: rgba(0, 242, 254, 0.08);
  color: var(--os-primary-cyan);
  border: 1px solid rgba(0, 242, 254, 0.35);
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.80rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.os-btn-command-center:hover {
  background: rgba(0, 242, 254, 0.18);
  border-color: var(--os-primary-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
  transform: translateY(-1px);
}

:root[data-theme="light"] .os-btn-command-center {
  background: rgba(2, 132, 199, 0.08) !important;
  color: #0284c7 !important;
  border-color: rgba(2, 132, 199, 0.35) !important;
}

:root[data-theme="light"] .os-btn-command-center:hover {
  background: rgba(2, 132, 199, 0.15) !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.2) !important;
}

.os-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.os-btn-theme-toggle {
  background: transparent;
  border: 1px solid var(--os-card-border);
  color: var(--os-text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}
.os-btn-theme-toggle:hover {
  color: var(--os-primary-cyan);
  border-color: var(--os-primary-cyan);
}

.os-btn-action {
  background: var(--os-btn-cta-bg);
  color: var(--os-btn-cta-text);
  box-shadow: var(--os-btn-cta-shadow);
  border: none;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.os-btn-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* ==========================================================================
   SUB-NAVBAR TABS CON LE 9 FUNZIONALITÀ (2 RIGHE CENTRATE, ZERO SCROLLBAR)
   ========================================================================== */
.os-tools-subnav {
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 2px;
  z-index: 10;
}

.os-sub-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 1024px) {
  .autobuy-two-col-grid,
  .reverse-lotti-grid {
    grid-template-columns: 1fr !important;
  }
}

.os-tools-subnav-inner {
  max-width: min(96%, 1680px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.os-tools-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.os-tool-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--os-text-muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
}
.os-tool-tab-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--os-primary-cyan);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}
.os-tool-tab-btn:hover {
  color: var(--os-text-main);
  background: rgba(0, 242, 254, 0.06);
  border-color: var(--os-card-border);
}
.os-tool-tab-btn.active {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--os-primary-cyan);
  color: var(--os-primary-cyan);
}
:root[data-theme="light"] .os-tool-tab-btn.active {
  background: rgba(2, 132, 199, 0.12);
  border-color: var(--os-primary-cyan);
  color: var(--os-primary-cyan);
}

/* Tool Tab Disabilitato con Tooltip Informativo */
.os-tool-tab-btn.os-tool-tab-locked,
.os-tool-tab-btn.totem-nav-locked {
  opacity: 0.45;
  filter: grayscale(1);
  cursor: not-allowed !important;
  color: #64748b !important;
  background: transparent !important;
  border-color: transparent !important;
  position: relative;
  user-select: none;
}
.os-tool-tab-btn.os-tool-tab-locked svg,
.os-tool-tab-btn.totem-nav-locked svg {
  stroke: #64748b !important;
}
.os-tool-tab-btn.os-tool-tab-locked:hover,
.os-tool-tab-btn.totem-nav-locked:hover {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #64748b !important;
}
:root[data-theme="light"] .os-tool-tab-btn.os-tool-tab-locked,
:root[data-theme="light"] .os-tool-tab-btn.totem-nav-locked {
  opacity: 0.55;
  color: #94a3b8 !important;
}
:root[data-theme="light"] .os-tool-tab-btn.os-tool-tab-locked svg,
:root[data-theme="light"] .os-tool-tab-btn.totem-nav-locked svg {
  stroke: #94a3b8 !important;
}

/* Vignetta / Tooltip Informativo */
.os-locked-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(15, 23, 42, 0.96);
  color: #f1f5f9;
  border: 1px solid rgba(0, 242, 254, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 12px rgba(0, 242, 254, 0.15);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 1000;
}
.os-locked-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.96) transparent transparent transparent;
}
.os-tool-tab-locked:hover .os-locked-tooltip,
.os-tool-tab-locked:focus .os-locked-tooltip,
.os-tool-tab-locked:focus-within .os-locked-tooltip,
.totem-nav-locked:hover .os-locked-tooltip,
.totem-nav-locked:focus .os-locked-tooltip,
.totem-nav-locked:focus-within .os-locked-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
:root[data-theme="light"] .os-locked-tooltip {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #0284c7 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 0 8px rgba(2, 132, 199, 0.12) !important;
}
:root[data-theme="light"] .os-locked-tooltip::after {
  border-color: #ffffff transparent transparent transparent !important;
}

/* Sub-Tool Panes (Professional Tools & Sorcerer Tools) */
.pro-tool-pane,
.sorc-tool-pane {
  display: none;
  width: 100%;
}

.pro-tool-pane.active,
.sorc-tool-pane.active {
  display: block;
}

/* ==========================================================================
   MAIN HERO VIEWPORT (SAAS EDHCHECK-INSPIRED)
   ========================================================================== */
.os-hero-viewport {
  max-width: min(96%, 1680px);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 80px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.os-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--os-text-main);
  line-height: 1.15;
}

.os-hero-subtitle {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--os-text-muted);
  max-width: 660px;
  margin: 0 auto 32px auto;
}

/* Big Hero Card */
.os-hero-card {
  width: 100%;
  background: var(--os-card-bg);
  border: 1px solid var(--os-card-border);
  box-shadow: var(--os-card-shadow);
  border-radius: 16px;
  padding: 28px 32px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-bottom: 32px;
  text-align: left;
  position: relative;
  transition: all 0.25s ease;
}

/* ==========================================================================
   MODE TOGGLE GROUP (SINGLES VS SET COMPLETI)
   ========================================================================== */
.os-mode-toggle-group {
  display: inline-flex;
  background: rgba(7, 13, 25, 0.7);
  border: 1px solid var(--os-card-border);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 20px;
}
:root[data-theme="light"] .os-mode-toggle-group {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.os-btn-mode-toggle {
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--os-text-muted);
  background: transparent;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.os-btn-mode-toggle svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.os-btn-mode-toggle.active {
  color: #ffffff;
  background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
  border-color: var(--os-primary-cyan);
  box-shadow: 0 0 14px rgba(0, 180, 219, 0.4);
}
:root[data-theme="light"] .os-btn-mode-toggle.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

/* ==========================================================================
   HERO SEARCH INPUT BOX & QUICK TAGS
   ========================================================================== */
.os-search-box {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}
.os-search-box svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--os-text-muted);
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}
.os-search-input {
  width: 100%;
  background: var(--os-input-bg);
  border: 1px solid var(--os-input-border);
  color: var(--os-text-main);
  padding: 14px 18px 14px 48px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}
.os-search-input:focus {
  border-color: var(--os-primary-cyan);
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.15);
}

.os-quick-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.os-quick-tag {
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  color: var(--os-primary-cyan);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.80rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.os-quick-tag:hover {
  background: rgba(0, 242, 254, 0.18);
  border-color: var(--os-primary-cyan);
}
:root[data-theme="light"] .os-quick-tag {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0369a1;
}

/* Sets Parameters Grid */
.os-params-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
:root[data-theme="light"] .os-params-grid {
  border-top-color: #e2e8f0;
}
.os-param-group label {
  display: block;
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--os-text-muted);
  margin-bottom: 6px;
  text-align: center;
}
.os-param-pills {
  display: flex;
  background: rgba(7, 13, 25, 0.6);
  border: 1px solid var(--os-card-border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
:root[data-theme="light"] .os-param-pills {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.os-param-pill {
  flex: 1;
  text-align: center;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  color: var(--os-text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.15s ease;
}
.os-param-pill.active {
  background: var(--os-primary-cyan);
  color: #070913;
  font-weight: 700;
}
:root[data-theme="light"] .os-param-pill.active {
  background: #0284c7;
  color: #ffffff;
}

/* ==========================================================================
   LE PROPOSTE DELL'ORACOLO (CARDS & HIGHLIGHTS)
   ========================================================================== */
.os-featured-container {
  width: 100%;
  background: var(--os-card-bg);
  border: 1px solid var(--os-card-border);
  box-shadow: var(--os-card-shadow);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 36px;
  text-align: left;
}
.os-featured-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
:root[data-theme="light"] .os-featured-header {
  border-bottom-color: #e2e8f0;
}
.os-featured-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--os-text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.os-featured-header h3 svg {
  width: 18px;
  height: 18px;
  stroke: var(--os-primary-cyan);
  fill: none;
  stroke-width: 2;
}

.os-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.os-featured-card {
  background: rgba(7, 13, 25, 0.5);
  border: 1px solid rgba(0, 242, 254, 0.15);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: all 0.2s ease;
}
:root[data-theme="light"] .os-featured-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.os-featured-card:hover {
  border-color: var(--os-primary-cyan);
  transform: translateY(-2px);
}
.os-featured-img {
  width: 64px;
  height: 89px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.os-featured-info {
  flex: 1;
  min-width: 0;
}
.os-featured-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--os-primary-cyan);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}
.os-featured-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--os-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.os-featured-set {
  font-size: 0.75rem;
  color: var(--os-text-muted);
  margin-bottom: 6px;
}
.os-featured-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--os-primary-cyan);
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   FOOTER ISTITUZIONALE MANASENTRY
   ========================================================================== */
.os-footer {
  background: var(--os-footer-bg);
  border-top: 1px solid var(--os-footer-border);
  padding: 48px 24px 28px 24px;
  font-size: 0.85rem;
  color: var(--os-text-muted);
  margin-top: auto;
}
.os-footer-container {
  max-width: min(96%, 1680px);
  margin: 0 auto;
}
.os-footer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
:root[data-theme="light"] .os-footer-header {
  border-bottom-color: #cbd5e1;
}

.os-footer-brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 0;
  line-height: 1.1;
  display: inline-block;
  font-family: 'Outfit', sans-serif;
}
.os-footer-brand-title .mana-part {
  background: linear-gradient(135deg, #e0f2fe 0%, #7dd3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.os-footer-brand-title .sentry-part {
  background: linear-gradient(135deg, #00f2fe 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
:root[data-theme="light"] .os-footer-brand-title .mana-part {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
:root[data-theme="light"] .os-footer-brand-title .sentry-part {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.os-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 36px;
}
.os-footer-col h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--os-text-main);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.os-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.os-footer-col li {
  margin-bottom: 8px;
}
.os-footer-col a {
  color: var(--os-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.os-footer-col a:hover {
  color: var(--os-primary-cyan);
}

.os-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
}
:root[data-theme="light"] .os-footer-bottom {
  border-top-color: #cbd5e1;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .os-header {
    padding: 10px 16px;
  }
  .os-hero-viewport {
    padding: 24px 16px 60px 16px;
  }
  .os-hero-title {
    font-size: 1.85rem;
  }
  .os-hero-card {
    padding: 20px 16px;
  }
  .os-tools-subnav {
    padding: 8px 12px;
  }
  .os-tool-tab-btn {
    font-size: 0.76rem;
    padding: 6px 10px;
  }
}

/* Deck Composer Grid 2 Columns */
.composer-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  width: 100%;
}
.composer-grid-2 > div {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 1200px) {
  .composer-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Global Game Selector Option Styling */
.oracle-game-select option {
  background-color: #09101d !important;
  color: #f1f5f9 !important;
  font-family: 'Outfit', sans-serif;
  padding: 6px 10px;
}
:root[data-theme="light"] .top-nav-game-box {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(2, 132, 199, 0.35) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}
:root[data-theme="light"] .oracle-game-select {
  color: #0284c7 !important;
}
:root[data-theme="light"] .oracle-game-select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Hardening for nested search boxes in Light Mode */
:root[data-theme="light"] .trade-search-input,
:root[data-theme="light"] .oracle-sets-search-input,
:root[data-theme="light"] .trade-search-box input,
:root[data-theme="light"] .oracle-sets-search-box input {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  color: #0f172a !important;
}

.trade-search-box:focus-within,
.oracle-sets-search-box:focus-within {
  border-color: #00e5ff !important;
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.25) !important;
}
:root[data-theme="light"] .trade-search-box:focus-within,
:root[data-theme="light"] .oracle-sets-search-box:focus-within {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2) !important;
}

/* ==========================================================================
   ORACLE SUITE: TOP-TIER FILTER BAR & BALANCED 3-METRIC PRICING GRID
   ========================================================================== */
.segmented-filter-bar {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 242, 254, 0.15);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-sizing: border-box;
}

:root[data-theme="light"] .segmented-filter-bar {
  background: #ffffff;
  border-color: rgba(2, 132, 199, 0.25);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.price-liquidity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .price-liquidity-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: rgba(0, 180, 219, 0.04);
  border: 1px solid rgba(0, 180, 219, 0.18);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  min-width: 0;
  transition: all 0.2s ease;
}

.kpi-card:hover {
  border-color: rgba(0, 242, 254, 0.35);
  box-shadow: 0 4px 16px rgba(0, 242, 254, 0.08);
}

:root[data-theme="light"] .kpi-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

:root[data-theme="light"] .kpi-card:hover {
  border-color: #0284c7;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.12);
}

:root[data-theme="light"] #oracle-card-price {
  color: #0284c7 !important;
}

:root[data-theme="light"] #oracle-card-real-value {
  color: #0284c7 !important;
}

:root[data-theme="light"] #oracle-card-cheapest-price {
  color: #0369a1 !important;
}

:root[data-theme="light"] #oracle-card-cheapest-set {
  color: #475569 !important;
}

:root[data-theme="light"] .oracle-filter-label {
  color: #64748b !important;
}

/* --- ORACLE METHODOLOGY CAPSULE & DRAWER --- */
.oracle-info-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.35);
  color: #00f2fe;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  margin-left: 8px;
}
.oracle-info-btn:hover {
  background: rgba(0, 242, 254, 0.18);
  border-color: #00f2fe;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
}
:root[data-theme="light"] .oracle-info-btn {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.4);
  color: #0284c7;
}
:root[data-theme="light"] .oracle-info-btn:hover {
  background: rgba(2, 132, 199, 0.16);
  border-color: #0284c7;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.2);
}
:root[data-theme="light"] #oracle-info-drawer {
  background: #f8fafc !important;
  border-color: rgba(2, 132, 199, 0.25) !important;
}
:root[data-theme="light"] #oracle-info-drawer p {
  color: #334155 !important;
}

/* ==========================================================================
   ORACLE SUITE TABLE ZEBRA STRIPING & ROW VISIBILITY (DARK & LIGHT MODE)
   ========================================================================== */
table tbody tr:nth-child(odd),
.data-table tbody tr:nth-child(odd),
.deck-table tbody tr:nth-child(odd),
.oracle-sets-table tbody tr:nth-child(odd),
.oracle-editions-table tbody tr:nth-child(odd),
.trade-table tbody tr:nth-child(odd),
#table-spikes tbody tr:nth-child(odd),
#table-scarcity tbody tr:nth-child(odd) {
  background-color: transparent;
}

table tbody tr:nth-child(even),
.data-table tbody tr:nth-child(even),
.deck-table tbody tr:nth-child(even),
.oracle-sets-table tbody tr:nth-child(even),
.oracle-editions-table tbody tr:nth-child(even),
.trade-table tbody tr:nth-child(even),
#table-spikes tbody tr:nth-child(even),
#table-scarcity tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.025) !important;
}

table tbody tr:hover,
.data-table tbody tr:hover,
.deck-table tbody tr:hover,
.oracle-sets-table tbody tr:hover,
.oracle-editions-table tbody tr:hover,
.trade-table tbody tr:hover,
#table-spikes tbody tr:hover,
#table-scarcity tbody tr:hover {
  background-color: rgba(0, 242, 254, 0.08) !important;
  transition: background-color 0.15s ease-in-out;
}

:root[data-theme="light"] table tbody tr:nth-child(odd),
:root[data-theme="light"] .data-table tbody tr:nth-child(odd),
:root[data-theme="light"] .deck-table tbody tr:nth-child(odd),
:root[data-theme="light"] .oracle-sets-table tbody tr:nth-child(odd),
:root[data-theme="light"] .oracle-editions-table tbody tr:nth-child(odd),
:root[data-theme="light"] .trade-table tbody tr:nth-child(odd),
:root[data-theme="light"] #table-spikes tbody tr:nth-child(odd),
:root[data-theme="light"] #table-scarcity tbody tr:nth-child(odd) {
  background-color: #ffffff !important;
}

:root[data-theme="light"] table tbody tr:nth-child(even),
:root[data-theme="light"] .data-table tbody tr:nth-child(even),
:root[data-theme="light"] .deck-table tbody tr:nth-child(even),
:root[data-theme="light"] .oracle-sets-table tbody tr:nth-child(even),
:root[data-theme="light"] .oracle-editions-table tbody tr:nth-child(even),
:root[data-theme="light"] .trade-table tbody tr:nth-child(even),
:root[data-theme="light"] #table-spikes tbody tr:nth-child(even),
:root[data-theme="light"] #table-scarcity tbody tr:nth-child(even) {
  background-color: #f8fafc !important;
}

:root[data-theme="light"] table tbody tr:hover,
:root[data-theme="light"] .data-table tbody tr:hover,
:root[data-theme="light"] .deck-table tbody tr:hover,
:root[data-theme="light"] .oracle-sets-table tbody tr:hover,
:root[data-theme="light"] .oracle-editions-table tbody tr:hover,
:root[data-theme="light"] .trade-table tbody tr:hover,
:root[data-theme="light"] #table-spikes tbody tr:hover,
:root[data-theme="light"] #table-scarcity tbody tr:hover {
  background-color: #f0f9ff !important;
  transition: background-color 0.15s ease-in-out;
}



