/* ==========================================================================
   GROK SUPER × CHATGPT UNIFIED PLATFORM ENHANCEMENTS
   - Smooth page & card transitions (@view-transition, scroll reveal, glass glow)
   - Two-Sites-in-One Mode Switcher in top navbar
   - Built-in Payment & Subscription Modal (RUB/SBP, USDT TRC-20/BEP-20, Bitunix, Boosty)
   - OBS Studio Stream Control Lock Modal (Owner-only unlock)
   ========================================================================== */

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: grokFadeOut 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}
::view-transition-new(root) {
  animation: grokFadeIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes grokFadeOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-6px) scale(0.995); }
}
@keyframes grokFadeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.995); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Smooth glassmorphic cards & buttons hover glow */
.conversion-card,
.directory-card,
.library-card,
.learning-card,
.fresh-card,
.oil-forecast-card,
.news-card,
.tournament-side,
.tournament-core {
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.36s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.36s ease,
              background-color 0.36s ease !important;
  backdrop-filter: blur(14px) saturate(1.18);
  -webkit-backdrop-filter: blur(14px) saturate(1.18);
}

.conversion-card:hover,
.directory-card:hover,
.library-card:hover,
.learning-card:hover,
.fresh-card:hover,
.oil-forecast-card:hover,
.news-card:hover,
.tournament-side:hover {
  transform: translateY(-5px) scale(1.008);
  border-color: rgba(201, 239, 130, 0.65) !important;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.46),
              0 0 28px rgba(201, 239, 130, 0.16) !important;
}

.btn,
.conversion-primary,
.conversion-quick,
.fresh-cta,
.tournament-join {
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.24s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.24s ease,
              border-color 0.24s ease !important;
}

.btn:hover,
.conversion-primary:hover,
.fresh-cta:hover,
.tournament-join:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(201, 239, 130, 0.28),
              0 0 18px rgba(201, 239, 130, 0.22);
}

.btn-outline {
  background: rgba(12, 34, 23, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(201, 239, 130, 0.42);
}
.btn-outline:hover {
  background: rgba(25, 62, 41, 0.62);
  border-color: rgba(201, 239, 130, 0.85);
}

/* Scroll reveal animation */
.grok-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.grok-reveal.grok-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   TWO-SITES-IN-ONE TOP SWITCHER & NAV BUTTONS
   ========================================================================== */
.grok-mode-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(4, 14, 10, 0.82);
  border: 1px solid rgba(201, 239, 130, 0.42);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(201, 239, 130, 0.08);
}

.grok-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  color: #cfe3c8;
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s ease;
}

.grok-mode-btn:hover {
  color: #ffffff;
  background: rgba(201, 239, 130, 0.14);
}

.grok-mode-btn.active {
  background: linear-gradient(135deg, #c9ef82, #9be15d);
  color: #06150e;
  box-shadow: 0 3px 14px rgba(201, 239, 130, 0.38);
}

.grok-mode-btn.work-btn:not(.active) {
  color: #fde68a;
}

.grok-nav-terminal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.55);
  color: #fde68a !important;
  white-space: nowrap;
  transition: all 0.22s ease;
}
.grok-nav-terminal:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #07130f !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.45);
}

.grok-nav-ai {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.52);
  color: #bae6fd !important;
  white-space: nowrap;
  transition: all 0.22s ease;
}
.grok-nav-ai:hover {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #04131d !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
}

.grok-obs-lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.48);
  color: #fecaca;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s ease;
}
.grok-obs-lock-btn:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: #f87171;
  color: #ffffff;
}
.grok-obs-lock-btn.unlocked {
  background: rgba(16, 185, 129, 0.2);
  border-color: #34d399;
  color: #a7f3d0;
}

/* ==========================================================================
   MODAL OVERLAY (PAYMENT GATEWAY & OBS STUDIO OWNER LOCK)
   ========================================================================== */
.grok-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(3, 10, 7, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.grok-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.grok-modal-card {
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(145deg, rgba(14, 38, 25, 0.96), rgba(6, 18, 12, 0.98));
  border: 1px solid rgba(201, 239, 130, 0.45);
  border-radius: 22px;
  padding: 26px;
  color: #eef5ec;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.75), 0 0 40px rgba(201, 239, 130, 0.12);
  position: relative;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.grok-modal-backdrop.open .grok-modal-card {
  transform: translateY(0) scale(1);
}

.grok-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(201, 239, 130, 0.35);
  background: rgba(8, 24, 16, 0.8);
  color: #d9e8d4;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.grok-modal-close:hover {
  background: #c9ef82;
  color: #06150e;
}

.grok-pay-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 14px 0;
}
@media (max-width: 560px) {
  .grok-pay-methods { grid-template-columns: 1fr; }
}

.grok-pay-tab {
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(201, 239, 130, 0.25);
  background: rgba(9, 27, 18, 0.72);
  color: #d7e6d2;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}
.grok-pay-tab:hover {
  border-color: rgba(201, 239, 130, 0.6);
}
.grok-pay-tab.active {
  background: linear-gradient(135deg, rgba(201, 239, 130, 0.24), rgba(29, 78, 49, 0.55));
  border-color: #c9ef82;
  color: #ffffff;
  box-shadow: 0 0 18px rgba(201, 239, 130, 0.2);
}

.grok-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(201, 239, 130, 0.32);
  background: rgba(4, 13, 9, 0.85);
  color: #ffffff;
  font-size: 14px;
  margin-top: 6px;
  margin-bottom: 12px;
}
.grok-input:focus {
  outline: 2px solid #c9ef82;
  border-color: transparent;
}

.grok-wallet-box {
  background: rgba(4, 12, 8, 0.9);
  border: 1px dashed rgba(201, 239, 130, 0.5);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 10px 0 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: #c9ef82;
  word-break: break-all;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.grok-card-pay-btn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  background: linear-gradient(135deg, #c9ef82, #9be15d);
  color: #06150e !important;
  border: none;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(201, 239, 130, 0.25);
}
.grok-card-pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(201, 239, 130, 0.4);
}


/* ==========================================================================
   TOURNAMENT PAGES: FULLSCREEN BULL/BEAR/TROPHY ART + PULSING TOP-CENTER CTA
   ========================================================================== */
body[data-topic="tournament"] {
  background-image: url("bitunix-fullscreen-bg.png") !important;
  background-size: 100% 100% !important;
  background-position: center top !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
}
@media (min-width: 1360px) {
  body[data-topic="tournament"] .wrap,
  body[data-topic="tournament"] main > section > .wrap {
    max-width: min(64vw, 1040px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@keyframes grokPulseTopJoin {
  0%, 100% {
    box-shadow: 0 0 18px rgba(155, 255, 90, 0.78), 0 0 36px rgba(255, 216, 77, 0.55);
    transform: translateX(-50%) scale(1);
  }
  50% {
    box-shadow: 0 0 30px rgba(155, 255, 90, 1), 0 0 56px rgba(255, 216, 77, 0.95);
    transform: translateX(-50%) scale(1.03);
  }
}

.grok-top-center-tournament-cta {
  position: fixed;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 980;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd84d 0%, #9bff5a 55%, #f59e0b 100%);
  color: #05140b !important;
  font-weight: 900;
  font-size: clamp(12.5px, 1.1vw, 15.5px);
  text-decoration: none !important;
  border: 2px solid #ffffff;
  white-space: nowrap;
  animation: grokPulseTopJoin 2.2s infinite ease-in-out;
}

/* ==========================================================================
   STREAM, WORKSPACE & SALES PAGES: WIDER WORKSPACE + SIDE CONVERSION RAILS
   ========================================================================== */
@media (min-width: 1360px) {
  body:not([data-topic="tournament"]) .wrap {
    max-width: 1360px !important;
  }
}

.grok-side-rail {
  display: none;
}
@media (min-width: 1520px) {
  body:not([data-topic="tournament"]) .grok-side-rail {
    position: fixed;
    top: 118px;
    width: 196px;
    z-index: 880;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(6, 18, 12, 0.90);
    backdrop-filter: blur(14px);
    border: 1.5px solid rgba(155, 255, 90, 0.45);
    border-radius: 18px;
    padding: 12px 10px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
  }
  body:not([data-topic="tournament"]) .grok-side-rail.left-rail {
    left: 10px;
  }
  body:not([data-topic="tournament"]) .grok-side-rail.right-rail {
    right: 12px;
    top: auto !important;
    bottom: 14px !important;
    border-color: rgba(255, 216, 77, 0.55);
  }
}
.grok-rail-title {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ffe268;
  text-align: center;
  margin-bottom: 2px;
}
.grok-rail-btn {
  display: block;
  text-decoration: none !important;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  color: #f1faf4 !important;
  background: rgba(18, 46, 30, 0.92);
  border: 1px solid rgba(155, 255, 90, 0.42);
  line-height: 1.28;
  transition: 0.2s;
}
.grok-rail-btn:hover {
  transform: translateY(-2px);
  border-color: #ffe268;
  background: rgba(28, 68, 44, 0.98);
}
.grok-rail-btn.gold {
  background: linear-gradient(135deg, #ffd84d, #e59b12);
  color: #06150c !important;
  border-color: #fff;
}


/* In workspace-hub.html (.studio-layout), dock the rails cleanly inside the columns so they never cover top cards */
.studio-layout .grok-side-rail {
  position: static !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column;
  gap: 6px;
  background: rgba(6, 18, 12, 0.92);
  border: 1.5px solid rgba(255, 216, 77, 0.55);
  border-radius: 14px;
  padding: 11px 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  margin-top: 4px;
}
.studio-layout .grok-side-rail .grok-rail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
