:root {
  --bg-dark: #0f1220;
  --bg-panel: rgba(16, 18, 27, 0.85);
  --bg-panel-light: rgba(255, 255, 255, 0.05);
  --accent: #ff0055;
  --accent-2: #7c4dff;
  --accent-glow: rgba(255, 0, 85, 0.4);
  --text-main: #ffffff;
  --text-dim: #a0a0b0;
  --shadow-premium: 0 15px 45px rgba(0, 0, 0, 0.6);
  --br: 18px;
}

html,
body {
  padding: 0;
  margin: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  position: fixed;
  font-family: 'Ubuntu', sans-serif;
  background: var(--bg-dark);
}

#overlays,
#connecting {
  position: absolute; 
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#overlays {
  background: radial-gradient(circle at center, rgba(15, 18, 32, 0.6), rgba(0, 0, 0, 0.85));
  backdrop-filter: blur(12px);
  /*overflow-y: auto;*/
  padding: 40px 20px;
}

#stats-overlay {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(15, 18, 32, 0.8), rgba(0, 0, 0, 0.95));
  backdrop-filter: blur(20px);
  animation: fadeIn 0.5s ease;
}

#stats-content {
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--br);
  padding: 40px;
  width: 100%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.stats-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 4px;
  margin-bottom: 30px;
  text-transform: uppercase;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 1px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

#connecting {
  background: var(--bg-dark);
  z-index: 250;
  flex-direction: column;
}

#welcome {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 300;
}

.serverBox {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  min-height: 56px;
  box-sizing: border-box;
}

.serverBox:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}

.serverBox.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 0, 85, 0.25), 0 8px 20px rgba(255, 0, 85, 0.15);
}

.serverBox.online {
  border-color: rgba(67, 233, 123, 0.55);
  background: rgba(67, 233, 123, 0.12);
}

.serverBox.offline {
  border-color: rgba(255, 92, 92, 0.45);
  background: rgba(255, 92, 92, 0.1);
}

.serverBox.dual {
  border-color: rgba(120, 200, 255, 0.55);
  background: rgba(120, 200, 255, 0.12);
}

.serverBox.dual {
  border-color: rgba(120, 200, 255, 0.55);
  background: rgba(120, 200, 255, 0.12);
}

.server-name {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
  flex: 1 1 auto;
  word-break: break-word;
  word-wrap: break-word;
}

.server-players {
  font-size: 11px;
  color: var(--text-dim);
  text-align: left;
  flex-shrink: 0;
}

.serverBox.serverGroup::after {
  content: "▼";
  font-size: 10px;
  color: var(--text-dim);
  margin-left: auto;
  transition: transform 0.2s ease;
}

.serverBox.serverGroup.expanded::after {
  transform: rotate(-180deg);
}

.serverSubContainer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.servers-groups-view {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.servers-expanded-view {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.serverBox.serverChild {
  padding: 10px 12px;
  min-height: 44px;
  margin-bottom: 0;
  opacity: 0.85;
  border-color: rgba(255, 255, 255, 0.05);
}

.serverBox.serverChild:hover {
  opacity: 1;
}

.serverBox.serverChild.online {
  border-color: rgba(67, 233, 123, 0.45);
  background: rgba(67, 233, 123, 0.08);
}

.serverBox.serverChild.offline {
  border-color: rgba(255, 92, 92, 0.35);
  background: rgba(255, 92, 92, 0.08);
}

/* Container Principal */
.main-ui-container {
  display: grid;
  grid-template-columns: 320px 420px 320px;
  gap: 25px;
  /*width: 100%;*/
  max-width: 1150px;
  align-items: start;
  scale: 0.8;
}

/* Paneles */
.side-panel,
.center-panel {
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--br);
  padding: 25px;
  box-shadow: var(--shadow-premium);
}

.panel-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

/* Panel Izquierdo */
.user-profile-box {
  background: var(--bg-panel-light);
  border-radius: 15px;
  padding: 15px;
}

.user-sidebar-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

#side-user-pic {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  border: 2px solid var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

#side-user-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

#side-user-status {
  font-size: 12px;
  color: var(--accent);
}

.user-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.coins-display {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.coin-icon-menu {
  font-size: 14px;
}

.coin-icon {
  font-size: 14px;
}

#xp-text {
  display: block;
  font-size: 11px;
  margin-bottom: 5px;
  color: var(--text-dim);
}

.access-denied {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.2);
  color: #ff4444;
  border-radius: var(--br);
  font-weight: 700;
}

.xp-container {
  margin-top: 15px;
}

.user-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.xp-bar-container {
  position: relative;
}

#xp-text {
  display: block;
  font-size: 10px;
  text-align: center;
  margin-top: 4px;
  color: var(--text-dim);
}

.xp-bar-bg {
  height: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  overflow: hidden;
}

#xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0%;
  transition: width 0.8s ease;
}

.skin-selector-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.skin-preview-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--bg-panel-light);
  border: 3px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#current-skin-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 50%;
}

.skin-label-text {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  font-size: 11px;
  padding: 5px 0;
  text-align: center;
}

.skin-nav-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.skin-nav-btn:hover {
  opacity: 1;
  color: var(--accent);
}

/* Panel Central */
.center-panel {
  display: flex;
  flex-direction: column;
  padding: 40px;
}

.logo-box {
  text-align: center;
  margin-bottom: 30px;
}

.game-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
}

.game-title span {
  color: var(--accent);
}

.main-input {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  height: 50px !important;
  border-radius: 12px !important;
  text-align: center;
  font-size: 18px !important;
  margin-bottom: 20px;
}

.main-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 15px var(--accent-glow) !important;
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.btn-main {
  flex: 1;
  height: 55px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}

.btn-play {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 5px 20px var(--accent-glow);
}

.btn-spectate {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-main:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
}

.extra-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.btn-sub {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sub:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

#footer {
  margin-top: 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}

#footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

/* Version del cliente, junto al copyright del footer */
#footer .client-version {
  margin-left: 6px;
  opacity: 0.7;
  letter-spacing: 0.3px;
  font-variant-numeric: tabular-nums;
}

/* Panel Derecho */
.gamemodes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.serverBox {
  color: #ffffff;
  width: 70px;
  padding: 20px 10px;
  border-radius: 12px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s;
}

.serverBox:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.05);
}

.serverBox.active {
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.social-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-link {
  display: block;
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
  font-size: 13px;
}

.social-link.fb {
  background: #3b5998;
}

.social-link.tw {
  background: #1da1f2;
}

.social-link.dc {
  background: #7289da;
}

/* Settings Panel Specifics */
.settings-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 20px;
}

.color-section {
  display: flex;
  display: none;
  align-items: center;
  gap: 15px;
  background: var(--bg-panel-light);
  padding: 15px;
  border-radius: 12px;
}

.color-preview {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.color-buttons {
  display: flex;
  gap: 10px;
  flex-grow: 1;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Settings tabs */
.settings-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  flex-wrap: wrap;
}

.settings-tab {
  flex: 1 1 auto;
  min-width: 100px;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  padding: 9px 14px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.settings-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.settings-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 0, 85, 0.22), rgba(124, 77, 255, 0.26));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.settings-panel {
  display: none;
}

.settings-panel.is-active {
  display: block;
  animation: settingsPanelIn 0.18s ease;
}

.settings-panel[hidden] {
  display: none !important;
}

@keyframes settingsPanelIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.settings-description {
  margin: 0 0 16px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.5;
}

.settings-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: 10px;
}

.field-label {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}

.settings-select {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 8px;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  min-width: 120px;
  cursor: pointer;
}

.settings-select:focus {
  outline: 2px solid rgba(124, 77, 255, 0.5);
  outline-offset: 1px;
}

/* Audio tab */
.settings-audio {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-range {
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 16px;
  border-radius: 12px;
}

.settings-range-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.range-value {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.settings-range input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.btn-secondary {
  align-self: flex-start;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Controls tab help */
.settings-help {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.help-title {
  margin-bottom: 10px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.help-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 12px;
}

.help-list kbd {
  min-width: 64px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

/* Settings footer */
.settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.settings-footer-note {
  color: var(--text-dim);
  font-size: 11px;
}

.btn-reset-all {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 68, 68, 0.35);
  background: rgba(255, 68, 68, 0.08);
  color: #ff8080;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.btn-reset-all:hover {
  background: rgba(255, 68, 68, 0.18);
  color: #fff;
}

@media (max-width: 700px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-tab {
    min-width: 0;
  }
}

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 0.2s;
}

.switch:hover {
  background: rgba(255, 255, 255, 0.08);
}

.switch input {
  display: none;
}

.slider {
  width: 34px;
  height: 18px;
  background: #333;
  border-radius: 20px;
  position: relative;
  transition: 0.3s;
}

.slider:before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked+.slider {
  background: var(--accent);
}

input:checked+.slider:before {
  transform: translateX(16px);
}

.label-text {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}

/* Controls / Keybinds */
.controls-section {
  background: rgba(255, 255, 255, 0.03);
  padding: 20px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.keybind-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.key-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

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

.key-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  padding: 8px;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
}

/* Macros */
.controls-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.controls-head .section-title {
  margin-bottom: 0;
}

.section-hint {
  margin: 6px 0 14px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-dim);
}

.macro-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.macro-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.macro-card:hover {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(59, 196, 122, 0.35);
}

.macro-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.macro-badge {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(59, 196, 122, 0.12);
  border: 1px solid rgba(59, 196, 122, 0.2);
  color: #3bc47a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-align: center;
}

.macro-text {
  min-width: 0;
}

.macro-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.macro-desc {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-dim);
}

.macro-card .key-input {
  width: 92px;
  flex: 0 0 auto;
  cursor: pointer;
}

.macro-card .key-input:focus {
  outline: 2px solid rgba(59, 196, 122, 0.6);
  outline-offset: 1px;
  border-color: rgba(59, 196, 122, 0.6);
}

.macro-card .key-input.empty {
  color: #6b7688;
}

.btn-reset-macros {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.btn-reset-macros:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.macro-notice {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 210, 122, 0.2);
  border-radius: 7px;
  background: rgba(255, 210, 122, 0.08);
  color: #ffd27a;
  font-size: 11px;
}

/* Toast sobre el canvas del juego (avisos como LINE ACTIVADO) */
#game-toast.game-toast {
  position: fixed;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  z-index: 500;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  pointer-events: none;
  white-space: nowrap;
}
#game-toast.game-toast.inactive {
  color: #9aa7bd;
}

/* Indicador persistente mientras el line esta activo */
#line-status.line-status {
  position: fixed;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  z-index: 500;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(233, 69, 96, 0.85);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  pointer-events: none;
  white-space: nowrap;
}

/* Macros */
.controls-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.controls-head .section-title {
  margin-bottom: 0;
}

.section-hint {
  margin: 6px 0 14px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-dim);
}

.macro-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.macro-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.macro-card:hover {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(59, 196, 122, 0.35);
}

.macro-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.macro-badge {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(59, 196, 122, 0.12);
  border: 1px solid rgba(59, 196, 122, 0.2);
  color: #3bc47a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-align: center;
}

.macro-text {
  min-width: 0;
}

.macro-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.macro-desc {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-dim);
}

.macro-card .key-input {
  width: 92px;
  flex: 0 0 auto;
  cursor: pointer;
}

.macro-card .key-input:focus {
  outline: 2px solid rgba(59, 196, 122, 0.6);
  outline-offset: 1px;
  border-color: rgba(59, 196, 122, 0.6);
}

.macro-card .key-input.empty {
  color: #6b7688;
}

.btn-reset-macros {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.btn-reset-macros:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.macro-notice {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 210, 122, 0.2);
  border-radius: 7px;
  background: rgba(255, 210, 122, 0.08);
  color: #ffd27a;
  font-size: 11px;
}

/* Logout Button */
.logout-btn {
  width: 100%;
  margin-top: 15px;
  padding: 10px;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.2);
  color: #ff4444;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: #ff4444;
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 68, 68, 0.4);
}

/* Settings Popup Base */
.panelSettings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  max-width: 760px;
  max-height: max-content;
  background: rgba(16, 18, 27, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--br);
  padding: 36px;
  z-index: 300;
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-width: 50px;
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
}

.btn-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1000px) {
  .main-ui-container {
    /*grid-template-columns: 1fr; 
    max-width: 500px;
     gap: 15px;
    scale: 0.5;*/
    display: grid;
    grid-template-columns: 320px 420px 320px;
    gap: 25px;

    max-width: 1150px;
    align-items: start;
    scale: 0.5;
  }
}

@media (max-width: 800px) {
  .main-ui-container {

    display: grid;
    grid-template-columns: 320px 420px 320px;
    gap: 25px;

    max-width: 1150px;
    align-items: start;
    scale: .8;
  }
}

@media (max-width: 700px) {
  .main-ui-container {

    display: grid;
    grid-template-columns: 320px 420px 320px;
    gap: 25px;

    max-width: 1150px;
    align-items: start;
    scale: .5;
  }
}

@media (max-width: 600px) {
  .main-ui-container {

    display: grid;
    grid-template-columns: 320px 420px 320px;
    gap: 25px;

    max-width: 1150px;
    align-items: start;
    scale: .8;
  }
}

@media (min-width: 180px) and (max-width: 1080px) {
  .main-ui-container {

    display: grid;
    grid-template-columns: 320px 420px 320px;
    gap: 25px;

    max-width: 1150px;
    align-items: start;
    scale: 0.4;
  }
}

@media (max-width: 400px) {
  .main-ui-container {

    display: grid;
    grid-template-columns: 320px 420px 320px;
    gap: 25px;

    max-width: 1150px;
    align-items: start;
    scale: 0.3;
  }
}

@media (min-width: 166px) and (max-width: 512px) {
  .main-ui-container {

    display: grid;
    grid-template-columns: 320px 420px 320px;
    gap: 25px;

    max-width: 1150px;
    align-items: start;
    scale: 0.2;
  }
}


/* Utility */
.loader-small {

  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#chat_textbox {
  position: absolute;
  bottom: 20px;
  left: 3px;
  top: 565px;
  width: 300px;
  max-width: 90%;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0 15px;
  color: #fff;
  outline: none;
}

/* Scrollbar Style */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
#ConexionStatus{
  background-color: #ff1100; margin: 40px;
}
/* Panel de party flotante (ventana chica, debajo de las stats) */
#party-panel {
  position: fixed;
  top: 180px; /* fallback; el JS lo reajusta debajo de las stats */
  left: 10px;
  width: 210px;
  max-width: 45vw;
  max-height: 60vh;
  z-index: 150; /* encima del canvas, debajo de #overlays (200) */
  background: rgba(15, 18, 27, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
}

#party-panel .panel-header {
  margin-bottom: 8px;
  padding-bottom: 6px;
  font-size: 12px;
}

#party-panel .user-profile-box {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

/* Panel de party flotante (ventana chica, debajo de las stats) */
#party-panel {
  position: fixed;
  top: 180px; /* fallback; el JS lo reajusta debajo de las stats */
  left: 10px;
  width: 210px;
  max-width: 45vw;
  max-height: 60vh;
  z-index: 150; /* encima del canvas, debajo de #overlays (200) */
  background: rgba(15, 18, 27, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
}

#party-panel .panel-header {
  margin-bottom: 8px;
  padding-bottom: 6px;
  font-size: 12px;
}

#party-panel .user-profile-box {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

#party-panel-overlay{
  display: none;
        position: absolute;
        top: 60px;
        left: 0px;
        width: 220px;
        background: rgba(15, 18, 27, 0.6);
        padding: 10px;
        border-radius: 8px;
        z-index: 1;
        pointer-events: all;
        border: 1px solid rgba(255, 255, 255, 0.1);
      
}
.alert { 
      position: absolute;
    top: 14%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px; 
    color: white;
    /* opacity: 1; */
    /* transition: opacity 0.6s; */
    /* margin-bottom: 15px; */
    z-index: 9999999999;
} 
.active {  
  background-color: #4CAF50; /* Green background */
  color: white;
  opacity: 1; /* Initial opacity */
  transition: opacity 0.6s; /* 0.6 second transition effect to fade out */ 
} 
.inactive {  
  background-color: #af574c; /* Green background */
  color: white;
  opacity: 1; /* Initial opacity */
  transition: opacity 0.6s; /* 0.6 second transition effect to fade out */ 
} 
.closebtn { 
  margin-left: 15px;
  color: white;
  font-weight: bold;
  float: right;
  font-size: 22px;
  line-height: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.closebtn:hover {
  color: black;
}

/* Class to apply when the alert is dismissed */
.alert.fadeout {
  opacity: 0;
}
.g_id_signin{
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #a6a2b4;
  box-shadow: 0 5px 20px var(--accent-glow);
}
.color{
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}
.overlays-FPS{
  position: absolute;
    width: 60px;
    left: 12px;
    top: 7px;
}
/* ==== Modal: subir skin personalizada ==== */
.custom-skin-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(8, 10, 18, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.custom-skin-modal[hidden] { display: none; }
.custom-skin-box {
  width: min(460px, 92vw);
  background: #151a28;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 20px 22px;
  color: #e8eaf2;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.custom-skin-box h2 { margin: 0 0 6px; font-size: 20px; }
.cs-limits { font-size: 12.5px; color: #9aa3b8; margin: 0 0 14px; }
.cs-limits b { color: #ffd867; }
.cs-body { display: flex; gap: 16px; align-items: flex-start; }
#custom-skin-preview {
  width: 128px;
  height: 128px;
  border-radius: 10px;
  background: #10141f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: contain;
  flex: none;
}
.cs-fields { flex: 1; min-width: 0; }
.cs-label { display: block; font-size: 12.5px; color: #b9c1d4; margin-bottom: 10px; }
.cs-label input[type="text"],
.cs-label input[type="file"] {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #10141f;
  color: #e8eaf2;
  font-size: 13px;
  box-sizing: border-box;
}
#custom-skin-file { padding: 6px; }
.cs-status { font-size: 12.5px; min-height: 32px; margin: 2px 0 0; color: #b9c1d4; }
.cs-status[data-kind="err"] { color: #ff8f8f; }
.cs-status[data-kind="ok"] { color: #7ee2a8; }
.cs-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.cs-actions .btn-main { flex: 1; min-width: 120px; height: 44px; color: #fff; padding: 10px 0; }
.cs-actions .btn-main[hidden] { display: none !important; }
#custom-skin-pay { background: linear-gradient(135deg, #2e9e5b, #1d7a44); }
#custom-skin-upload { background: linear-gradient(135deg, #ff9800, #e07a00); }
.cs-actions .btn-cancel { background: #2a3250; }
