* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #1a3311;
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, #2e691d 0%, #15380c 100%);
}

#game-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* UI Panel Base */
.ui-panel {
  position: absolute;
  z-index: 10;
}

/* Top Header Bar (Always clickable on top) */
#top-bar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  background: rgba(15, 20, 25, 0.94);
  backdrop-filter: blur(10px);
  padding: 6px 20px;
  border-radius: 30px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.2);
  z-index: 100 !important;
  pointer-events: auto !important;
  transition: all 0.3s ease;
}

.top-bar-view {
  display: none;
  align-items: center;
  gap: 16px;
}

.top-bar-view.active {
  display: flex;
}

/* In-Game Integrated Scoreboard inside Top-Bar */
#top-bar-match-view {
  display: none;
  align-items: center;
  gap: 18px;
}

#top-bar-match-view.active {
  display: flex;
}

#top-bar-match-view .team-score {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 16px;
  border-radius: 18px;
}

#top-bar-match-view .team-score.red-team {
  background: rgba(230, 57, 70, 0.25);
}

#top-bar-match-view .team-score.blue-team {
  background: rgba(58, 134, 255, 0.25);
}

#top-bar-match-view .team-label {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
}

.red-team .team-label { color: #e63946; }
.blue-team .team-label { color: #3a86ff; }

#top-bar-match-view .score-number {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

#top-bar-match-view .match-time-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 10px;
}

#top-bar-match-view #match-timer {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1.5px;
}

#top-bar-match-view .mode-badge {
  font-size: 9px;
  font-weight: 800;
  color: #ffbe0b;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.brand-title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.top-nav {
  display: flex;
  gap: 8px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: #adb5bd;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35) 0%, rgba(99, 102, 241, 0.35) 100%);
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #ffffff;
}

.badge-new {
  font-size: 8px;
  font-weight: 900;
  background: #ffbe0b;
  color: #000;
  padding: 1px 5px;
  border-radius: 6px;
}

.top-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-pill {
  font-size: 11px;
  font-weight: 800;
  color: #c084fc;
}

/* UI Overlay Screen (Menu) */
.ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 10, 8, 0.65);
  backdrop-filter: blur(6px);
  z-index: 20;
  display: none;
  justify-content: center;
  align-items: center;
  padding-top: 50px;
  box-sizing: border-box;
}

.ui-overlay.active {
  display: flex;
}

.menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1260px;
  width: 96%;
  gap: 14px;
  animation: fadeInScale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Header with half-sized N Icon & Title */
.lobby-header-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
}

.nefterm-n-icon {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.8));
}

.nefterm-title-text {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8), 0 0 18px rgba(168, 85, 247, 0.5);
}

/* 3-Column Grid Layout (Party Panel, Match Card, Chat Panel) */
.lobby-grid-layout {
  display: grid;
  grid-template-columns: 240px 1fr 260px;
  gap: 16px;
  width: 100%;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .lobby-grid-layout {
    grid-template-columns: 1fr;
  }
}

/* Side Cards (Party & Chat) */
.lobby-side-card {
  background: rgba(16, 12, 26, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(168, 85, 247, 0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.side-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
  padding-bottom: 10px;
}

.side-card-title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
}

.party-count-badge {
  font-size: 11px;
  font-weight: 800;
  background: rgba(168, 85, 247, 0.25);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #c084fc;
  padding: 2px 8px;
  border-radius: 12px;
}

.chat-status-dot {
  color: #22c55e;
  font-size: 14px;
  text-shadow: 0 0 8px #22c55e;
}

/* Party Code Box */
.party-code-box {
  background: rgba(10, 7, 18, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.party-code-label {
  font-size: 10px;
  font-weight: 800;
  color: #a855f7;
  letter-spacing: 1px;
}

.party-code-display {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #ffbe0b;
  text-shadow: 0 0 14px rgba(255, 190, 11, 0.6);
  font-family: monospace;
}

.btn-copy-code {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e9d5ff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}

.btn-copy-code:hover {
  background: rgba(168, 85, 247, 0.3);
  border-color: #a855f7;
  color: #fff;
  transform: translateY(-1px);
}

/* Join Party Input */
.party-join-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.party-join-label {
  font-size: 11px;
  font-weight: 800;
  color: #adb5bd;
}

.party-join-input-autojoin {
  width: 100%;
  background: rgba(10, 7, 18, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #ffbe0b;
  font-family: monospace, inherit;
  font-size: 16px;
  font-weight: 900;
  padding: 10px 12px;
  border-radius: 12px;
  outline: none;
  text-align: center;
  letter-spacing: 4px;
  box-sizing: border-box;
  transition: all 0.25s ease;
}

.party-join-input-autojoin::placeholder {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.35);
}

.party-join-input-autojoin:focus {
  border-color: #a855f7;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.5), inset 0 0 10px rgba(168, 85, 247, 0.2);
  background: rgba(16, 10, 28, 0.98);
}

/* Party Members List */
.party-members-header {
  font-size: 11px;
  font-weight: 800;
  color: #a855f7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.party-members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 190px;
  overflow-y: auto;
}

.party-member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.party-member-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.party-member-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  border: 2px solid #000;
}

.party-member-avatar.red { background: #e63946; }
.party-member-avatar.blue { background: #3a86ff; }

.party-member-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.party-member-tag {
  font-size: 12px;
}

.btn-kick-member {
  background: rgba(230, 57, 70, 0.2);
  border: 1px solid rgba(230, 57, 70, 0.4);
  color: #ff6b6b;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-kick-member:hover {
  background: #e63946;
  color: #fff;
  transform: scale(1.05);
}

/* Chat Panel Styles */
.chat-messages {
  flex: 1;
  min-height: 210px;
  max-height: 230px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 10px;
  border-radius: 10px;
  border-left: 3px solid #a855f7;
  font-size: 12px;
}

.chat-msg.system {
  border-left-color: #ffbe0b;
  background: rgba(255, 190, 11, 0.06);
}

.chat-msg.red {
  border-left-color: #e63946;
}

.chat-msg.blue {
  border-left-color: #3a86ff;
}

.chat-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  color: #adb5bd;
}

.chat-sender {
  font-weight: 900;
}

.chat-sender.red { color: #e63946; }
.chat-sender.blue { color: #3a86ff; }
.chat-sender.system { color: #ffbe0b; }

.chat-text {
  font-size: 12px;
  font-weight: 600;
  color: #e9ecef;
  word-break: break-word;
}

.chat-input-bar {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

.chat-input-bar input {
  flex: 1;
  background: rgba(10, 7, 18, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  outline: none;
}

.chat-input-bar input:focus {
  border-color: #a855f7;
}

.chat-input-bar button {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 0 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-input-bar button:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* Match Lobby Card (Center) */
.lobby-card {
  background: rgba(16, 12, 26, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(168, 85, 247, 0.32);
  border-radius: 22px;
  padding: 20px 24px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.65), 0 0 35px rgba(168, 85, 247, 0.2);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  box-sizing: border-box;
}

.lobby-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(168, 85, 247, 0.18);
  padding-bottom: 12px;
}

.room-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.room-host {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.room-tag {
  font-size: 11px;
  font-weight: 700;
  color: #a855f7;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  padding: 3px 10px;
  border-radius: 12px;
}

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

.lobby-settings-btn {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #e9d5ff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.lobby-settings-btn:hover {
  background: rgba(168, 85, 247, 0.35);
  border-color: #a855f7;
  color: #fff;
  transform: translateY(-1px);
}

.room-mode-tag {
  font-size: 12px;
  font-weight: 900;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.22);
  padding: 5px 14px;
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.45);
}

/* 2 Teams Only (Rot & Blau, balanced 1fr 1fr) */
.lobby-teams-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.lobby-team-box {
  background: rgba(10, 7, 18, 0.88);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.lobby-team-box:hover {
  transform: translateY(-2px);
}

.lobby-team-box.red {
  border-top: 3px solid #e63946;
}

.lobby-team-box.red.active-team {
  border-color: #e63946;
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.35);
  background: rgba(230, 57, 70, 0.08);
}

.lobby-team-box.blue {
  border-top: 3px solid #3a86ff;
}

.lobby-team-box.blue.active-team {
  border-color: #3a86ff;
  box-shadow: 0 0 20px rgba(58, 134, 255, 0.35);
  background: rgba(58, 134, 255, 0.08);
}

.team-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.red-header { color: #e63946; }
.blue-header { color: #3a86ff; }

.team-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
}

.player-slot.empty {
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #adb5bd;
  cursor: pointer;
  font-size: 13px;
  justify-content: center;
  padding: 12px;
}

.player-slot.empty:hover {
  border-color: #fff;
  color: #fff;
}

.slot-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
}

.slot-avatar.red-avatar { background: #e63946; }
.slot-avatar.blue-avatar { background: #3a86ff; }
.host-crown { margin-left: auto; font-size: 14px; }

/* Bot Slot Styling */
.player-slot.bot-slot {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.35);
}
.bot-avatar {
  background: #0f172a !important;
  border-color: #00f0ff !important;
  font-size: 15px;
}
.bot-badge {
  font-size: 10px;
  font-weight: 900;
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.15);
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
  letter-spacing: 0.5px;
}
.btn-remove-bot {
  margin-left: auto;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  transition: all 0.2s;
}
.btn-remove-bot:hover {
  background: #ef4444;
  color: #fff;
  transform: scale(1.15);
}
.slot-empty-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-direction: column;
}
.slot-bot-hint {
  font-size: 10px;
  font-weight: 700;
  color: #00f0ff;
  opacity: 0.85;
}

.lobby-user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 7, 18, 0.92);
  padding: 10px 16px;
  border-radius: 16px;
  border: 1px solid rgba(168, 85, 247, 0.25);
  gap: 12px;
  flex-wrap: nowrap;
}

.user-inline-setup {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.user-inline-setup label {
  font-size: 13px;
  font-weight: 800;
  color: #c084fc;
  white-space: nowrap;
}

.user-inline-setup input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 7px 10px;
  border-radius: 10px;
  outline: none;
  width: 115px;
}

.user-inline-setup input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.55);
}

/* Team Switch Buttons (Only Red & Blue) */
.team-switch-group {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.team-switch-label {
  font-size: 12px;
  font-weight: 800;
  color: #adb5bd;
}

.team-choice-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 14px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #adb5bd;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.team-choice-btn:hover {
  transform: scale(1.04);
}

.team-choice-btn.red.active {
  background: #e63946;
  border-color: #e63946;
  color: #fff;
  box-shadow: 0 0 14px rgba(230, 57, 70, 0.6);
}

.team-choice-btn.blue.active {
  background: #3a86ff;
  border-color: #3a86ff;
  color: #fff;
  box-shadow: 0 0 14px rgba(58, 134, 255, 0.6);
}

.start-match-btn {
  background: linear-gradient(135deg, #9333ea 0%, #4f46e5 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  padding: 10px 20px;
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(147, 51, 234, 0.45);
  cursor: pointer;
  border: none;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.start-match-btn:hover {
  transform: scale(1.04);
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  box-shadow: 0 8px 28px rgba(168, 85, 247, 0.6);
}

/* Coming Soon Badge */
.badge-coming-soon {
  background: rgba(255, 215, 0, 0.2);
  color: #ffe066;
  font-size: 8px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 215, 0, 0.4);
}

.nav-btn[disabled] {
  opacity: 0.75;
  cursor: default;
}

/* Bottom Modes Selector Bar */
.bottom-modes-bar {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 820px;
  justify-content: center;
  flex-wrap: wrap;
}

.mode-tab {
  flex: 1;
  min-width: 110px;
  background: rgba(16, 12, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #adb5bd;
  font-family: inherit;
}

.mode-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-2px);
}

.mode-tab.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(99, 102, 241, 0.3) 100%);
  border-color: #a855f7;
  color: #fff;
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.4);
}

.tab-icon {
  font-size: 18px;
}

.tab-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.tab-title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.tab-sub {
  font-size: 10px;
  font-weight: 700;
  color: #ced4da;
  opacity: 0.75;
}

.mode-tab.active .tab-title {
  color: #c084fc;
}

.mode-tab.active .tab-sub {
  color: #a855f7;
}

/* Locked Modes: Vibrieren NUR bei Klick */
.mode-tab.locked {
  opacity: 0.65;
  cursor: pointer;
  background: rgba(22, 14, 28, 0.75);
  border: 1px solid rgba(230, 57, 70, 0.28);
}

.mode-tab.locked:hover {
  border-color: rgba(230, 57, 70, 0.5);
}

.mode-tab.locked .tab-icon {
  font-size: 15px;
  filter: drop-shadow(0 0 5px rgba(230, 57, 70, 0.5));
}

.mode-tab.locked .tab-sub {
  color: #e63946;
  font-weight: 800;
}

@keyframes lockVibrate {
  0% { transform: translateX(0); }
  20% { transform: translateX(-5px) rotate(-1.5deg); }
  40% { transform: translateX(5px) rotate(1.5deg); }
  60% { transform: translateX(-4px) rotate(-1deg); }
  80% { transform: translateX(4px) rotate(1deg); }
  100% { transform: translateX(0) rotate(0); }
}

.mode-tab.vibrating {
  animation: lockVibrate 0.35s ease !important;
  border-color: #ef233c !important;
  box-shadow: 0 0 16px rgba(239, 35, 60, 0.6) !important;
}

/* Controls Guide Footer */
.controls-guide {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(15, 20, 25, 0.7);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 11px;
  color: #ced4da;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.control-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

kbd {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
}

/* 3-Second Kickoff Countdown Overlay */
.countdown-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 25;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

.countdown-overlay.active {
  display: flex;
}

.countdown-number {
  font-size: 120px;
  font-weight: 900;
  color: #ffbe0b;
  text-shadow: 0 0 40px rgba(255, 190, 11, 0.9), 0 8px 24px rgba(0, 0, 0, 0.9);
  line-height: 1;
  animation: countdownPop 0.85s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.countdown-sub {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  margin-top: 12px;
}

@keyframes countdownPop {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1.0); opacity: 1; }
}

/* In-Game HUD */
.ui-hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
  z-index: 10;
}

.ui-hud.active {
  display: block;
}

.hud-corner-actions {
  position: absolute;
  top: 14px;
  right: 20px;
  pointer-events: auto;
}

.hud-btn {
  pointer-events: auto;
  background: rgba(16, 12, 26, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.hud-btn:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: #a855f7;
  transform: translateY(-2px);
}

.hud-btn.highlight {
  background: linear-gradient(135deg, #ffbe0b, #fb8500);
  color: #000;
  border: none;
  box-shadow: 0 4px 14px rgba(255, 190, 11, 0.4);
}

.hud-btn.highlight:hover {
  transform: translateY(-2px) scale(1.03);
}

/* Kick & Dribble Meters Bottom Bar (Ganz unten am Rand positioniert) */
.hud-bottom-bar {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  pointer-events: none;
  z-index: 15;
}

.hud-meter-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: rgba(14, 10, 24, 0.88);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 18px;
  border: 1px solid rgba(168, 85, 247, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  min-width: 160px;
}

.hud-meter-box.active-dribble {
  border-color: #ffd128;
  box-shadow: 0 0 18px rgba(255, 209, 40, 0.5);
}

.meter-bar-outer {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.meter-bar-inner,
.dribble-bar-inner,
.kick-bar-inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  transition: width 0.08s linear;
}

#kick-cooldown-bar {
  background: linear-gradient(90deg, #c084fc, #818cf8);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.8);
}

#dribble-cooldown-bar {
  background: linear-gradient(90deg, #ffe066, #ffbe0b);
  box-shadow: 0 0 10px rgba(255, 190, 11, 0.8);
}

.meter-hint {
  font-size: 11px;
  font-weight: 800;
  color: #adb5bd;
  letter-spacing: 0.5px;
}

/* Goal Banner Animation */
.goal-banner {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 30;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.goal-banner.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.goal-text {
  font-size: 80px;
  font-weight: 900;
  color: #ffbe0b;
  text-shadow: 0 0 25px rgba(255, 190, 11, 0.8), 0 6px 12px rgba(0, 0, 0, 0.8);
  letter-spacing: 4px;
}

.goal-subtext {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.8);
  letter-spacing: 2px;
}

/* Full Settings Modal */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 40;
  display: none;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.settings-card {
  width: 520px;
  max-width: 95vw;
  background: rgba(16, 12, 26, 0.96);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 20px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 35px rgba(168, 85, 247, 0.2);
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
  padding-bottom: 12px;
}

.settings-header h3 {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.settings-tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.settings-tab-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #adb5bd;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

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

.settings-tab-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(99, 102, 241, 0.35));
  border-color: #a855f7;
  color: #fff;
}

.settings-tab-content {
  display: none;
  flex-direction: column;
  gap: 14px;
  padding: 6px 0;
  min-height: 190px;
}

.settings-tab-content.active {
  display: flex;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.setting-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setting-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.setting-desc {
  font-size: 11px;
  color: #adb5bd;
}

.setting-keybinds-box {
  background: rgba(10, 7, 18, 0.8);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.keybind-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #ced4da;
}

.key-tag {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #e9d5ff;
}

.range-slider {
  accent-color: #a855f7;
  cursor: pointer;
  width: 130px;
}

.select-dropdown {
  background: #212936;
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 10px;
  outline: none;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #3e4856;
  transition: .3s;
  border-radius: 24px;
}

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

input:checked + .slider {
  background-color: #a855f7;
}

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

.settings-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top

/* ========================================================
   v0.2.1s UI Additions & Refinements
   ======================================================== */

/* Version Badge next to Logo in half font size */
.version-tag {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #3a86ff;
  background: rgba(58, 134, 255, 0.15);
  border: 1px solid rgba(58, 134, 255, 0.5);
  padding: 3px 10px;
  border-radius: 8px;
  letter-spacing: 0.8px;
  margin-left: 12px;
  vertical-align: middle;
  box-shadow: 0 0 12px rgba(58, 134, 255, 0.3);
}

.version-pill {
  color: #3a86ff !important;
  border-color: rgba(58, 134, 255, 0.4) !important;
}

/* Server Online Badge in Party Card Header */
.server-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #00f076;
  background: rgba(0, 240, 118, 0.12);
  border: 1px solid rgba(0, 240, 118, 0.35);
  padding: 2px 9px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  margin-left: auto;
}

.online-indicator-dot {
  width: 7px;
  height: 7px;
  background-color: #00f076;
  border-radius: 50%;
  box-shadow: 0 0 8px #00f076;
  display: inline-block;
  animation: pulseOnlineDot 2s infinite ease-in-out;
}

@keyframes pulseOnlineDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.online-pill {
  color: #00f076 !important;
  border-color: rgba(0, 240, 118, 0.4) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Party Member Count Badge next to Members label */
.party-members-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: #8b9bb4;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.party-members-header .party-count-badge {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #c084fc;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
}

/* Language Switcher in Top Navigation Bar */
.lang-btn {
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
  border-color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #a855f7;
  transform: translateY(-1px);
}

/* Language Selection Pills in Settings */
.lang-switch-pills {
  display: flex;
  gap: 8px;
}

.lang-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #adb5bd;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.lang-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.lang-pill.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.45) 0%, rgba(99, 102, 241, 0.45) 100%);
  border-color: #a855f7;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

/* Streamlined Settings Modal Card */
.settings-card {
  max-width: 520px;
  width: 92%;
  background: rgba(20, 16, 32, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 32px rgba(168, 85, 247, 0.15);
}

.settings-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 18px 0;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 4px;
}

.settings-body::-webkit-scrollbar {
  width: 6px;
}

.settings-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.settings-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
}
