@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;600;700;800;900&display=swap");

/* ==========================================
   GACHA / KAWAII UI VARIABLES
   ========================================== */
:root {
  --bg-main: #e2eff5;
  --bg-panel: #ffffff;
  --bg-input: #f0f4f8;
  --color-text: #1e2b4d;
  --color-subtext: #5a7a9e;
  --theme-primary: #63a4ff;
  --theme-primary-hover: #4e8ce0;
  --theme-danger: #ff8a9f;
  --theme-danger-shadow: #e06c81;
  --theme-success: #6cc4a1;
  --theme-warning: #f7ca5e;
  --theme-info: #b39ddb;
  --safe-top: env(safe-area-inset-top);
}

body.dark-theme {
  --bg-main: #0f172a;
  --bg-panel: #1e293b;
  --bg-input: #334155;
  --color-text: #f8fafc;
  --color-subtext: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  touch-action: manipulation;
}

body {
  font-family: "Noto Sans", "Segoe UI", sans-serif;
  background-color: var(--bg-main);
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background-color 0.5s ease-in-out;
}

/* ==========================================
   LAYOUT ENGINE
   ========================================== */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 800px;
  padding: 20px;
  padding-bottom: 120px; /* clear chat bar */
  flex: 1;
  gap: 16px;
}
.active-screen {
  display: flex;
}

#auth-screen {
  justify-content: center;
  position: relative;
  padding-bottom: 20px;
}

/* ==========================================
   NOTEBOOK PANEL
   ========================================== */
.notebook-panel {
  background-color: var(--bg-panel);
  background-image:
    linear-gradient(var(--bg-input) 2px, transparent 2px),
    linear-gradient(90deg, var(--bg-input) 2px, transparent 2px);
  background-size: 25px 25px;
  border: 4px solid var(--color-text);
  border-radius: 20px;
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.15);
  padding: 20px;
  width: 100%;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
.title-badge {
  background: var(--bg-panel);
  border: 4px solid var(--color-text);
  border-radius: 30px;
  padding: 10px 30px;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15);
  display: inline-block;
  text-align: center;
  z-index: 10;
}

h1 {
  font-size: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--theme-primary);
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

h2 {
  font-size: 1.3rem;
  color: var(--color-text);
  margin-bottom: 10px;
}

h3 {
  font-size: 1rem;
  color: var(--color-subtext);
  font-weight: 700;
}

.subtitle {
  font-size: 0.9rem;
  color: var(--color-subtext);
  font-weight: 600;
}

.mega-title {
  font-size: 3.5rem;
  letter-spacing: 4px;
}

.error-msg {
  font-size: 0.9rem;
  font-weight: 700;
  min-height: 1.2em;
  text-align: center;
}

/* ==========================================
   AUTH — MULTI-STEP REGISTER STYLES
   ========================================== */
.auth-step-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-subtext);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-subtext);
}
.auth-switch a {
  color: var(--theme-primary);
  text-decoration: none;
  font-weight: 800;
}
.auth-switch a:hover {
  text-decoration: underline;
}

/* Password input with reveal button inside */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap input {
  width: 100%;
  padding-right: 44px !important; /* room for the eye button */
}
.pw-reveal-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  box-shadow: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  color: var(--color-subtext);
  line-height: 1;
  transition:
    color 0.15s,
    transform 0.15s;
  /* override .btn styles — this is not a .btn */
  text-transform: none;
  font-weight: normal;
  border-radius: 0;
}
.pw-reveal-btn:hover {
  color: var(--theme-primary);
  transform: none;
  box-shadow: none;
}
.pw-reveal-btn.active {
  color: var(--theme-primary);
}

/* ==========================================
   BUTTONS
   ========================================== */
button.btn {
  background-color: var(--theme-primary);
  color: white;
  border: 4px solid var(--color-text);
  padding: 12px 25px;
  font-size: 1.1rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 4px 4px 0px var(--color-text);
  transition:
    transform 0.1s,
    box-shadow 0.1s;
  white-space: nowrap;
}
button.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--color-text);
}
button.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px transparent;
}
button.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-alt {
  background-color: var(--bg-panel);
  color: var(--color-text);
}

.btn-danger {
  background-color: var(--theme-danger) !important;
  color: white !important;
}

.btn-searching {
  animation: pulse-btn 1.2s ease-in-out infinite;
}

@keyframes pulse-btn {
  0%,
  100% {
    box-shadow: 4px 4px 0px var(--color-text);
  }
  50% {
    box-shadow: 4px 4px 16px var(--theme-danger);
  }
}

.btn-group {
  display: flex;
  gap: 10px;
  width: 100%;
}

.btn-group-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  align-items: stretch;
}

.guest-btn {
  width: 100%;
}

/* ==========================================
   FORM / AUTH
   ========================================== */
.auth-form {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.input-wrap input {
  height: 50px;
  width: 100%;
  padding: 0 15px;
  font-size: 1.1rem;
  border-radius: 12px;
  border: 3px solid var(--color-subtext);
  background: var(--bg-panel);
  color: var(--color-text);
  font-weight: bold;
  outline: none;
  transition: border-color 0.2s;
}
.input-wrap input:focus {
  border-color: var(--theme-primary);
}

.divider {
  display: flex;
  align-items: center;
  margin: 5px 0;
  color: var(--color-subtext);
  font-weight: 800;
  font-size: 0.8rem;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 2px solid var(--bg-input);
  margin: 0 10px;
}

/* ==========================================
   THEME TOGGLE
   ========================================== */
#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  border: 3px solid var(--color-text);
  border-radius: 30px;
  padding: 8px 12px;
  background: var(--bg-panel);
  z-index: 2000;
  box-shadow: 3px 3px 0px var(--color-text);
  cursor: pointer;
  font-size: 1rem;
}

/* ==========================================
   FLEE BUTTON
   ========================================== */
#flee-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 2000;
  background: var(--theme-danger);
  color: white;
  border: 3px solid var(--color-text);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 3px 3px 0px var(--color-text);
  text-transform: uppercase;
  transition:
    transform 0.1s,
    box-shadow 0.1s;
}
#flee-btn:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

/* ==========================================
   PROFILE BANNER
   ========================================== */
#profile-banner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-weight: 800;
  font-size: 1rem;
  padding: 15px 20px;
}

.stat-elo {
  color: var(--theme-info);
  font-weight: 900;
}
.stat-win {
  color: var(--theme-success);
  font-weight: 900;
}
.stat-loss {
  color: var(--theme-danger);
  font-weight: 900;
}
.stat-tie {
  color: var(--theme-warning);
  font-weight: 900;
}

/* ==========================================
   MATCHMAKING
   ========================================== */
#matchmaking-status {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-subtext);
  min-height: 1.4em;
  text-align: center;
}

#radar-container {
  width: 80px;
  height: 80px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
}

#radar-container.active {
  visibility: visible;
}

.radar-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid var(--theme-primary);
  border-radius: 50%;
  opacity: 0;
}

#radar-container.active .radar-ring {
  animation: radar-pulse 2s ease-out infinite;
}
#radar-container.active .radar-ring.delay-1 {
  animation-delay: 0.6s;
}
#radar-container.active .radar-ring.delay-2 {
  animation-delay: 1.2s;
}

@keyframes radar-pulse {
  0% {
    transform: scale(0.3);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* ==========================================
   LEADERBOARD
   ========================================== */
#leaderboard-container {
  margin-top: 5px;
}

#leaderboard-container h2 {
  text-align: center;
  margin-bottom: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th {
  text-align: left;
  padding: 6px 10px;
  color: var(--color-subtext);
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  border-bottom: 2px solid var(--bg-input);
}

td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--bg-input);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: none;
}

tr.rank-1 td {
  color: #f59e0b;
}
tr.rank-2 td {
  color: #94a3b8;
}
tr.rank-3 td {
  color: #cd7c41;
}

/* ==========================================
   GAME SCREEN — SCOREBOARD
   ========================================== */
#scoreboard {
  display: flex;
  gap: 15px;
  width: 100%;
  justify-content: space-between;
}

.player-stat {
  flex: 1;
  background: var(--bg-panel);
  border: 3px solid var(--color-text);
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: 3px 3px 0 var(--color-text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.hp-label {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-subtext);
}

.bot-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--theme-warning);
  background: rgba(247, 202, 94, 0.12);
  border: 1.5px solid var(--theme-warning);
  border-radius: 8px;
  padding: 3px 8px;
  margin-top: 4px;
  text-align: center;
}

/* ==========================================
   HEALTH BARS
   ========================================== */
.health-bar-bg {
  width: 100%;
  height: 28px;
  background-color: var(--bg-input);
  border: 3px solid var(--color-text);
  border-radius: 20px;
  overflow: hidden;
  padding: 2px;
}

.health-fill {
  height: 100%;
  width: 100%;
  background-color: var(--theme-success);
  border-radius: 15px;
  transition:
    width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    background-color 0.3s ease;
}

.health-bar-bg.danger-pulse {
  animation: danger-pulse 0.7s ease-in-out infinite alternate;
  border-color: var(--theme-danger);
}
.health-bar-bg.danger-pulse .health-fill {
  background-color: var(--theme-danger);
}

@keyframes danger-pulse {
  from {
    box-shadow: 0 0 4px var(--theme-danger);
  }
  to {
    box-shadow: 0 0 14px var(--theme-danger);
  }
}

/* ==========================================
   FLOATING DAMAGE NUMBER
   ========================================== */
.floating-damage {
  position: absolute;
  top: 0;
  right: 10px;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--theme-danger);
  text-shadow: 2px 2px 0 var(--color-text);
  pointer-events: none;
  animation: float-up 1s ease-out forwards;
  z-index: 100;
}

@keyframes float-up {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px) scale(0.8);
  }
}

/* ==========================================
   SCREEN FLASH EFFECTS
   ========================================== */
body.damage-flash-player {
  animation: flash-red 0.4s ease-out;
}
body.damage-flash-comp {
  animation: flash-green 0.4s ease-out;
}
body.damage-flash-draw {
  animation: flash-yellow 0.4s ease-out;
}

@keyframes flash-red {
  0%,
  100% {
    background-color: var(--bg-main);
  }
  30% {
    background-color: rgba(255, 80, 100, 0.35);
  }
}
@keyframes flash-green {
  0%,
  100% {
    background-color: var(--bg-main);
  }
  30% {
    background-color: rgba(108, 196, 161, 0.35);
  }
}
@keyframes flash-yellow {
  0%,
  100% {
    background-color: var(--bg-main);
  }
  30% {
    background-color: rgba(247, 202, 94, 0.35);
  }
}

/* ==========================================
   SUDDEN DEATH
   ========================================== */
body.sudden-death-bg {
  background-color: #2d0a12 !important;
  transition: background-color 0.5s ease;
}
body.dark-theme.sudden-death-bg {
  background-color: #1a0007 !important;
}

/* ==========================================
   TIMER
   ========================================== */
#timer-display {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--theme-primary);
  background: var(--bg-panel);
  padding: 5px 25px;
  border-radius: 50px;
  border: 3px solid var(--color-text);
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.3s;
}

/* ==========================================
   CHOICE + BATTLE ARENA
   ========================================== */
#choice-arena {
  display: flex;
  gap: 15px;
  margin: 10px 0;
}

.card {
  background-color: var(--bg-panel);
  border: 3px solid var(--color-text);
  border-radius: 18px;
  width: 110px;
  aspect-ratio: 3/4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  box-shadow: 4px 4px 0px var(--color-text);
  cursor: pointer;
  font-weight: 800;
  font-size: 1rem;
  transition:
    transform 0.1s,
    box-shadow 0.1s;
  user-select: none;
}
.card:active,
.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--color-text);
}
.card.disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
  transform: none;
}
.card .emoji {
  font-size: 3.5rem;
  line-height: 1;
}

/* Battle arena */
#battle-arena {
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: relative;
  height: 240px;
}
.battle-card-wrapper {
  width: 180px;
  display: flex;
  justify-content: center;
}
.battle-card {
  width: 130px;
}
#vs-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--theme-danger);
  text-shadow: 3px 3px 0 var(--color-text);
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s;
}

#message {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--theme-primary);
  text-align: center;
  min-height: 1.4em;
  transition: color 0.2s;
}

/* ==========================================
   BATTLE CARD ANIMATIONS
   ========================================== */
@keyframes strike-player {
  0% {
    transform: translateX(0) rotate(0deg);
  }
  40% {
    transform: translateX(60px) rotate(8deg);
  }
  60% {
    transform: translateX(55px) rotate(6deg);
  }
  100% {
    transform: translateX(0) rotate(0deg);
  }
}
@keyframes strike-comp {
  0% {
    transform: translateX(0) rotate(0deg);
  }
  40% {
    transform: translateX(-60px) rotate(-8deg);
  }
  60% {
    transform: translateX(-55px) rotate(-6deg);
  }
  100% {
    transform: translateX(0) rotate(0deg);
  }
}

.anim-strike-player {
  animation: strike-player 0.5s ease-in-out forwards;
}
.anim-strike-comp {
  animation: strike-comp 0.5s ease-in-out forwards;
}

/* ==========================================
   VS INTRO SCREEN
   ========================================== */
#vs-intro-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  overflow: hidden;
}

.vs-half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: white;
}

.vs-left {
  left: -50%;
  background: linear-gradient(135deg, #63a4ff, #4e8ce0);
  border-right: 4px solid white;
}
.vs-right {
  right: -50%;
  background: linear-gradient(135deg, #ff8a9f, #e06c81);
  border-left: 4px solid white;
}

.vs-center-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 5rem;
  font-weight: 900;
  color: white;
  text-shadow:
    0 0 30px rgba(0, 0, 0, 0.5),
    4px 4px 0 rgba(0, 0, 0, 0.3);
  z-index: 10;
}

/* VS intro keyframes */
@keyframes slam-left {
  0% {
    left: -50%;
  }
  60% {
    left: 2%;
  }
  80% {
    left: -2%;
  }
  100% {
    left: 0;
  }
}
@keyframes slam-right {
  0% {
    right: -50%;
  }
  60% {
    right: 2%;
  }
  80% {
    right: -2%;
  }
  100% {
    right: 0;
  }
}
@keyframes vs-pop {
  0% {
    transform: translate(-50%, -50%) scale(0) rotate(-15deg);
    opacity: 0;
  }
  60% {
    transform: translate(-50%, -50%) scale(1.3) rotate(5deg);
    opacity: 1;
  }
  80% {
    transform: translate(-50%, -50%) scale(0.95) rotate(-2deg);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
  }
}
@keyframes slam-out {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

.anim-slam-left {
  animation: slam-left 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.anim-slam-right {
  animation: slam-right 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.anim-vs-pop {
  animation: vs-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

/* ==========================================
   CHAT
   ========================================== */
#chat-container {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 800px;
  z-index: 1000;
  border-radius: 20px 20px 0 0;
  border-bottom: none !important;
  transition: height 0.3s ease;
  overflow: hidden;
  padding: 0 !important;
}

#chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 800;
  font-size: 1rem;
  background: var(--bg-panel);
  border-top: 4px solid var(--color-text);
  user-select: none;
}

#chat-toggle-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--color-text);
  box-shadow: none;
  padding: 0;
}

#chat-body {
  display: flex;
  flex-direction: column;
  height: 240px;
  background: var(--bg-panel);
  overflow: hidden;
  transition: height 0.3s ease;
}

#chat-container.minimized #chat-body {
  height: 0;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
}

#chat-input-area {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-top: 2px solid var(--bg-input);
}

#chat-input {
  flex: 1;
  padding: 8px 14px;
  border-radius: 50px;
  border: 2px solid var(--color-subtext);
  background: var(--bg-input);
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 700;
  outline: none;
  font-family: inherit;
}
#chat-input:focus {
  border-color: var(--theme-primary);
}

#chat-send-btn {
  background: var(--theme-primary);
  color: white;
  border: 2px solid var(--color-text);
  border-radius: 50px;
  padding: 8px 16px;
  font-weight: 900;
  font-size: 0.9rem;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 var(--color-text);
  transition: transform 0.1s;
}
#chat-send-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* Chat messages */
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 78%;
  align-self: flex-start;
}
.chat-msg.self {
  align-self: flex-end;
  text-align: right;
}

.chat-sender {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-subtext);
  margin-bottom: 2px;
}

.chat-text {
  background: var(--bg-input);
  border: 2px solid var(--color-text);
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  word-break: break-word;
}
.chat-msg.self .chat-text {
  background: var(--theme-primary);
  color: white;
  border-color: var(--theme-primary-hover);
}

/* Chat badge */
#chat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--theme-danger);
  color: white;
  font-size: 0.7rem;
  font-weight: 900;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  margin-left: 8px;
  border: 2px solid var(--color-text);
}

#chat-title {
  font-weight: 900;
  color: var(--theme-primary);
}

@keyframes badge-pop {
  0% {
    transform: scale(0.5);
  }
  70% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}
.anim-badge-pop {
  animation: badge-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================
   PAGE TRANSITION — ZOOM
   ========================================== */
@keyframes zoom-out-leave {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.06);
    opacity: 0;
  }
}
@keyframes zoom-in-arrive {
  0% {
    transform: scale(0.96);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.page-zoom-out {
  animation: zoom-out-leave 0.25s ease-in forwards;
  pointer-events: none;
}
.page-zoom-in {
  animation: zoom-in-arrive 0.12s ease-out forwards;
}

/* ==========================================
   UTILITY
   ========================================== */
.hidden {
  display: none !important;
}

/* ==========================================
   MOBILE — iPhone 15 Pro & small screens
   ========================================== */
@media (max-width: 600px) {
  #theme-toggle {
    display: none !important;
  }

  h1 {
    font-size: 1.6rem;
  }
  .subtitle {
    font-size: 0.8rem;
  }
  .mega-title {
    font-size: 2.2rem;
  }

  #auth-screen .title-badge {
    position: absolute;
    top: calc(var(--safe-top) + 20px);
  }
  .auth-form {
    transform: translateY(20px);
  }

  #scoreboard {
    flex-direction: column;
    gap: 8px !important;
  }
  .player-stat {
    width: 100% !important;
  }
  #choice-arena {
    gap: 8px !important;
  }
  .card {
    width: 95px !important;
    font-size: 0.9rem !important;
  }
  .card .emoji {
    font-size: 2.2rem !important;
  }
  .battle-card {
    width: 110px !important;
  }
  #vs-text {
    font-size: 2.2rem !important;
  }

  #chat-container {
    max-width: 100%;
  }
  #chat-body {
    height: 200px;
  }

  .vs-half {
    font-size: 1.4rem;
  }
  .vs-center-logo {
    font-size: 3.5rem;
  }

  #flee-btn {
    top: calc(var(--safe-top) + 12px);
    left: 12px;
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}
