
:root {
  
  --bg-page: #09090b;
  --bg-panel: #111114;
  --bg-card: #151518;
  --bg-card-hover: #1a1a1e;
  --bg-card-subtle: #121215;
  --bg-elevated: #1e1e24;
  --bg-input: #0e0e11;
  --bg-slot: #121216;
  --bg-slot-hover: #1e1e24;
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: #232328;
  --border-hover: #383842;
  --border-focus: #52525e;
  --border-active: #71717a;
  
  --text-white: #ffffff;
  --text-primary: #f4f4f5;
  --text-secondary: #d4d4d8;
  --text-muted: #8e8e98;
  --text-dim: #52525b;
  
  --white-btn-bg: #ffffff;
  --white-btn-text: #09090b;
  --white-btn-hover: #e4e4e7;
  
  --dark-btn-bg: #1c1c21;
  --dark-btn-border: #2c2c34;
  --dark-btn-hover: #26262e;
  
  --status-online: #22c55e;
  --status-online-bg: rgba(34, 197, 94, 0.12);
  --status-online-border: rgba(34, 197, 94, 0.28);

  --status-offline: #71717a;
  --status-offline-bg: rgba(113, 113, 122, 0.12);
  --status-offline-border: rgba(113, 113, 122, 0.28);

  --status-warn: #eab308;
  --status-warn-bg: rgba(234, 179, 8, 0.12);
  --status-warn-border: rgba(234, 179, 8, 0.28);

  --status-danger: #ef4444;
  --status-danger-bg: rgba(239, 68, 68, 0.12);
  --status-danger-border: rgba(239, 68, 68, 0.28);

  --status-info: #38bdf8;
  --status-info-bg: rgba(56, 189, 248, 0.12);
  --status-info-border: rgba(56, 189, 248, 0.28);

  --font-sans: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.75);
  --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.85);

  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  --transition-fast: 0.14s ease;
  --transition-smooth: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.mc-theme, body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  letter-spacing: -0.01em;
}

.mc-bg-overlay {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.015) 0%, transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(255, 255, 255, 0.015) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.mc-bg-grid {
  position: fixed;
  inset: 0;
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  pointer-events: none;
  z-index: 0;
}

.mc-particles {
  display: none; 
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

.app-container {
  position: relative;
  z-index: 1;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 16px 24px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.header.mc-panel {
  background: rgba(17, 17, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-voxel {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: #18181c;
  border: 1px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-white);
  box-shadow: var(--shadow-sm);
}

.cube-shard i {
  color: var(--text-white);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-title-gold {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  color: var(--text-white);
}

.mc-badge-diamond {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
}

.brand-subtitle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.brand-subtitle span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.header-actions .btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  border-radius: var(--radius-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--dark-btn-bg);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.btn:hover {
  background: var(--dark-btn-hover);
  border-color: var(--border-hover);
  color: var(--text-white);
}

.btn:active {
  transform: scale(0.98);
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
}

.btn-emerald,
.btn-diamond,
#btnStartAll {
  background: var(--white-btn-bg);
  color: var(--white-btn-text);
  border-color: var(--white-btn-bg);
  font-weight: 600;
}

.btn-emerald:hover,
.btn-diamond:hover,
#btnStartAll:hover {
  background: var(--white-btn-hover);
  border-color: var(--white-btn-hover);
  color: var(--white-btn-text);
}

.btn-redstone,
#btnStopAll {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.22);
  color: #f87171;
}

.btn-redstone:hover,
#btnStopAll:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-gold,
.btn-amethyst,
.btn-stone {
  background: var(--dark-btn-bg);
  border-color: var(--border-default);
  color: var(--text-secondary);
}

.btn-gold:hover,
.btn-amethyst:hover,
.btn-stone:hover {
  background: var(--dark-btn-hover);
  border-color: var(--border-hover);
  color: var(--text-white);
}

.accounts-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title-bar.mc-panel-header {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.title-left h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-left h2 i {
  color: var(--text-muted);
  font-size: 14px;
}

.title-left .sub-tip {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.title-left .sub-tip i {
  color: var(--text-dim);
}

.filter-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-input-box.mc-input {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-box i {
  position: absolute;
  left: 12px;
  color: var(--text-dim);
  font-size: 13px;
  pointer-events: none;
}

.search-input-box input {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 7px 12px 7px 34px;
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  width: 180px;
  transition: border-color var(--transition-fast), width var(--transition-smooth);
}

.search-input-box input:focus {
  border-color: var(--border-focus);
  width: 220px;
}

.search-input-box input::placeholder {
  color: var(--text-dim);
}

.acc-filter-tabs.mc-tab-group {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.acc-tab {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.acc-tab:hover {
  color: var(--text-primary);
}

.acc-tab.active {
  background: var(--bg-elevated);
  color: var(--text-white);
  box-shadow: var(--shadow-sm);
}

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.bot-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.bot-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.bot-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mc-avatar-slot {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.bot-avatar {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  image-rendering: pixelated;
}

.bot-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.bot-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bot-name span:first-child {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-badge {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.bot-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.badge-in_game,
.badge-online {
  background: var(--status-online-bg);
  border: 1px solid var(--status-online-border);
  color: #4ade80;
}
.badge-in_game::before,
.badge-online::before {
  background: var(--status-online);
  box-shadow: 0 0 6px var(--status-online);
}

.badge-offline {
  background: var(--status-offline-bg);
  border: 1px solid var(--status-offline-border);
  color: var(--text-muted);
}
.badge-offline::before {
  background: var(--status-offline);
}

.badge-connecting,
.badge-reconnecting,
.badge-logging_in {
  background: var(--status-warn-bg);
  border: 1px solid var(--status-warn-border);
  color: #fde047;
}
.badge-connecting::before,
.badge-reconnecting::before,
.badge-logging_in::before {
  background: var(--status-warn);
  animation: pulseDot 1.2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.bot-meta-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.meta-key {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
}

.meta-key i {
  font-size: 11px;
  color: var(--text-dim);
}

.meta-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-inline-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.health-food-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-label {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}

.bar-label i {
  font-size: 10px;
}

.progress-track {
  height: 5px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-default);
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.health-fill {
  background: #ef4444;
}

.food-fill {
  background: #eab308;
}

.bot-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.btn-card {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-md);
}

.bot-card-actions button:not(:first-child) {
  flex: 0 0 44px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.empty-state.mc-panel {
  grid-column: 1 / -1;
  background: var(--bg-panel);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state i {
  color: var(--text-dim);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
  opacity: 1;
  transition: opacity var(--transition-fast);
}

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

.modal-key-gate {
  z-index: 999999 !important;
  background: rgba(0, 0, 0, 0.88) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

.mc-modal-key {
  max-width: 440px !important;
  background: #121214 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

.key-gate-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto;
}

.key-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.key-prefix-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
}

.key-gate-input {
  width: 100%;
  padding-left: 40px !important;
  padding-right: 42px !important;
  height: 46px !important;
  font-size: 15px !important;
  letter-spacing: 1px;
}

/* Chống Chrome / Edge / Browser kích hoạt popup Lưu / Cập nhật mật khẩu */
.mc-mask-input {
  -webkit-text-security: disc !important;
  text-security: disc !important;
}

.mc-mask-input.mc-show-text {
  -webkit-text-security: none !important;
  text-security: none !important;
}

.btn-toggle-key {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle-key:hover {
  color: var(--text-white);
}

.key-gate-error-msg {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ef4444;
  font-size: 12px;
  font-weight: 500;
  margin-top: 8px;
  text-align: left;
}

.key-gate-error-msg.hidden {
  display: none !important;
}

.shake-anim {
  animation: keyShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes keyShake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

#modalServerChestGui {
  z-index: 1050;
}

.mc-server-gui-container {
  background: #141416;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
}

.mc-inv-slot.slot-gui-accept {
  background: rgba(16, 185, 129, 0.22) !important;
  border: 2px solid #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4) !important;
  cursor: pointer;
}

.mc-inv-slot.slot-gui-accept:hover {
  background: rgba(16, 185, 129, 0.45) !important;
  border-color: #34d399 !important;
  transform: scale(1.08);
}

.mc-inv-slot.slot-gui-deny {
  background: rgba(239, 68, 68, 0.22) !important;
  border: 2px solid #ef4444 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4) !important;
  cursor: pointer;
}

.mc-inv-slot.slot-gui-deny:hover {
  background: rgba(239, 68, 68, 0.45) !important;
  border-color: #f87171 !important;
  transform: scale(1.08);
}

.mc-inv-slot.slot-gui-neutral {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.mc-item-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 9999999;
  display: none;
  background: #100010;
  background: linear-gradient(135deg, rgba(16, 0, 16, 0.96) 0%, rgba(24, 0, 32, 0.96) 100%);
  border: 2px solid #28004f;
  box-shadow: inset 0 0 0 1px #5000ff, 0 8px 24px rgba(0, 0, 0, 0.85);
  border-radius: 4px;
  padding: 8px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.45;
  color: #ffffff;
  max-width: 320px;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.85);
  transform: translate(14px, -50%);
  animation: tooltipFade 0.1s ease-out;
}

@keyframes tooltipFade {
  from { opacity: 0; transform: translate(14px, -45%) scale(0.96); }
  to { opacity: 1; transform: translate(14px, -50%) scale(1); }
}

.mc-tooltip-title {
  font-size: 14px;
  font-weight: 700;
  color: #55ff55;
  margin-bottom: 2px;
  word-break: break-word;
}

.mc-tooltip-lore {
  font-size: 12px;
  color: #aaaaaa;
  margin-top: 4px;
  word-break: break-word;
}

.mc-tooltip-lore-line {
  margin-top: 2px;
}

.mc-tooltip-stats {
  font-size: 12px;
  color: #55ff55;
  margin-top: 6px;
  border-top: 1px solid rgba(80, 0, 255, 0.4);
  padding-top: 4px;
}

.modal-card.mc-modal {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card.mc-modal.mc-modal-large,
.modal-card.mc-modal-large,
.mc-modal-large {
  max-width: 880px !important;
  width: 92vw !important;
  min-height: auto;
  max-height: 92vh;
}

@keyframes modalPop {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-header h3 i {
  color: var(--text-muted);
}

.modal-close.mc-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.modal-close.mc-close-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-white);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-card-subtle);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group label i {
  color: var(--text-dim);
  font-size: 11px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.form-input.mc-input {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  width: 100%;
  transition: border-color var(--transition-fast);
}

.form-input.mc-input:focus {
  border-color: var(--border-focus);
}

.form-textarea.mc-input {
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
}

.mc-code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
}

.settings-subhead {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-checkbox-group,
.form-checkbox-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-checkbox.mc-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.custom-checkbox.mc-checkbox input {
  accent-color: var(--text-white);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.bot-detail-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bot-detail-subhead {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.bot-detail-subhead .sub-tip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bot-detail-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-tab-group.mc-detail-tabs {
  display: flex;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-default);
  padding: 6px 16px;
  gap: 6px;
}

.bot-detail-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.bot-detail-tab:hover {
  color: var(--text-white);
}

.bot-detail-tab.active {
  background: var(--bg-elevated);
  border-color: var(--border-default);
  color: var(--text-white);
  font-weight: 600;
}

.bot-tab-content.hidden {
  display: none !important;
}

.mc-inv-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .mc-inv-layout {
    grid-template-columns: 1fr;
  }
}

.mc-inv-left-col {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mc-inv-left-col .mc-panel-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mc-player-card {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
}

.mc-player-preview-frame {
  width: 120px;
  height: 195px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.mc-player-skin {
  height: 175px;
  image-rendering: pixelated;
  object-fit: contain;
}

.mc-gear-rack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mc-gear-rack .mc-inv-slot {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
}

.mc-vitals-strip {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.vital-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.vital-lbl {
  width: 46px;
  color: var(--text-dim);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.vital-item .progress-track {
  flex: 1;
  height: 6px;
}

.vital-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  width: 44px;
  text-align: right;
}

.mc-inv-right-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.mc-chest-container {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.mc-armor-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.mc-armor-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-armor-group-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}

.mc-inv-slot.mc-armor-slot {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.mc-server-gui-container {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.mc-modal-chest {
  border-color: var(--border-hover);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mc-chest-header,
.mc-hotbar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.chest-sub-info {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.mc-inv-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.mc-inv-toolbar-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-inv-hint {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-left: auto;
}

.mc-inventory-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(42px, 1fr));
  gap: 8px;
  width: 100%;
}

.mc-hotbar-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(42px, 1fr));
  gap: 8px;
  margin-top: 6px;
  width: 100%;
}

.mc-inv-slot {
  aspect-ratio: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  background: var(--bg-slot);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  user-select: none;
  box-sizing: border-box;
}

.mc-inv-slot:hover {
  background: var(--bg-slot-hover);
  border-color: var(--border-hover);
}

.mc-inv-slot.active-hotbar-slot {
  border-color: var(--text-white);
  box-shadow: 0 0 0 1px var(--text-white);
}

.mc-inv-slot.slot-picked {
  opacity: 0.5;
  border-style: dashed;
}

.slot-placeholder {
  font-size: 20px;
  color: var(--text-dim);
}

.slot-key-badge {
  position: absolute;
  top: 3px;
  left: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  line-height: 1;
  pointer-events: none;
}

.item-icon-box {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.mc-item-icon-img {
  width: 78%;
  height: 78%;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  pointer-events: none;
}

.mc-item-fallback {
  font-size: 28px;
}

.item-count {
  position: absolute;
  bottom: 3px;
  right: 5px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 1.5px 1.5px 0px #000, -1px -1px 0px #000, 1px -1px 0px #000, -1px 1px 0px #000;
  line-height: 1;
  pointer-events: none;
}

.item-tag {
  display: none;
}

.mc-floating-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(18, 18, 22, 0.9);
  border: 1px solid var(--border-hover);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.mc-floating-cursor img {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

.mc-floating-cursor .cursor-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-white);
}

.mc-context-menu {
  position: fixed;
  z-index: 10001;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 4px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 160px;
}

.mc-context-menu .context-item {
  padding: 7px 10px;
  font-size: 12px;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition-fast);
}

.mc-context-menu .context-item:hover {
  background: var(--bg-elevated);
  color: var(--text-white);
}

.mc-context-menu .context-divider {
  height: 1px;
  background: var(--border-default);
  margin: 3px 0;
}

.terminal-body.mc-terminal {
  background: #0a0a0c;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  height: calc(90vh - 270px);
  min-height: 460px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
  word-break: break-all;
}

.log-time {
  color: var(--text-dim);
  font-size: 11px;
  flex-shrink: 0;
}

.log-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.tag-info {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.tag-chat {
  background: var(--status-online-bg);
  color: #4ade80;
}

.tag-send {
  background: var(--status-info-bg);
  color: #38bdf8;
}

.tag-warn {
  background: var(--status-warn-bg);
  color: #fde047;
}

.tag-error {
  background: var(--status-danger-bg);
  color: #f87171;
}

/* Chat nguyên văn từ server (debugChat): mờ hơn để không lấn log chính. */
.tag-raw {
  background: rgba(255, 255, 255, 0.05);
  color: #8b8b94;
}

.log-msg {
  color: var(--text-primary);
}

.log-msg-chat {
  color: #d4d4d8;
}

.bot-detail-cmd-bar {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.quick-cmd-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mc-tag-label {
  font-size: 11px;
  color: var(--text-dim);
}

.mc-chip {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mc-chip:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  color: var(--text-white);
}

.mc-alert-border {
  border-color: var(--border-hover);
}

.captcha-preview-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}

.mc-item-frame {
  padding: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  display: inline-block;
}

.captcha-img {
  max-width: 240px;
  max-height: 240px;
  border-radius: 4px;
}

.captcha-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.text-diamond,
.text-gold,
.text-emerald,
.text-amethyst,
.text-aqua,
.text-redstone {
  color: inherit;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}
