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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #1a1a2e;
  color: #eee;
  min-height: 100vh;
}

#app {
  width: 100%;
  min-height: 100vh;
}

.screen {
  display: none;
  padding: 20px;
  min-height: 100vh;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* Branding */
.brand-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: #e94560;
  text-align: center;
  margin-bottom: 5px;
  text-shadow: 0 0 10px rgba(233, 69, 96, 0.3);
}

.brand-title-small {
  font-size: 1.2rem;
  font-weight: bold;
  color: #e94560;
  text-shadow: 0 0 8px rgba(233, 69, 96, 0.3);
}

.beta-tag {
  font-size: 0.7rem;
  color: #facc15;
  text-align: center;
  letter-spacing: 2px;
  line-height: 1;
}

.discord-link {
  display: block;
  font-size: 0.75rem;
  color: #7289da;
  text-decoration: none;
  text-align: center;
  margin-top: 2px;
}

.discord-link:hover {
  color: #99aab5;
  text-decoration: underline;
}

/* Login Screen */
#login-screen {
  align-items: center;
  justify-content: center;
  text-align: center;
}

#login-screen h1 {
  font-size: 3rem;
  color: #e94560;
  margin-bottom: 10px;
}

#login-screen p {
  color: #888;
  margin-bottom: 30px;
}

/* Mobile Warning */
.mobile-warning {
  background: rgba(233, 69, 96, 0.15);
  border: 2px solid #e94560;
  border-radius: 12px;
  padding: 20px 30px;
  margin-bottom: 30px;
  max-width: 400px;
  text-align: center;
}

.mobile-warning h2 {
  color: #e94560;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.mobile-warning p {
  color: #ccc;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.mobile-warning button {
  background: transparent;
  border: 1px solid #888;
  color: #888;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.mobile-warning button:hover {
  border-color: #e94560;
  color: #e94560;
  background: transparent;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

input[type="password"] {
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid #333;
  border-radius: 8px;
  background: #16213e;
  color: #fff;
  outline: none;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
}

input[type="password"]:focus {
  border-color: #e94560;
}

#login-status {
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 6px;
  text-align: center;
}

.login-status-info {
  color: #4ade80;
}

.login-status-error {
  color: #f87171;
}

input[type="text"] {
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid #333;
  border-radius: 8px;
  background: #16213e;
  color: #fff;
  outline: none;
}

input[type="text"]:focus {
  border-color: #e94560;
}

button {
  padding: 12px 24px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  background: #e94560;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #ff6b6b;
}

button:disabled {
  background: #555;
  cursor: not-allowed;
}

/* Lobby Screen */
.lobby-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid #333;
  margin-bottom: 20px;
}

.lobby-header h2 {
  color: #e94560;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.player-display {
  color: #888;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.player-display:hover {
  color: #4ade80;
}

.player-display::before {
  content: "Playing as: ";
  color: #666;
}

.player-display .settings-icon {
  margin-left: 4px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.player-display:hover .settings-icon {
  opacity: 1;
}

.logout-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  background: transparent;
  border: 2px solid #e94560;
  border-radius: 6px;
  color: #e94560;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: #e94560;
  color: #fff;
}

.rooms-panel {
  background: #16213e;
  border-radius: 12px;
  padding: 20px;
  flex: 1;
  min-width: 280px;
}

.rooms-panel h3 {
  margin-bottom: 15px;
  color: #e94560;
}

#rooms-list {
  margin-bottom: 15px;
}

.room-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #1a1a2e;
  border-radius: 8px;
  margin-bottom: 8px;
}

.room-item .room-info {
  flex: 1;
}

.room-item .room-name {
  font-weight: bold;
}

.room-item .room-details {
  font-size: 0.85rem;
  color: #888;
}

.room-item button {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.room-item.has-active-game {
  border: 2px solid #4ade80;
  background: #1a2e1a;
}

/* Leaderboard Panel */
.lobby-content {
  display: flex;
  gap: 20px;
  flex-wrap: nowrap;
  overflow-x: auto;
  align-items: stretch;
}

.leaderboard-panel {
  background: #16213e;
  border-radius: 12px;
  padding: 20px;
  flex: 1;
  min-width: 280px;
}

.leaderboard-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
}

.tab-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(233, 69, 96, 0.2);
}

.tab-btn.active {
  color: #e94560;
  background: rgba(233, 69, 96, 0.1);
  border-bottom: 2px solid #e94560;
  margin-bottom: -12px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 10px;
  background: #1a1a2e;
  border-radius: 8px;
  margin-bottom: 6px;
}

.leaderboard-item.top-3 {
  background: linear-gradient(135deg, #1a1a2e 0%, #2a1a3e 100%);
  border-left: 3px solid #e94560;
}

.leaderboard-rank {
  font-size: 1.2rem;
  font-weight: bold;
  width: 35px;
  color: #666;
}

.leaderboard-item.top-3 .leaderboard-rank {
  color: #e94560;
}

.leaderboard-name {
  flex: 1;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaderboard-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.leaderboard-badge.badge-noob {
  background: #3a3a3a;
  color: #888;
}

.leaderboard-badge.badge-trainee {
  background: #1d4ed8;
  color: #93c5fd;
}

.leaderboard-badge.badge-dentist {
  background: #166534;
  color: #86efac;
}

.leaderboard-badge.badge-tactician {
  background: #6b21a8;
  color: #d8b4fe;
}

.leaderboard-badge.badge-master {
  background: #b45309;
  color: #fcd34d;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}

.leaderboard-badge.badge-irredentist {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #fff;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.5);
}

.leaderboard-stats {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: #888;
}

.leaderboard-stats span {
  white-space: nowrap;
}

.stat-wins {
  color: #4ade80;
}

.stat-points {
  color: #60a5fa;
  font-weight: bold;
}

.stat-winrate {
  color: #facc15;
}

.recent-game-item {
  padding: 10px;
  background: #1a1a2e;
  border-radius: 8px;
  margin-bottom: 6px;
}

.recent-game-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.recent-game-winner {
  color: #4ade80;
  font-weight: 500;
}

.recent-game-players {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 4px;
}

.recent-game-players .vs {
  color: #f87171;
  font-weight: bold;
  margin: 0 4px;
}

.recent-game-info {
  font-size: 0.8rem;
  color: #666;
}

.my-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-card {
  background: #1a1a2e;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
}

.stat-card-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: #e94560;
}

.stat-card-label {
  font-size: 0.85rem;
  color: #888;
  margin-top: 5px;
}

.online-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  margin-right: 6px;
}

.stats-note {
  color: #666;
  font-size: 0.8rem;
  text-align: center;
  padding: 12px 0 4px;
  font-style: italic;
}

/* Badge and Achievements */
.badge-section {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #333;
}

.badge-display {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge-name {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.badge-description {
  color: #888;
  font-size: 0.85rem;
}

/* Badge type colors */
.badge-noob {
  background: linear-gradient(135deg, #4a4a4a 0%, #2a2a2a 100%);
  color: #999;
  border: 2px solid #555;
}

.badge-trainee {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  border: 2px solid #60a5fa;
}

.badge-dentist {
  background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
  color: #fff;
  border: 2px solid #86efac;
}

.badge-tactician {
  background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
  color: #fff;
  border: 2px solid #c084fc;
}

.badge-master {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  color: #000;
  border: 2px solid #fcd34d;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

.badge-irredentist {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
  border: 2px solid #f87171;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.5), 0 0 40px rgba(239, 68, 68, 0.3);
  animation: irredentist-glow 2s ease-in-out infinite;
}

@keyframes irredentist-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.5), 0 0 40px rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 25px rgba(239, 68, 68, 0.7), 0 0 50px rgba(239, 68, 68, 0.4); }
}

/* Achievements Section */
.achievements-section {
  margin-top: 20px;
}

.achievements-section h4 {
  color: #e94560;
  margin-bottom: 12px;
  font-size: 1rem;
}

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

.achievement-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1a1a2e;
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 3px solid #4ade80;
}

.achievement-item.achievement-locked {
  opacity: 0.5;
  border-left-color: #444;
}

.achievement-icon {
  font-size: 1.2rem;
  color: #4ade80;
}

.achievement-item.achievement-locked .achievement-icon {
  color: #666;
}

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

.achievement-name {
  font-weight: bold;
  color: #fff;
  font-size: 0.9rem;
}

.achievement-item.achievement-locked .achievement-name {
  color: #888;
}

.achievement-desc {
  color: #888;
  font-size: 0.8rem;
}

.achievement-item.achievement-locked .achievement-desc {
  color: #555;
}

.no-achievements {
  color: #666;
  font-style: italic;
  text-align: center;
  padding: 15px;
}

.no-data {
  color: #666;
  text-align: center;
  padding: 20px;
}

/* Lobby Right Panel (Tips + Chat) */
.lobby-right-panel {
  background: #16213e;
  border-radius: 12px;
  padding: 20px;
  flex: 1;
  min-width: 280px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.lobby-right-panel h3 {
  margin-bottom: 10px;
  color: #e94560;
}

/* Lobby Tips Carousel */
.lobby-tips-section {
  flex-shrink: 0;
}

.lobby-tips-carousel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lobby-tips-content {
  flex: 1;
  min-height: 3em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lobby-tips-content .lobby-tip {
  display: none;
  margin: 0;
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.4;
  text-align: center;
}

.lobby-tips-content .lobby-tip.active {
  display: block;
}

/* Lobby Chat Section */
.lobby-chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.lobby-chat-section .chat-messages-panel {
  flex: 1;
  min-height: 120px;
  max-height: 250px;
}

/* Room Screen */
.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid #333;
  margin-bottom: 20px;
}

.room-header h2 {
  color: #e94560;
}

.panel-actions {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-actions button {
  padding: 10px 20px;
  font-size: 0.95rem;
}

#ready-btn.ready,
#draft-ready-btn.ready {
  background: #4ade80;
}

#leave-room-btn {
  background: #555;
}

.room-content {
  display: flex;
  gap: 0;
  flex: 1;
  min-height: 0;
}

.players-panel, .settings-panel {
  background: #16213e;
  border-radius: 12px;
  padding: 20px;
  overflow-y: auto;
}

.players-panel {
  flex: 2;
  min-width: 280px;
}

.settings-panel {
  flex: 1;
  min-width: 200px;
}

.resize-handle-horizontal {
  width: 8px;
  cursor: col-resize;
  margin: 0 4px;
  background: linear-gradient(to right, transparent 2px, #444 2px, #444 3px, transparent 3px, transparent 5px, #444 5px, #444 6px, transparent 6px);
  border-radius: 4px;
  transition: background 0.15s ease;
}

.resize-handle-horizontal:hover,
.resize-handle-horizontal.dragging {
  background: #e94560;
}

/* Bottom resize handle for room/draft chat */
.resize-handle-bottom.resize-handle {
  background: linear-gradient(to bottom, transparent 2px, #444 2px, #444 3px, transparent 3px, transparent 5px, #444 5px, #444 6px, transparent 6px);
}

.players-panel h3, .settings-panel h3 {
  margin-bottom: 15px;
  color: #e94560;
}

.player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: #1a1a2e;
  border-radius: 8px;
  margin-bottom: 8px;
}

.player-item.ready {
  border-left: 3px solid #4ade80;
}

.player-item .player-name {
  font-weight: bold;
}

.player-item .player-team {
  font-size: 0.85rem;
  color: #888;
}

.player-item .host-badge {
  background: #e94560;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.player-item .you-badge {
  background: #4ade80;
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
}

.player-item.is-me {
  background: rgba(74, 222, 128, 0.1);
  border-left: 3px solid #4ade80;
}

.my-team-select {
  background: #1a1a2e;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.85rem;
  cursor: pointer;
  min-width: 90px;
}

.my-team-select:hover {
  border-color: #4ade80;
}

.kick-btn {
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kick-btn:hover {
  background: #ef4444;
}

.setting {
  margin-bottom: 15px;
}

.setting label {
  display: block;
  margin-bottom: 5px;
  color: #888;
}

/* Collapsible sections */
.collapsible-section .collapsible-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.collapsible-section .collapsible-header:hover {
  color: #fff;
}

.collapsible-section .collapse-arrow {
  font-size: 10px;
  transition: transform 0.2s;
}

.collapsible-section.collapsed .collapse-arrow {
  transform: rotate(0deg);
}

.collapsible-section:not(.collapsed) .collapse-arrow {
  transform: rotate(90deg);
}

.collapsible-section.collapsed .collapsible-content {
  display: none;
}

select {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border: 2px solid #333;
  border-radius: 8px;
  background: #1a1a2e;
  color: #fff;
  outline: none;
}

select:focus {
  border-color: #e94560;
}

.team-select {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #333;
}

/* Draft Screen */
.draft-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid #333;
  margin-bottom: 20px;
}

.draft-header h2 {
  color: #e94560;
}

.budget-display {
  font-size: 1.2rem;
  padding: 10px 20px;
  background: #16213e;
  border-radius: 8px;
}

.draft-content {
  display: flex;
  gap: 0;
  flex: 1;
  overflow: hidden;
}

.unit-shop {
  background: #16213e;
  border-radius: 12px;
  padding: 20px;
  width: 55%;
  min-width: 300px;
  max-width: 70%;
  overflow-y: auto;
  flex-shrink: 0;
}

.draft-summary {
  background: #16213e;
  border-radius: 12px;
  padding: 20px;
  flex: 1;
  min-width: 200px;
  overflow-y: auto;
}

.unit-shop h3, .draft-summary h3 {
  margin-bottom: 15px;
  color: #e94560;
}

.cc-builder {
  background: #1a1a2e;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.cc-builder .cc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cc-builder .cc-type {
  font-weight: bold;
}

.cc-builder .cc-cost {
  color: #4ade80;
}

.cc-option {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.cc-option label {
  color: #888;
  min-width: 80px;
}

.cc-option select {
  flex: 1;
}

.remove-cc-btn {
  background: #dc2626;
  padding: 6px 12px;
  font-size: 0.8rem;
}

#add-cc-btn {
  width: 100%;
  background: #16213e;
  border: 2px dashed #333;
}

#add-cc-btn:hover {
  border-color: #e94560;
  background: #1a1a2e;
}

.army-item {
  padding: 10px;
  background: #1a1a2e;
  border-radius: 8px;
  margin-bottom: 8px;
}

.army-item .cc-name {
  font-weight: bold;
}

.army-item .cc-loadout {
  font-size: 0.85rem;
  color: #888;
}

.shield-pool {
  margin-top: 20px;
  padding: 15px;
  background: #1a1a2e;
  border-radius: 8px;
  text-align: center;
  font-size: 1.1rem;
}

.shield-pool span {
  color: #4ade80;
  font-weight: bold;
}

/* Game Screen */
#game-screen.active {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  padding: 10px;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #16213e;
  border-radius: 8px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.turn-info, .player-info {
  display: flex;
  gap: 20px;
}

#current-turn {
  transition: all 0.3s ease;
}

#current-turn.your-turn {
  font-size: 1.4em;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.6);
  animation: pulse-turn 2s ease-in-out infinite;
}

@keyframes pulse-turn {
  0%, 100% { text-shadow: 0 0 10px rgba(74, 222, 128, 0.6); }
  50% { text-shadow: 0 0 20px rgba(74, 222, 128, 0.9), 0 0 30px rgba(74, 222, 128, 0.4); }
}

.game-content {
  display: flex;
  gap: 10px;
  flex: 1;
  min-height: 0; /* Allow flex item to shrink */
  overflow: hidden;
}

.game-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 300px;
  min-height: 0;
}

.map-container {
  flex: 1;
  position: relative;
  min-height: 0; /* Allow flex item to shrink */
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #0f0f1a;
  border-radius: 8px;
}

.zoom-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 10;
}

.zoom-controls button {
  width: 32px;
  height: 32px;
  font-size: 18px;
  font-weight: bold;
  background: rgba(22, 33, 62, 0.9);
  border: 2px solid #333;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.zoom-controls button:hover {
  background: rgba(42, 53, 82, 0.95);
  border-color: #4ade80;
}

.zoom-controls button:active {
  transform: scale(0.95);
}

/* Training Help Bubble */
.training-help-bubble {
  position: absolute;
  top: 10px;
  right: 80px;
  background: #1a1a2e;
  border: 3px solid #4ade80;
  border-radius: 12px;
  padding: 20px;
  max-width: 320px;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(74, 222, 128, 0.3);
  animation: bubble-pulse 2s ease-in-out infinite;
}

@keyframes bubble-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(74, 222, 128, 0.3); }
  50% { box-shadow: 0 4px 30px rgba(74, 222, 128, 0.5); }
}

.help-bubble-content {
  font-size: 1.1rem;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 15px;
}

.help-bubble-arrow {
  position: absolute;
  top: 20px;
  right: -15px;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 15px solid #4ade80;
}

.help-bubble-arrow::after {
  content: '';
  position: absolute;
  top: -12px;
  right: 3px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 12px solid #1a1a2e;
}

.help-bubble-dismiss {
  background: #4ade80;
  color: #000;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  display: block;
  margin: 0 auto;
}

.help-bubble-dismiss:hover {
  background: #22c55e;
}

.training-help-center {
  top: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
}

.training-help-cc {
  top: 45%;
  right: 28%;
  left: auto;
  transform: translateY(-50%);
}

.help-bubble-arrow-right-point {
  position: absolute;
  top: 50%;
  right: -15px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 15px solid #4ade80;
}

.help-bubble-arrow-right-point::after {
  content: '';
  position: absolute;
  top: -12px;
  right: 3px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 12px solid #1a1a2e;
}

.end-turn-container {
  position: relative;
  width: 100%;
  margin-top: auto;
  overflow: visible;
}

.training-help-endturn {
  position: fixed;
  bottom: 120px;
  right: 20px;
  z-index: 1000;
  width: 260px;
  height: auto;
  top: auto;
  left: auto;
}

.help-bubble-arrow-down {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 15px solid #4ade80;
}

.help-bubble-arrow-down::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: -12px;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid #1a1a2e;
}

.training-help-fortify {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  margin-top: 10px;
  width: 100%;
}

.help-bubble-arrow-up {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 15px solid #4ade80;
}

.help-bubble-arrow-up::after {
  content: '';
  position: absolute;
  top: 3px;
  left: -12px;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid #1a1a2e;
}

.training-help-cards {
  position: absolute;
  top: 50%;
  left: 20px;
  right: auto;
  transform: translateY(-50%);
  max-width: 300px;
}

.help-bubble-arrow-left {
  position: absolute;
  top: 50%;
  left: -15px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-right: 15px solid #4ade80;
}

.help-bubble-arrow-left::after {
  content: '';
  position: absolute;
  top: -12px;
  left: 3px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 12px solid #1a1a2e;
}

.game-sidebar-left {
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex-shrink: 0;
}

.game-sidebar {
  width: 250px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex-shrink: 0;
}

/* Resize handles */
.resize-handle {
  flex-shrink: 0;
  transition: background 0.15s ease;
  position: relative;
}

.resize-handle:hover {
  background: #e94560 !important;
}

.resize-handle.dragging {
  background: #e94560 !important;
}

.resize-handle-left,
.resize-handle-right {
  width: 8px;
  cursor: col-resize;
  margin: 0 2px;
  background: linear-gradient(to right, transparent 2px, #444 2px, #444 3px, transparent 3px, transparent 5px, #444 5px, #444 6px, transparent 6px);
  border-radius: 4px;
}

.resize-handle-bottom {
  height: 8px;
  cursor: row-resize;
  margin: 2px 0;
  border-radius: 4px;
  background: linear-gradient(to bottom, transparent 2px, #444 2px, #444 3px, transparent 3px, transparent 5px, #444 5px, #444 6px, transparent 6px);
}

/* Prevent text selection while dragging */
body.resizing {
  user-select: none;
  cursor: col-resize;
}

body.resizing-vertical {
  user-select: none;
  cursor: row-resize;
}

#players-panel, #action-panel, #info-panel, #messages-panel, #tips-panel {
  background: #16213e;
  border-radius: 8px;
  padding: 15px;
}

#players-panel h3, #messages-panel h3 {
  margin-bottom: 10px;
  color: #e94560;
  font-size: 0.9rem;
}

#game-players-list {
  max-height: 200px;
  overflow-y: auto;
}

#messages-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#messages-list {
  flex: 1;
  overflow-y: auto;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message-item {
  padding: 6px 8px;
  background: rgba(40, 40, 60, 0.5);
  border-radius: 4px;
  border-left: 3px solid #888;
}

/* Player colors for messages */
.message-item.player-0 { border-left-color: #60a5fa; } /* Blue */
.message-item.player-1 { border-left-color: #f87171; } /* Red */
.message-item.player-2 { border-left-color: #4ade80; } /* Green */
.message-item.player-3 { border-left-color: #facc15; } /* Yellow */
.message-item.player-4 { border-left-color: #c084fc; } /* Purple */
.message-item.player-5 { border-left-color: #fb923c; } /* Orange */
.message-item.player-6 { border-left-color: #2dd4bf; } /* Teal */
.message-item.player-7 { border-left-color: #f472b6; } /* Pink */

/* System messages (game over, turn changes, etc.) */
.message-item.system { border-left-color: #888; }

#action-panel {
  flex: 1;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Command Center items in action panel */
.cc-item {
  min-height: 50px;
  flex-shrink: 0;
}

.cc-item.expanded {
  min-height: 180px;
}

.cc-item .cc-actions {
  min-height: 120px;
  max-height: 300px;
  overflow-y: auto;
}

#action-panel h3, #info-panel h3, #tips-panel h3 {
  margin-bottom: 10px;
  color: #e94560;
  font-size: 0.9rem;
  flex-shrink: 0;
}

#tips-panel {
  flex-shrink: 0;
}

#tips-carousel {
  display: flex;
  align-items: center;
  gap: 8px;
}

#tips-content {
  flex: 1;
  min-height: 2.5em;
  display: flex;
  align-items: center;
  justify-content: center;
}

#tips-content .tip {
  display: none;
  margin: 0;
  font-size: 0.8rem;
  color: #aaa;
  line-height: 1.4;
  text-align: center;
}

#tips-content .tip.active {
  display: block;
}

.tip-nav {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #888;
  width: 16px;
  height: 20px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.7rem;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
  padding: 0;
}

.tip-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

#action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

#action-buttons button {
  width: 100%;
  padding: 10px;
  font-size: 0.9rem;
}

#selection-info {
  font-size: 0.9rem;
  color: #888;
}

#end-turn-btn {
  width: 100%;
  padding: 12px 20px;
  font-size: 1rem;
  background: #4ade80;
  color: #000;
  font-weight: bold;
}

#end-turn-btn:hover:not(:disabled) {
  background: #22c55e;
}

#end-turn-btn:disabled {
  background: #555;
  color: #888;
}

#surrender-btn {
  width: 100%;
  padding: 10px 20px;
  margin-top: 10px;
  font-size: 0.9rem;
  background: #dc2626;
  color: #fff;
  font-weight: bold;
}

#surrender-btn:hover {
  background: #b91c1c;
}

/* Cards Panel */
#cards-panel {
  background: #16213e;
  border-radius: 8px;
  padding: 15px;
  max-height: 250px;
  min-height: 80px;
  overflow-y: auto;
  flex-shrink: 0;
}

#cards-panel h3 {
  margin-bottom: 10px;
  color: #e94560;
  font-size: 0.9rem;
}

#cards-hand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-item {
  background: #1a1a2e;
  border: 2px solid #333;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.card-item:hover {
  border-color: #e94560;
  background: #252540;
}

.card-item.selected {
  border-color: #4ade80;
  background: #1e3a1e;
}

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

.card-item .card-name {
  font-weight: bold;
  color: #fff;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.card-item .card-effect {
  font-size: 0.75rem;
  color: #888;
  line-height: 1.3;
}

.no-cards {
  color: #666;
  font-style: italic;
  font-size: 0.85rem;
}

/* Team colors */
.team-0 { color: #60a5fa; } /* Blue */
.team-1 { color: #f87171; } /* Red */
.team-2 { color: #4ade80; } /* Green */
.team-3 { color: #facc15; } /* Yellow */
.team-4 { color: #c084fc; } /* Purple */
.team-5 { color: #fb923c; } /* Orange */
.team-6 { color: #2dd4bf; } /* Teal */
.team-7 { color: #f472b6; } /* Pink */
.no-team { color: #666; font-style: italic; } /* No team assigned */

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

::-webkit-scrollbar-track {
  background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Chat Box */
.chat-container {
  background: #16213e;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  height: 140px;
  flex-shrink: 0;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 13px;
}

.chat-message {
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(40, 40, 60, 0.5);
}

.chat-message .chat-sender {
  font-weight: bold;
  margin-right: 6px;
}

.chat-message.system {
  color: #888;
  font-style: italic;
  background: transparent;
}

.chat-message.private {
  background: rgba(233, 69, 96, 0.2);
  border-left: 2px solid #e94560;
}

.chat-recipients {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(26, 26, 46, 0.8);
  border-radius: 4px;
  margin-bottom: 6px;
  font-size: 12px;
}

.chat-recipient-label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  transition: background 0.15s;
}

.chat-recipient-label:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chat-recipient-label input[type="checkbox"] {
  cursor: pointer;
  accent-color: #e94560;
}

.chat-recipient-label .teammate {
  color: #4ade80;
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

#chat-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  border: 2px solid #333;
  border-radius: 6px;
  background: #1a1a2e;
  color: #fff;
  outline: none;
}

#chat-input:focus {
  border-color: #e94560;
}

#chat-send-btn {
  padding: 8px 16px;
  font-size: 13px;
  background: #e94560;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
}

#chat-send-btn:hover {
  background: #ff6b6b;
}

/* Room and Draft Chat */
.room-chat-container,
.draft-chat-container {
  background: #16213e;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  height: 150px;
  flex-shrink: 0;
}

.draft-chat-container {
  margin-top: 0;
  min-height: 80px;
  max-height: 250px;
}

.chat-messages-panel {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 13px;
}

.chat-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  border: 2px solid #333;
  border-radius: 6px;
  background: #1a1a2e;
  color: #fff;
  outline: none;
}

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

.chat-send-btn {
  padding: 8px 16px;
  font-size: 13px;
  background: #e94560;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
}

.chat-send-btn:hover {
  background: #ff6b6b;
}

/* CC Tooltip */
.cc-tooltip {
  position: fixed;
  background: rgba(22, 33, 62, 0.95);
  border: 2px solid #e94560;
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 13px;
  pointer-events: none;
  z-index: 1000;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.cc-tooltip-header {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #333;
}

.cc-tooltip-row {
  display: flex;
  justify-content: space-between;
  margin: 4px 0;
}

.cc-tooltip-label {
  color: #888;
}

.cc-tooltip-value {
  color: #fff;
  font-weight: 500;
}

/* Bot Styles */
.player-item.is-bot {
  border-left: 3px solid #f59e0b;
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2a1a 100%);
}

.bot-badge {
  background: #f59e0b;
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  margin-left: 8px;
}

.bot-controls {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #333;
}

.bot-controls h4 {
  color: #f59e0b;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.bot-add-row {
  display: flex;
  gap: 10px;
}

.bot-add-row select {
  flex: 1;
  padding: 8px;
  font-size: 0.9rem;
}

.bot-add-row button {
  padding: 8px 16px;
  font-size: 0.9rem;
  background: #f59e0b;
  color: #000;
  font-weight: bold;
}

.bot-add-row button:hover {
  background: #fbbf24;
}

.bot-controls-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bot-controls-inline select {
  padding: 4px 8px;
  font-size: 0.8rem;
  min-width: 70px;
  background: #1a1a2e;
  border: 1px solid #333;
  border-radius: 4px;
  color: #fff;
}

.bot-controls-inline select:focus {
  border-color: #f59e0b;
  outline: none;
}

.bot-difficulty-select {
  min-width: 80px !important;
}

.bot-team-select {
  min-width: 80px !important;
}

.remove-bot-btn {
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-bot-btn:hover {
  background: #ef4444;
}

/* Game overlay (win/elimination message) */
.game-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  cursor: pointer;
  animation: overlayFadeIn 0.3s;
}

.game-overlay.fade-out {
  animation: overlayFadeOut 0.5s forwards;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes overlayFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Spectator/Observer Styles */
.chat-message.observer {
  opacity: 0.7;
  border-left: 2px solid #666;
  padding-left: 6px;
}

.observe-room-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.observe-room-btn:hover {
  background: #60a5fa;
}

.observers-label span {
  color: #888 !important;
  font-style: italic !important;
}

/* Training Missions Button */
.training-btn {
  width: 100%;
  margin-bottom: 15px;
  background: #3b82f6;
  border: none;
  color: #fff;
}

.training-btn:hover {
  background: #60a5fa;
}

/* Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.2s;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: #16213e;
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 2px solid #333;
}

.modal-content h2 {
  color: #e94560;
  margin-bottom: 5px;
  text-align: center;
}

.modal-subtitle {
  color: #888;
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 20px;
}

.modal-close-btn {
  width: 100%;
  margin-top: 20px;
  background: #555;
}

.modal-close-btn:hover {
  background: #666;
}

/* Training Mission List Items */
.training-mission-item {
  background: #1a1a2e;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border: 2px solid #333;
  transition: border-color 0.2s;
}

.training-mission-item:hover {
  border-color: #e94560;
}

.training-mission-item.completed {
  border-color: #4ade80;
  background: linear-gradient(135deg, #1a1a2e 0%, #1a2e1a 100%);
}

.mission-info {
  flex: 1;
}

.mission-name {
  font-weight: bold;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 5px;
}

.mission-checkmark {
  color: #4ade80;
  margin-right: 8px;
}

.mission-description {
  font-size: 0.9rem;
  color: #aaa;
  margin-bottom: 8px;
}

.mission-objective {
  font-size: 0.85rem;
  color: #888;
}

.mission-objective strong {
  color: #facc15;
}

.start-mission-btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  background: #e94560;
  white-space: nowrap;
  flex-shrink: 0;
}

.start-mission-btn:hover {
  background: #ff6b6b;
}

.training-mission-item.completed .start-mission-btn {
  background: #4ade80;
  color: #000;
}

.training-mission-item.completed .start-mission-btn:hover {
  background: #22c55e;
}

/* Clickable Leaderboard Names */
.leaderboard-name-link {
  cursor: pointer;
  transition: color 0.2s;
}

.leaderboard-name-link:hover {
  color: #e94560;
  text-decoration: underline;
}

/* Badges Tab */
#badges-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0;
}

.badge-list-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #1a1a2e;
  border-radius: 10px;
  padding: 12px 15px;
  border: 2px solid #333;
}

.badge-list-icon {
  padding: 6px 14px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-list-info {
  flex: 1;
}

.badge-list-name {
  font-weight: bold;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 3px;
}

.badge-list-description {
  font-size: 0.85rem;
  color: #888;
  line-height: 1.3;
}

/* Player Profile Modal */
.player-profile-content {
  max-width: 550px;
}

.player-profile-content h2 {
  margin-bottom: 15px;
}

.profile-badge {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #333;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.profile-section {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #333;
}

.profile-section h3 {
  color: #e94560;
  font-size: 1rem;
  margin-bottom: 12px;
}

#profile-training-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-mission-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1a1a2e;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.profile-mission-item.completed {
  background: linear-gradient(135deg, #1a1a2e 0%, #1a2e1a 100%);
  border: 1px solid #4ade80;
}

.profile-mission-item.locked {
  opacity: 0.5;
  border: 1px solid #444;
}

.profile-mission-item .mission-icon {
  font-size: 0.9rem;
}

.profile-mission-item.completed .mission-icon {
  color: #4ade80;
}

.profile-mission-item.locked .mission-icon {
  color: #666;
}

#profile-achievements-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-achievement-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1a1a2e;
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 3px solid #4ade80;
}

.profile-achievement-item .achievement-icon {
  font-size: 1.2rem;
}

.profile-achievement-item .achievement-info {
  flex: 1;
}

.profile-achievement-item .achievement-name {
  font-weight: bold;
  font-size: 0.9rem;
  color: #fff;
  display: block;
}

.profile-achievement-item .achievement-desc {
  font-size: 0.8rem;
  color: #888;
}

.no-achievements {
  color: #666;
  font-style: italic;
  font-size: 0.9rem;
  text-align: center;
  padding: 15px;
}

/* Settings Modal */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #333;
}

.modal-header h2 {
  margin: 0;
  text-align: left;
}

.modal-close {
  background: none;
  border: none;
  color: #888;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: #e94560;
}

.modal-body {
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid #333;
}

.settings-section {
  margin-bottom: 25px;
}

.settings-section h3 {
  color: #e94560;
  font-size: 14px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.setting-row {
  margin-bottom: 12px;
}

.setting-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
}

.setting-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.setting-hint {
  display: block;
  color: #666;
  font-size: 12px;
  margin-left: 28px;
  margin-top: 2px;
}

.hotkey-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hotkey-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.hotkey-label {
  width: 100px;
  font-size: 14px;
}

.hotkey-input {
  width: 50px;
  padding: 8px;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  background: #1a1a2e;
  border: 2px solid #333;
  border-radius: 6px;
  color: #fff;
}

.hotkey-input:focus {
  border-color: #e94560;
  outline: none;
}

.btn-primary {
  background: #e94560;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.btn-primary:hover {
  background: #d63850;
}

.btn-secondary {
  background: #333;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #444;
}
