/* ================================================================
   MORBET CUSTOM CSS
   1. Tema değişkenleri
   2. Canlı destek / VIP panel
   3. Mobil alt menü
   4. Oyun ekranı kuralları
   ================================================================ */

/* -------------------- 1. TEMA DEĞİŞKENLERİ -------------------- */
:root {
  --mor-main: #a706fe;
  --mor-pink: #fb00ff;
  --mor-gold: #f0a900;
  --mor-dark: #050008;
  --mor-panel: #130018;
  --mor-white: #fff;
  --mor-nav-height: 65px;
}

/* -------------------- 2. CANLI DESTEK / VIP PANEL -------------------- */
.fixed.bottom-0.md\:bottom-6.right-0.md\:right-6.z-50 { border: 0 !important; }

.fixed.bottom-0.md\:bottom-6.right-0.md\:right-6.z-50 > div:first-child {
  min-height: 78px !important;
  background: linear-gradient(135deg, #000, var(--mor-main), var(--mor-pink)) !important;
}

.fixed.bottom-0.md\:bottom-6 .flex-1.p-6.flex.flex-col.justify-center.bg-white {
  justify-content: flex-start !important;
  overflow-y: auto !important;
  padding: 14px !important;
  background: linear-gradient(180deg, #16001f, var(--mor-dark)) !important;
}

/* VIP panel eklendiğinde orijinal giriş alanlarını gizler. */
.fixed.bottom-0.md\:bottom-6 .flex-1.p-6.flex.flex-col.justify-center.bg-white:has(.mor-vip-support) > .text-center,
.fixed.bottom-0.md\:bottom-6 .flex-1.p-6.flex.flex-col.justify-center.bg-white:has(.mor-vip-support) > .space-y-4,
.fixed.bottom-0.md\:bottom-6 .flex-1.p-6.flex.flex-col.justify-center.bg-white:has(.mor-vip-support) > button:first-of-type,
.fixed.bottom-0.md\:bottom-6.right-0.md\:right-6.z-50 button:has(.lucide-plus) {
  display: none !important;
}

.mor-vip-support { display: flex; flex-direction: column; gap: 10px; }
.mor-secure-bar, .mor-online-row, .mor-vip-card, .mor-channel {
  border: 1px solid rgba(251, 0, 255, .28);
  border-radius: 16px;
  background: linear-gradient(180deg, #190021, #09000d);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .38);
}
.mor-secure-bar { display: flex; justify-content: space-between; padding: 9px 12px; color: #eee; font-size: 12px; }
.mor-secure-bar b, .mor-channels-title { color: var(--mor-gold); }
.mor-online-row { overflow: hidden; padding: 10px 14px; }
.mor-online-viewport { width: 100%; overflow: hidden; }
.mor-online-track { display: flex; gap: 30px; white-space: nowrap; animation: morOnlineScroll 18s linear infinite; }
.mor-online-track span { color: #fff; font-size: 13px; font-weight: 800; }
.mor-online-track span::before { content: "●"; margin-right: 8px; color: var(--mor-pink); }
.mor-vip-card { padding: 16px; }
.mor-agent { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.mor-agent-logo { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; color: #fff; font-size: 26px; font-weight: 900; background: linear-gradient(135deg, var(--mor-pink), var(--mor-main), var(--mor-gold)); }
.mor-agent h4 { margin: 0 !important; color: #fff !important; font-size: 17px !important; font-weight: 900 !important; }
.mor-agent p { margin: 2px 0 0 !important; color: #cfc3d8 !important; font-size: 12px !important; }
.mor-vip-desc { color: #e3d7ea; font-size: 13px; line-height: 1.5; }
.mor-safe-badge { width: fit-content; margin: 12px auto; padding: 5px 10px; border: 1px solid rgba(240,169,0,.42); border-radius: 999px; color: #fff; background: rgba(240,169,0,.14); font-size: 11px; font-weight: 900; }
.mor-btn { width: 100%; min-height: 48px; margin-top: 8px; border: 0; border-radius: 12px; font-size: 14px; font-weight: 900; cursor: pointer; transition: transform .2s ease; }
.mor-btn:hover { transform: translateY(-1px); }
.mor-btn-main { color: #fff !important; background: linear-gradient(135deg, var(--mor-pink), var(--mor-main), #7000b8) !important; }
.mor-btn-gold { color: #130018 !important; background: linear-gradient(135deg, #ffd45b, var(--mor-gold), #b87800) !important; }
.mor-channels-title { margin: 6px 2px; font-size: 11px; font-weight: 900; letter-spacing: 2px; }
.mor-channel { display: flex; align-items: center; gap: 12px; padding: 12px; cursor: pointer; }
.mor-channel-icon { font-size: 22px; }
.mor-channel strong { color: #fff; font-size: 14px; }
.mor-channel small { color: #c9bfd0; font-size: 11px; }

@keyframes morOnlineScroll { to { transform: translateX(-50%); } }

/* Yeşil sohbet renklerini MorBet temasına çevirir. */
.bg-green-600 { background: linear-gradient(135deg, var(--mor-pink), var(--mor-main), #7000b8) !important; }
.bg-green-500 { background: var(--mor-pink) !important; }
.from-green-500 { --tw-gradient-from: var(--mor-pink) !important; --tw-gradient-to: rgba(251,0,255,0) !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
.to-emerald-600 { --tw-gradient-to: var(--mor-main) !important; }

/* -------------------- 3. MOBİL ALT MENÜ -------------------- */
.mobile-bottom-nav { display: none; }

@media (max-width: 1023px) {
  body { padding-bottom: var(--mor-nav-height) !important; }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 99999999 !important;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: var(--mor-nav-height);
    padding: 0 10px;
    border-top: 1px solid rgba(251,0,255,.45);
    background: #120018;
    box-shadow: 0 -4px 18px rgba(167,6,254,.35);
  }

  .mobile-bottom-nav .nav-item { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff !important; font-size: 11px; font-weight: 700; text-decoration: none; }
  .mobile-bottom-nav .nav-item.active { color: var(--mor-pink) !important; }
  .mobile-bottom-nav .nav-item::before { content: ""; display: block; width: 24px; height: 24px; background-position: center; background-repeat: no-repeat; background-size: contain; filter: drop-shadow(0 0 8px rgba(255,255,255,.18)); }
  .mobile-bottom-nav .nav-item.active::before { filter: brightness(1.25) drop-shadow(0 0 10px rgba(251,0,255,.9)); }
  .mobile-bottom-nav .menu-toggle-btn { display: flex; flex: none; align-items: center; justify-content: center; width: 45px; height: 45px; margin: -45px 5px 0 0; border-radius: 50%; background: linear-gradient(135deg, var(--mor-pink), var(--mor-main), #7000b8); box-shadow: 0 0 22px rgba(251,0,255,.65); scale: 1.3; }
  .mobile-bottom-nav .menu-toggle-btn::before { content: ""; width: 34px; height: 34px; background: url("https://i.ibb.co/bRFnTwYB/menu.png") center/contain no-repeat; }

  .mobile-bottom-nav a[href="/"]::before { background-image: url("https://i.ibb.co/whDJLggh/home-1.png"); }
  .mobile-bottom-nav a[href="/casino"]::before { background-image: url("https://i.ibb.co/p6tHfrZM/seven.png"); }
  .mobile-bottom-nav a[href="/live-casino"]::before { background-image: url("https://i.ibb.co/q3PqBh1H/card-game.png"); }
  .mobile-bottom-nav a[href="/sports"]::before { background-image: url("https://i.ibb.co/rNW7kGV/football-1.png"); }
  .mobile-bottom-nav a[href="/sports/tr/football/live"]::before { background-image: url("https://i.ibb.co/ksM2MFLq/stream.png"); }
  .mobile-bottom-nav a[href="/bonuslar"]::before { background-image: url("https://i.ibb.co/ZCVvyw2/gift-box-with-a-bow-1.png"); }

  .mobile-sidebar-overlay { display: none; position: fixed; z-index: 99999996 !important; inset: 0; background: rgba(0,0,0,.65); }
  body.mobile-sidebar-open .mobile-sidebar-overlay { display: block; }
  body.mobile-sidebar-open { overflow: hidden !important; }

  .fixed.bottom-0.md\:bottom-6.right-0.md\:right-6.z-50 { bottom: var(--mor-nav-height) !important; height: calc(100dvh - var(--mor-nav-height)) !important; max-height: calc(100dvh - var(--mor-nav-height)) !important; }
  a[href*="chatwindow.aspx"] { bottom: 85px !important; }
}

/* -------------------- 4. OYUN EKRANI KURALLARI -------------------- */
/* JS mor-game-open sınıfını URL veya oyun iframe'i görüldüğünde ekler. */
body.mor-game-open { padding-bottom: 0 !important; }
body.mor-game-open .mobile-bottom-nav,
body.mor-game-open .mobile-sidebar-overlay,
body.mor-game-open a[href*="chatwindow.aspx"],
body.mor-game-open div[style*="z-index: 2147483642"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* JS gecikirse modern tarayıcılarda CSS yedeği devreye girer. */
body:has(main iframe) { padding-bottom: 0 !important; }
body:has(main iframe) .mobile-bottom-nav { display: none !important; }

@media (min-width: 1024px) {
  .mobile-bottom-nav, .mobile-sidebar-overlay { display: none !important; }
}

/* Oyun açıldığında BettingVet rozeti ve NovaChat desteğini gizle */
body.mor-game-open .bv-card,
body.mor-game-open #nova-chat-widget-host,
body.mor-game-open #launcher-wrap {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}