/* ============================================================
   HACK MOD MENU - Tiệm Xôi Bà Tám
   Styling: Pixel-Retro Game Matching Aesthetic
   ============================================================ */

/* Nút nổi Floating Menu Icon */
#mod-btn {
  position: fixed;
  bottom: 24px;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f08a52, #dc5a36);
  border: 2px solid #ffd166;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 209, 102, 0.5);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 999999;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-family: 'VT323', monospace, sans-serif;
}

#mod-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.8), 0 0 16px rgba(255, 209, 102, 0.8);
}

#mod-btn:active {
  cursor: grabbing;
  transform: scale(0.95);
}

#mod-btn .mod-ico {
  font-size: 20px;
  line-height: 1;
  text-shadow: 0 0 4px #000;
}

#mod-btn .mod-lbl {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: #fff8ea;
  text-shadow: 0 1px 2px #000;
  line-height: 1;
}

/* Modal Overlay */
#mod-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 6, 12, 0.75);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}

#mod-overlay.hidden {
  display: none !important;
}

/* Bảng điều khiển Mod Menu */
#mod-panel {
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  background: #1c121e;
  border: 2px solid #f8dc6a;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(248, 220, 106, 0.2);
  display: flex;
  flex-direction: column;
  color: #fff8ea;
  font-family: 'VT323', monospace, sans-serif;
  overflow: hidden;
  animation: modPop 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes modPop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Header */
.mod-header {
  background: #2a1b2e;
  padding: 10px 14px;
  border-bottom: 2px solid #3d2742;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mod-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  color: #f8dc6a;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.mod-close {
  background: #dc5a36;
  border: 1px solid #ff7b54;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.mod-close:hover {
  background: #e63946;
}

/* Tabs */
.mod-tabs {
  display: flex;
  background: #170d19;
  border-bottom: 2px solid #2a1b2e;
  overflow-x: auto;
}

.mod-tab {
  flex: 1;
  padding: 8px 4px;
  text-align: center;
  font-size: 14px;
  color: #c4b5c7;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}

.mod-tab.active {
  color: #f8dc6a;
  border-bottom: 2px solid #f8dc6a;
  background: rgba(248, 220, 106, 0.08);
  font-weight: bold;
}

.mod-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

/* Content Area */
.mod-content {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mod-section-title {
  font-size: 14px;
  color: #f08a52;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  border-bottom: 1px dashed rgba(240, 138, 82, 0.3);
  padding-bottom: 2px;
}

/* Nút bấm chức năng */
.mod-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mod-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.mod-action-btn {
  background: #2f1e33;
  color: #fff8ea;
  border: 1px solid #4a3052;
  border-radius: 4px;
  padding: 8px 6px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.mod-action-btn:hover {
  background: #422948;
  border-color: #f8dc6a;
  transform: translateY(-1px);
}

.mod-action-btn:active {
  transform: translateY(1px);
}

.mod-action-btn.gold {
  background: #453416;
  border-color: #f8dc6a;
  color: #f8dc6a;
}
.mod-action-btn.gold:hover {
  background: #5e461c;
}

.mod-action-btn.green {
  background: #17361f;
  border-color: #8cc458;
  color: #8cc458;
}
.mod-action-btn.green:hover {
  background: #214f2c;
}

.mod-action-btn.blue {
  background: #162f45;
  border-color: #56a0d3;
  color: #56a0d3;
}
.mod-action-btn.blue:hover {
  background: #204566;
}

.mod-action-btn.red {
  background: #3d191b;
  border-color: #dc5a36;
  color: #dc5a36;
}
.mod-action-btn.red:hover {
  background: #542225;
}

/* Dòng toggle gạt bật tắt */
.mod-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #241627;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #3d2742;
}

.mod-toggle-info {
  display: flex;
  flex-direction: column;
}

.mod-toggle-name {
  font-size: 15px;
  color: #fff8ea;
  font-weight: bold;
}

.mod-toggle-desc {
  font-size: 12px;
  color: #a89aa8;
}

.mod-switch {
  position: relative;
  width: 42px;
  height: 22px;
  background: #3d2742;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.2s;
}

.mod-switch.on {
  background: #8cc458;
}

.mod-switch .mod-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.mod-switch.on .mod-knob {
  transform: translateX(20px);
}

/* Input custom */
.mod-input-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.mod-input {
  flex: 1;
  background: #170d19;
  border: 1px solid #4a3052;
  color: #fff8ea;
  padding: 6px 8px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 15px;
}

.mod-input:focus {
  outline: none;
  border-color: #f8dc6a;
}

/* Footer */
.mod-footer {
  padding: 8px 12px;
  background: #170d19;
  border-top: 1px solid #2a1b2e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #a89aa8;
}

.mod-status-text {
  color: #8cc458;
}

/* Custom Floating Toast */
.mod-custom-toast {
  box-sizing: border-box;
  max-width: 90vw;
  text-align: center;
  font-family: inherit;
  letter-spacing: 0.5px;
  animation: modToastIn 0.25s ease-out;
}

@keyframes modToastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

