/* ==========================================================================
   CROWNLUP ESPORTS - PUBG Mobile Operator Console Stylesheet
   Powered by ui.css foundation & Calm Dark Theme
   ========================================================================== */

@import url('/ui.css');

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

.admin-app {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ========================================================
   TOP NAVIGATION BAR
   ======================================================== */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--navy-900);
  border-bottom: 1px solid var(--navy-700);
  padding: 10px 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pmcc-pill {
  background: rgba(196, 159, 72, 0.15);
  border: 1px solid var(--gold-400);
  color: var(--gold-300);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.1em;
}

.nav-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--navy-50);
  text-transform: uppercase;
  margin: 0;
}

.status-indicator {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  padding: 3px 10px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 24px;
}

.quick-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qs-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.qs-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--gold-300);
  line-height: 1.1;
  letter-spacing: 0.03em;
}

.qs-val small {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.qs-val.highlight {
  color: var(--gold-200);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Common Buttons */
.btn {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--navy-100);
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  background: var(--surface-3);
  border-color: var(--line-strong);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-advance {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-950);
  border: 1px solid var(--gold-300);
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(196, 159, 72, 0.3);
}
.btn-advance:hover {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
  box-shadow: 0 4px 16px rgba(196, 159, 72, 0.45);
  transform: translateY(-1px);
}

.btn-obs {
  background: rgba(79, 105, 199, 0.2);
  color: #8bb4f8;
  border: 1px solid rgba(79, 105, 199, 0.4);
}
.btn-obs:hover {
  background: rgba(79, 105, 199, 0.35);
  color: #ffffff;
}

.btn-sim-start {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.btn-sim-start:hover {
  background: rgba(16, 185, 129, 0.3);
  color: #ffffff;
}

.btn-sim-stop {
  background: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(217, 119, 6, 0.4);
}

.btn-danger {
  background: rgba(163, 51, 38, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(163, 51, 38, 0.5);
}
.btn-danger:hover {
  background: rgba(163, 51, 38, 0.35);
  color: #ffffff;
}

/* ========================================================
   BROADCAST SCENE SWITCHER
   ======================================================== */
.scene-switcher-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 8px 24px;
  gap: 16px;
  flex-shrink: 0;
}

.scene-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.onair-dot {
  color: #ef4444;
  animation: pulse-live 1.2s infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.scene-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.scene-btn {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--navy-200);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.scene-btn:hover {
  background: var(--surface-3);
  border-color: var(--line-strong);
  color: #ffffff;
}

.scene-btn.active {
  background: rgba(196, 159, 72, 0.18);
  border-color: var(--gold-400);
  color: var(--gold-200);
  box-shadow: 0 0 12px rgba(196, 159, 72, 0.25);
  font-weight: 700;
}

/* ========================================================
   TOOLBAR (SEARCH & TABS)
   ======================================================== */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: var(--navy-950);
  border-bottom: 1px solid var(--line);
  gap: 16px;
  flex-shrink: 0;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 480px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  padding: 8px 36px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--navy-50);
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--gold-400);
}

.clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  display: none;
}

.filter-tabs {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
}

.filter-tab {
  background: none;
  border: none;
  padding: 6px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-tab.active {
  background: var(--navy-950);
  color: var(--gold-300);
  border: 1px solid var(--line-strong);
  font-weight: 700;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

/* ========================================================
   TEAMS CONTAINER & 2-COLUMN GRID
   ======================================================== */
.teams-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  background: var(--bg);
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Team Card */
.team-row-card {
  display: grid;
  grid-template-columns: 210px 1fr 140px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  gap: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.team-row-card:hover {
  border-color: var(--navy-400);
  background: var(--surface-2);
}

/* Rank 1 Highlight */
.team-row-card.rank-1 {
  border-color: var(--gold-400);
  background: linear-gradient(90deg, rgba(196, 159, 72, 0.08) 0%, var(--surface) 100%);
  box-shadow: 0 0 16px rgba(196, 159, 72, 0.15);
}

/* Eliminated Card */
.team-row-card.eliminated {
  opacity: 0.45;
  background: rgba(10, 15, 36, 0.6);
  border-color: rgba(163, 51, 38, 0.3);
}
.team-row-card.eliminated .card-name {
  text-decoration: line-through;
  color: var(--muted);
}

/* Team Info (Left) */
.card-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.card-rank {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--navy-200);
  min-width: 26px;
  text-align: center;
}
.team-row-card.rank-1 .card-rank {
  color: var(--gold-400);
}

.card-slot {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-300);
  background: rgba(196, 159, 72, 0.12);
  border: 1px solid var(--line-strong);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.card-name-group {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy-50);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-score-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-400);
  font-family: var(--font-mono);
}

/* Player Buttons (Middle) */
.card-players {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.p-pill {
  flex: 1;
  max-width: 72px;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: transform 0.1s, background-color 0.15s;
}

.p-pill:active {
  transform: scale(0.92);
}

/* Status 1: ALIVE */
.p-pill.p-alive {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

/* Status 2: KNOCKED */
.p-pill.p-knock {
  background: rgba(196, 159, 72, 0.22);
  border-color: var(--gold-400);
  color: var(--gold-200);
  animation: pulse-border 0.6s infinite alternate;
}

@keyframes pulse-border {
  0% { transform: scale(0.96); }
  100% { transform: scale(1.02); }
}

/* Status 0: DEAD */
.p-pill.p-dead {
  background: rgba(163, 51, 38, 0.18);
  border-color: rgba(163, 51, 38, 0.5);
  color: #fca5a5;
}

/* Actions (Right) */
.card-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* Kill Stepper */
.kill-stepper {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.kill-btn {
  background: none;
  border: none;
  color: var(--muted);
  width: 26px;
  height: 28px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.kill-btn:hover {
  background: var(--surface-3);
  color: #ffffff;
}

.kill-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--gold-300);
  padding: 0 6px;
  min-width: 22px;
  text-align: center;
}

/* Wipe Out Button */
.wipe-btn {
  background: rgba(163, 51, 38, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(163, 51, 38, 0.5);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.wipe-btn:hover {
  background: rgba(163, 51, 38, 0.4);
  color: #ffffff;
}

.revive-btn {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.5);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.revive-btn:hover {
  background: rgba(16, 185, 129, 0.4);
  color: #ffffff;
}

/* ========================================================
   FOOTER HELPER
   ======================================================== */
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: var(--navy-950);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

.app-footer code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--gold-300);
  font-family: var(--font-mono);
  border: 1px solid var(--line);
}

.match-stepper-badges {
  display: flex;
  gap: 4px;
  margin: 3px 0;
}

.m-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.m-badge.active {
  background: var(--gold-400);
  color: var(--navy-950);
  border-color: var(--gold-300);
}

.m-badge.finished {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.5);
}

.qs-sub {
  font-size: 10px;
  color: var(--gold-400);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.quick-paste-box textarea {
  width: 100%;
  background: var(--navy-950);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--navy-50);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 12px;
  outline: none;
  resize: vertical;
}
.quick-paste-box textarea:focus {
  border-color: var(--gold-400);
}

.roster-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
}

.slot-edit-item {
  display: flex;
  align-items: center;
  background: var(--navy-950);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  gap: 6px;
}

.slot-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--gold-400);
}

.slot-input-name {
  flex: 1;
  background: none;
  border: none;
  color: var(--navy-50);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  outline: none;
}

.obs-url-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
}

.url-item {
  background: var(--navy-950);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.url-item.highlight {
  border-color: var(--gold-400);
  background: rgba(196, 159, 72, 0.08);
}

.url-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-50);
}

.url-field {
  display: flex;
  gap: 6px;
}

.url-field input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--gold-300);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 10px;
}

.url-field button {
  background: var(--surface-3);
  color: var(--gold-300);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.url-field button:hover {
  background: var(--navy-600);
  color: #ffffff;
}

/* ========================================================
   MODAL
   ======================================================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal.active { display: flex; }

.modal-card {
  background: var(--navy-900);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 440px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

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

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--navy-50);
  margin: 0;
}

.close-modal {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  transition: color 0.15s;
}
.close-modal:hover { color: #ffffff; }

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

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

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--font-mono);
}

.form-group input, .form-group select {
  padding: 8px 12px;
  background: var(--navy-950);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--navy-50);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--gold-400);
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

.modal-footer .btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-950);
  font-weight: 800;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.modal-footer .btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
}

/* ========================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   Desktop layout (> 900px) remains completely untouched!
   ======================================================== */
@media (max-width: 1200px) {
  .teams-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  /* 1. Global Viewport & Mobile Scrolling */
  body {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-app {
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .teams-container {
    height: auto;
    overflow-y: visible;
    flex: none;
    padding: 10px 12px 30px 12px;
  }

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

  /* 2. Top Nav Bar */
  .top-nav {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    gap: 12px;
  }

  .nav-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    flex-wrap: wrap;
  }

  .nav-title {
    font-size: 15px;
    letter-spacing: 0.04em;
  }

  .pmcc-pill {
    font-size: 10px;
    padding: 2px 7px;
  }

  .status-indicator {
    font-size: 10px;
    padding: 2px 8px;
  }

  /* 3. Quick Stats Bar */
  .nav-center {
    display: grid;
    grid-template-columns: 1fr 1fr 1.35fr;
    gap: 6px;
    width: 100%;
    background: var(--surface-2);
    padding: 8px 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
  }

  .quick-stat {
    align-items: center;
    text-align: center;
  }

  .qs-label {
    font-size: 9px;
  }

  .qs-val {
    font-size: 18px;
  }

  .qs-val small {
    font-size: 11px;
  }

  .match-stepper-badges {
    gap: 3px;
  }

  .m-badge {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }

  .qs-sub {
    font-size: 9.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  /* 4. Action Buttons Header */
  .nav-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
  }

  .btn-advance {
    grid-column: 1 / -1;
    justify-content: center;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 800;
  }

  .btn-obs {
    grid-column: 1 / -1;
    justify-content: center;
    padding: 9px 14px;
    font-size: 12px;
  }

  .nav-right .btn-secondary {
    justify-content: center;
    padding: 8px 10px;
    font-size: 11.5px;
    text-align: center;
  }

  /* 5. Scene Switcher Bar */
  .scene-switcher-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 14px;
    gap: 8px;
  }

  .scene-label {
    font-size: 10px;
    justify-content: center;
  }

  .scene-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
  }

  .scene-btn {
    justify-content: center;
    padding: 9px 6px;
    font-size: 11px;
    text-align: center;
  }

  /* 6. Toolbar & Filters */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 14px;
    gap: 10px;
  }

  .search-box {
    max-width: none;
    width: 100%;
  }

  .search-box input {
    font-size: 14px;
    padding: 10px 36px;
  }

  .filter-tabs {
    width: 100%;
    display: flex;
  }

  .filter-tab {
    flex: 1;
    text-align: center;
    font-size: 11px;
    padding: 8px 4px;
  }

  .toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 8px;
  }

  .toolbar-actions .btn {
    justify-content: center;
    padding: 9px 10px;
    font-size: 12px;
  }

  /* 7. Operator Team Cards (Mobile Optimized) */
  .team-row-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
  }

  .card-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    overflow: visible;
  }

  .card-rank {
    font-size: 18px;
    min-width: 24px;
  }

  .card-slot {
    font-size: 10px;
    padding: 2px 6px;
  }

  .card-name-group {
    flex: 1;
    min-width: 0;
  }

  .card-name {
    font-size: 14px;
  }

  .card-score-badge {
    font-size: 10.5px;
  }

  /* 8. Player HP Buttons (Big Touch Targets) */
  .card-players {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    width: 100%;
  }

  .p-pill {
    max-width: none;
    width: 100%;
    padding: 10px 2px;
    font-size: 11.5px;
    font-weight: 800;
    min-height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1.1;
  }

  /* 9. Card Actions (Bottom Row) */
  .card-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border-top: 1px dashed var(--line);
    padding-top: 10px;
    margin-top: 2px;
  }

  .kill-stepper {
    height: 38px;
  }

  .kill-btn {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .kill-val {
    font-size: 16px;
    min-width: 32px;
  }

  .wipe-btn, .revive-btn {
    height: 38px;
    padding: 0 20px;
    font-size: 13px;
    font-weight: 800;
  }

  /* 10. Modals */
  .modal {
    padding: 10px;
    align-items: flex-end;
  }

  .modal-card {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 85vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .modal-body {
    max-height: 65vh;
    overflow-y: auto;
    padding: 14px;
  }

  .roster-slots-grid {
    grid-template-columns: 1fr;
  }

  .team-count-picker {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px;
  }

  /* 11. Footer */
  .app-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 16px 36px 16px;
    gap: 8px;
  }
}

@media (max-width: 440px) {
  .nav-title {
    font-size: 13px;
  }

  .p-pill {
    font-size: 10px;
    min-height: 40px;
  }

  .scene-buttons {
    grid-template-columns: 1fr;
  }
}
