/* ==========================================================================
   918KissWiki - Player Hub, Download CTAs & 24/7 LiveChat Support
   ========================================================================== */

/* --- Trust & Player Badges --- */
.player-badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 16px 0;
}
.player-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.2s ease;
}
.player-badge:hover { transform: translateY(-1px); }
.badge-green { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.badge-blue { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.badge-gold { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.badge-dark { background: #0f172a; color: #f8fafc; border-color: #334155; }

/* --- Mega Download Cards (Hero & Portal) --- */
.mega-dl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0 28px;
}
@media (max-width: 768px) {
  .mega-dl-grid { grid-template-columns: 1fr; }
}

.mega-dl-card {
  position: relative;
  background: var(--surface, #ffffff);
  border: 2px solid var(--border, #e2e8f0);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}
.mega-dl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}
.mega-dl-card.card-android {
  border-color: #86efac;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}
.mega-dl-card.card-android:hover {
  border-color: #22c55e;
  box-shadow: 0 16px 36px rgba(34, 197, 94, 0.16);
}
.mega-dl-card.card-ios {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.mega-dl-card.card-ios:hover {
  border-color: #64748b;
  box-shadow: 0 16px 36px rgba(100, 116, 139, 0.16);
}

.card-top-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
  width: fit-content;
}
.card-android .card-top-tag { background: #dcfce7; color: #15803d; }
.card-ios .card-top-tag { background: #e2e8f0; color: #334155; }

.mega-dl-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.mega-dl-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.icon-android { background: #22c55e; color: #ffffff; }
.icon-ios { background: #0f172a; color: #ffffff; }
.mega-dl-icon svg { width: 32px; height: 32px; fill: currentColor; }

.mega-dl-title {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text, #0f172a);
}
.mega-dl-subtitle {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted, #64748b);
  line-height: 1.4;
}

.mega-specs-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 20px;
  border-top: 1px dashed var(--border, #e2e8f0);
  border-bottom: 1px dashed var(--border, #e2e8f0);
  padding: 12px 0;
  font-size: 0.86rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mega-specs-list li {
  display: flex;
  justify-content: space-between;
  color: var(--muted, #64748b);
}
.mega-specs-list strong { color: var(--text, #0f172a); }

/* --- High-Impact Download Buttons --- */
.mega-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}
.btn-dl-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}
.btn-dl-main:hover {
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}
.btn-dl-android {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.35);
}
.btn-dl-android:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.45);
}
.btn-dl-ios {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.3);
}
.btn-dl-ios:hover {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.4);
}
.btn-dl-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted, #64748b);
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  background: transparent;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.btn-dl-secondary:hover {
  color: var(--text, #0f172a);
  background: rgba(0,0,0,0.04);
  text-decoration: none;
}

/* --- Free Demo Interactive Banner --- */
.demo-interactive-box {
  background: linear-gradient(135deg, #0b1329 0%, #111e38 100%);
  border: 1px solid #1e293b;
  border-radius: 20px;
  padding: 24px 28px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 28px 0;
  box-shadow: 0 12px 30px rgba(11, 19, 41, 0.25);
  position: relative;
  overflow: hidden;
}
@media (max-width: 768px) {
  .demo-interactive-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }
}
.demo-content h3 {
  margin: 0 0 6px;
  font-size: 1.28rem;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}
.demo-content p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.5;
}
.demo-badge-free {
  background: #f59e0b;
  color: #000;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}
.demo-action-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 260px;
}
@media (max-width: 768px) {
  .demo-action-card { width: 100%; box-sizing: border-box; }
}
.demo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}
.demo-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 8px;
  border-radius: 6px;
  color: #38bdf8;
  font-size: 0.92rem;
}
.btn-copy-demo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #38bdf8;
  color: #0f172a;
  border: none;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 4px;
}
.btn-copy-demo:hover {
  background: #7dd3fc;
  transform: translateY(-1px);
}

/* --- 24/7 LiveChat Floating Widget --- */
.livechat-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 20px 8px 8px;
  box-shadow: 0 10px 30px rgba(29, 78, 216, 0.45);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}
.livechat-trigger:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 36px rgba(29, 78, 216, 0.55);
}
.livechat-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #3b82f6;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.3);
}
.livechat-avatar-wrap svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}
.livechat-pulse-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 13px;
  height: 13px;
  background: #22c55e;
  border: 2px solid #fff;
  border-radius: 50%;
}
.livechat-pulse-ring {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid #22c55e;
  animation: pulse-ring 1.8s infinite cubic-bezier(0.45, 0, 0.2, 1);
}
@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}
.livechat-trigger-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.livechat-trigger-title {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
}
.livechat-trigger-sub {
  font-size: 0.74rem;
  opacity: 0.9;
  color: #bfdbfe;
}

/* --- LiveChat Drawer Window --- */
.livechat-window {
  position: fixed;
  bottom: 86px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 110px);
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
  border: 1px solid #e2e8f0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.96);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.livechat-window.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.livechat-header {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.livechat-header-agent {
  display: flex;
  align-items: center;
  gap: 12px;
}
.livechat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: grid;
  place-items: center;
  position: relative;
}
.livechat-header-avatar svg { width: 22px; height: 22px; fill: #fff; }
.agent-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #22c55e;
  border: 2px solid #1d4ed8;
  border-radius: 50%;
}
.livechat-header-info h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}
.livechat-header-info p {
  margin: 0;
  font-size: 0.76rem;
  color: #bfdbfe;
  display: flex;
  align-items: center;
  gap: 5px;
}
.livechat-close-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.15s ease;
}
.livechat-close-btn:hover { background: rgba(255,255,255,0.3); }

/* --- Chat Messages Stream --- */
.livechat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f8fafc;
}
.chat-timestamp {
  align-self: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  background: #e2e8f0;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 4px;
}
.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 88%;
}
.chat-msg.agent {
  align-self: flex-start;
}
.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}
.chat-msg-bubble {
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.chat-msg.agent .chat-msg-bubble {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-top-left-radius: 4px;
}
.chat-msg.user .chat-msg-bubble {
  background: #1d4ed8;
  color: #ffffff;
  border-top-right-radius: 4px;
}

/* --- Quick Action Chips inside chat --- */
.chat-chips-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.chat-chip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-chip:hover {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
  transform: translateX(2px);
}
.chat-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 9px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  margin-top: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.15s ease;
}
.chat-action-btn:hover {
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}
.chat-btn-telegram { background: #229ED9; }
.chat-btn-green { background: #10b981; }
.chat-btn-dark { background: #0f172a; }

/* --- Chat Input Box --- */
.livechat-footer {
  padding: 12px 14px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
  align-items: center;
}
.livechat-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}
.livechat-input:focus {
  border-color: #1d4ed8;
}
.livechat-send-btn {
  background: #1d4ed8;
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}
.livechat-send-btn:hover {
  background: #1e40af;
  transform: scale(1.05);
}
.livechat-send-btn svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* --- Mobile Sticky Player Action Dock --- */
.mobile-player-dock {
  display: none;
}
@media (max-width: 768px) {
  body {
    padding-bottom: 74px !important;
  }
  .livechat-trigger {
    bottom: 76px !important;
    right: 16px !important;
    padding: 8px;
    border-radius: 50%;
  }
  .livechat-trigger-text {
    display: none;
  }
  .livechat-window {
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 90vh !important;
    max-height: 90vh !important;
    border-radius: 22px 22px 0 0 !important;
  }
  .mobile-player-dock {
    display: grid;
    grid-template-columns: 1fr 1fr 0.9fr;
    gap: 8px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 9998;
  }
  .dock-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
    color: #ffffff;
    text-align: center;
    line-height: 1.2;
    transition: transform 0.1s ease;
  }
  .dock-btn:active { transform: scale(0.96); }
  .dock-btn svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
  .dock-apk {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  }
  .dock-ios {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255,255,255,0.15);
  }
  .dock-chat {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    position: relative;
    border: none;
    cursor: pointer;
    font-family: inherit;
  }
  .dock-chat-ping {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
  }
}

/* --- Quick Toast Feedback --- */
.wiki-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: #0f172a;
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}
.wiki-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}
