/* breakthrough.css — Giao Diện Đột Phá Bình Cảnh Cảnh Giới */

.bt-modal {
  position: fixed;
  inset: 0;
  z-index: 10005;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 18, 0.65) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  padding: 12px;
  animation: btFadeIn 0.25s ease-out;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.bt-modal.hidden {
  display: none !important;
}

@keyframes btFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.bt-window {
  width: 100%;
  max-width: 520px;
  max-height: min(96%, 96vh);
  margin: auto;
  background: linear-gradient(175deg, #13122b 0%, #090918 100%);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(168, 85, 247, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f1f5f9;
  font-family: 'Handjet', 'Be Vietnam Pro', monospace;
}

.bt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.25), rgba(88, 28, 135, 0.4) 50%, rgba(168, 85, 247, 0.1));
  border-bottom: 1px solid rgba(168, 85, 247, 0.25);
  flex-shrink: 0;
}

.bt-header-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bt-title-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #c084fc;
  text-transform: uppercase;
}

.bt-title-text {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(192, 132, 252, 0.5);
}

.bt-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 18px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.bt-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.bt-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.4) transparent;
}

.bt-body::-webkit-scrollbar {
  width: 5px;
}

.bt-body::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.4);
  border-radius: 4px;
}

/* Realm Transition Visual */
.bt-realm-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
}

.bt-realm-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bt-realm-box.target {
  text-align: right;
}

.bt-realm-tag {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bt-realm-name {
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
}

.bt-realm-box.target .bt-realm-name {
  color: #facc15;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
}

.bt-realm-arrow {
  font-size: 22px;
  color: #a855f7;
  animation: btPulseArrow 1.5s infinite;
}

@keyframes btPulseArrow {
  0%, 100% { transform: translateX(0); opacity: 0.8; }
  50% { transform: translateX(4px); opacity: 1; }
}

/* Required Pill Box */
.bt-pill-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
}

.bt-pill-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, rgba(0, 0, 0, 0.6) 80%);
  border: 1px solid rgba(192, 132, 252, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bt-pill-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.bt-pill-info {
  flex: 1;
}

.bt-pill-title {
  font-size: 15px;
  font-weight: 800;
  color: #c084fc;
}

.bt-pill-status {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.bt-pill-status.ok {
  color: #34d399;
}

.bt-pill-status.no {
  color: #f87171;
}

.bt-goto-furnace-btn {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.bt-goto-furnace-btn:hover {
  background: rgba(16, 185, 129, 0.35);
}

/* Support Items Option Checklist */
.bt-support-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bt-support-label {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.bt-support-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.bt-support-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.bt-support-item.active {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.5);
}

.bt-support-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bt-support-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #a855f7;
  cursor: pointer;
}

.bt-support-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.bt-support-meta {
  flex: 1;
}

.bt-support-name {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}

.bt-support-desc {
  font-size: 11px;
  color: #94a3b8;
}

.bt-support-count {
  font-size: 12px;
  font-weight: 700;
}

/* Success Rate Box */
.bt-rate-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bt-rate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bt-rate-title {
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
}

.bt-rate-val {
  font-size: 18px;
  font-weight: 900;
  color: #34d399;
}

.bt-rate-val.mid {
  color: #facc15;
}

.bt-rate-val.low {
  color: #fb923c;
}

.bt-rate-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.bt-rate-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399, #facc15);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.bt-rate-breakdown {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
}

.bt-support-tag {
  display: inline-block;
  font-size: 10px;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.18);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 3px;
  font-weight: 700;
  vertical-align: middle;
}

.bt-footer {
  padding: 10px 18px 12px;
  background: rgba(9, 9, 24, 0.95);
  border-top: 1px solid rgba(168, 85, 247, 0.2);
  flex-shrink: 0;
  display: flex;
}

/* Action Button */
.bt-submit-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
  border: 1px solid #c084fc;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
  transition: all 0.2s;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.bt-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(192, 132, 252, 0.5);
}

.bt-submit-btn:disabled {
  background: #334155;
  border-color: #475569;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ==========================================================================
   Mobile & Compact Optimization for Breakthrough Modal
   ========================================================================== */
@media (max-height: 580px), (max-width: 680px) {
  .bt-modal {
    padding: 6px !important;
  }

  .bt-window {
    max-width: min(98%, 520px) !important;
    max-height: min(98vh, 98%) !important;
    border-radius: 12px !important;
  }

  .bt-header {
    padding: 6px 12px !important;
  }

  .bt-title-badge {
    display: none !important;
  }

  .bt-title-text {
    font-size: 14px !important;
  }

  .bt-close-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 15px !important;
  }

  .bt-footer {
    padding: 6px 12px 8px !important;
  }

  .bt-support-tag {
    font-size: 9px !important;
    padding: 0 3px !important;
  }

  .bt-body {
    padding: 8px 12px !important;
    gap: 7px !important;
  }

  /* Realm Flow */
  .bt-realm-flow {
    padding: 6px 12px !important;
    border-radius: 8px !important;
  }

  .bt-realm-tag {
    font-size: 9.5px !important;
  }

  .bt-realm-name {
    font-size: 13.5px !important;
  }

  .bt-realm-arrow {
    font-size: 16px !important;
  }

  /* Required Pill Card */
  .bt-pill-card {
    padding: 6px 10px !important;
    gap: 10px !important;
    border-radius: 8px !important;
  }

  .bt-pill-icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
  }

  .bt-pill-icon img {
    width: 28px !important;
    height: 28px !important;
  }

  .bt-pill-title {
    font-size: 13px !important;
  }

  .bt-pill-status {
    font-size: 11px !important;
  }

  .bt-goto-furnace-btn {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }

  /* Support Items 2-Column Grid on Mobile Landscape */
  .bt-support-box {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .bt-support-label {
    grid-column: 1 / -1 !important;
    font-size: 10.5px !important;
    margin-bottom: -2px !important;
  }

  .bt-support-item {
    padding: 6px 8px !important;
    gap: 6px !important;
    border-radius: 8px !important;
  }

  .bt-support-checkbox {
    width: 15px !important;
    height: 15px !important;
  }

  .bt-support-icon {
    width: 22px !important;
    height: 22px !important;
  }

  .bt-support-name {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  .bt-support-desc {
    display: none !important;
  }

  .bt-support-count {
    font-size: 11px !important;
  }

  /* Rate Box */
  .bt-rate-box {
    padding: 7px 10px !important;
    gap: 4px !important;
    border-radius: 8px !important;
  }

  .bt-rate-title {
    font-size: 11.5px !important;
  }

  .bt-rate-val {
    font-size: 15px !important;
  }

  .bt-rate-bar-track {
    height: 6px !important;
  }

  .bt-rate-breakdown {
    font-size: 10px !important;
  }

  /* Submit Button */
  .bt-submit-btn {
    padding: 9px 12px !important;
    font-size: 14px !important;
    border-radius: 9px !important;
    margin-top: 2px !important;
  }
}
