/* CASH CAT ADDICT — GAME STYLES */

:root {
  --bg-dark: #0a0c10;
  --neon-green: #00ff66;
  --neon-green-glow: rgba(0, 255, 102, 0.4);
  --bear-red: #ff3366;
  --bear-red-glow: rgba(255, 51, 102, 0.4);
  --cash-gold: #ffd700;
  --panel-bg: rgba(15, 20, 30, 0.85);
  --panel-border: rgba(255, 255, 255, 0.15);
  --font-pixel: 'Press Start 2P', monospace, sans-serif;
  --font-heading: 'Teko', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

html, body {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background-color: #0c0e12;
  background-image: url('assets/background/cash_cat_full_desk_bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: var(--font-pixel);
  color: #ffffff;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 50%, rgba(10, 14, 20, 0.4) 0%, rgba(5, 7, 10, 0.75) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Three-Column Website Layout */
.layout-container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  max-width: 1520px;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  margin: 0 auto;
  padding: 12px 16px;
  box-sizing: border-box;
  overflow: hidden;
}

/* Side Panels (26% width each for sidebars, centerpiece game in middle) */
.side-panel {
  max-width: 330px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 102, 0.3) transparent;
}

.left-panel {
  flex: 0 0 26%;
  justify-content: flex-start;
  height: auto;
  max-height: calc(100vh - 24px);
}

.right-panel {
  flex: 0 0 26%;
  justify-content: flex-start;
  height: auto;
  max-height: calc(100vh - 24px);
}

.side-panel::-webkit-scrollbar {
  width: 4px;
}

.side-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 102, 0.3);
  border-radius: 2px;
}

/* Center Game Column (46% width centerpiece) */
.center-column {
  flex: 0 0 46%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#game-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: calc(100vh - 32px);
  max-height: 960px;
  background-color: #0d111a;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(0, 255, 102, 0.15);
  border: 1px solid rgba(0, 255, 102, 0.3);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.ui-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* HUD Header (Single Compact Horizontal Bar) */
#hud-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 8px 10px;
  z-index: 10;
  pointer-events: none;
}

.hud-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  width: 100%;
  background: rgba(10, 15, 25, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 5px 10px;
  pointer-events: auto;
}

.brand-title {
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.neon-green {
  color: var(--neon-green);
}

.glowing-text {
  text-shadow: 0 0 12px var(--neon-green-glow);
}

.hud-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 8px;
  white-space: nowrap;
}

.stat-label {
  color: #8a99ad;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 10px;
  font-weight: bold;
  color: #ffffff;
}

.coin-stat .stat-value {
  color: var(--cash-gold);
}

.sound-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: transform 0.1s ease, background 0.2s ease;
  line-height: 1;
}

.sound-toggle-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}

/* FOMO Breaking News Banner */
.fomo-banner {
  margin-top: 6px;
  align-self: center;
  background: rgba(220, 20, 60, 0.9);
  border: 1px solid #ff3366;
  border-radius: 6px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 12px rgba(255, 51, 102, 0.5);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateY(0);
}

.fomo-banner.hidden {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.fomo-badge {
  font-size: 8px;
  background: #ffffff;
  color: #cc0033;
  font-weight: bold;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.fomo-text {
  font-size: 8px;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  animation: flashText 0.8s infinite alternate;
}

@keyframes flashText {
  from { opacity: 0.85; }
  to { opacity: 1; text-shadow: 0 0 6px #ffffff; }
}

/* Live Degen Ticker Banner at Bottom Edge */
.degen-ticker {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 8px;
  border: 1px solid rgba(0, 255, 102, 0.2);
  color: #e0e0e0;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  white-space: nowrap;
}

.ticker-dot {
  color: var(--neon-green);
  animation: pulse 1.2s infinite;
}

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

/* Modals (Start, Game Over, Loading) */
.modal-screen {
  background: rgba(10, 14, 23, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20;
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: auto;
}

.modal-screen.hidden {
  opacity: 0;
  pointer-events: none;
  display: none;
}

.modal-content {
  width: 85%;
  max-width: 380px;
  background: var(--panel-bg);
  border: 2px solid var(--panel-border);
  border-radius: 12px;
  padding: 24px 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.text-center {
  text-align: center;
}

.game-logo {
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: 1px;
}

.slogan-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed var(--neon-green);
  color: var(--neon-green);
  padding: 6px 16px;
  font-size: 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cat-preview-box {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,255,102,0.2) 0%, rgba(0,0,0,0) 70%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.floating-icon {
  width: 80px;
  height: 55px;
  background-image: url('assets/cash-cat/cash_cat_fly_1.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: floatCat 2s ease-in-out infinite;
}

@keyframes floatCat {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-4deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.controls-card {
  background: rgba(0, 0, 0, 0.4);
  padding: 12px;
  border-radius: 8px;
  width: 100%;
}

.pulse-text {
  font-size: 10px;
  color: #ffeb3b;
  margin-bottom: 8px;
  animation: textGlow 1.5s infinite alternate;
}

@keyframes textGlow {
  from { opacity: 0.8; }
  to { opacity: 1; text-shadow: 0 0 8px rgba(255, 235, 59, 0.6); }
}

.keys-legend {
  font-size: 8px;
  color: #90a4ae;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Buttons */
.arcade-btn {
  font-family: var(--font-pixel);
  font-size: 12px;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  text-transform: uppercase;
  transition: transform 0.1s ease, filter 0.2s ease;
  box-shadow: 0 6px 0 rgba(0,0,0,0.4);
}

.start-btn {
  background: var(--neon-green);
  color: #000;
  font-weight: bold;
}

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

.start-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0,0,0,0.4);
}

.retry-btn {
  background: linear-gradient(135deg, var(--neon-green), #00cc55);
  color: #000;
  font-weight: bold;
}

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

/* Liquidated Screen */
.liquidated-title {
  font-size: 24px;
  color: var(--bear-red);
  text-shadow: 0 0 16px var(--bear-red-glow);
  letter-spacing: 2px;
}

.subtitle {
  font-size: 9px;
  color: #b0bec5;
  margin-top: 4px;
}

.score-card {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.score-card-row {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #cfd8dc;
}

.score-val {
  font-size: 11px;
  color: #ffffff;
}

.score-val.highlight {
  color: var(--neon-green);
}

.score-val.gold {
  color: var(--cash-gold);
}

.new-best-badge {
  background: rgba(0, 255, 102, 0.15);
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
  border-radius: 4px;
  padding: 4px;
  font-size: 8px;
  margin-top: 4px;
  animation: pulse 1s infinite;
}

/* Preloader Bar */
.progress-bar-container {
  width: 100%;
  height: 12px;
  background: #111;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  margin-top: 10px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--neon-green);
  transition: width 0.2s ease;
}

/* Panel Cards & Styling */
.panel-card {
  background: rgba(12, 16, 24, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 255, 102, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.weekly-card {
  padding: 8px 10px !important;
  gap: 4px !important;
}

.brand-card {
  text-align: center;
  border-left: 3px solid var(--neon-green);
}

.sidebar-brand-title {
  font-size: 11px;
  letter-spacing: 1px;
}

.sidebar-slogan {
  font-size: 7px;
  color: #8a99ad;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* Level Up Toast Notification Overlay */
.level-up-toast {
  position: fixed;
  top: 16px;
  right: 20px;
  background: rgba(10, 15, 25, 0.95);
  border: 1px solid var(--cash-gold);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
  border-radius: 8px;
  padding: 10px 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: slideInToast 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.level-up-toast.hidden {
  display: none;
}

.toast-badge {
  font-size: 10px;
  color: var(--cash-gold);
  font-weight: bold;
  letter-spacing: 1px;
}

.toast-desc {
  font-size: 9px;
  color: #ffffff;
}

@keyframes slideInToast {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Compact Profile Header with Connect Action */
.profile-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.profile-actions-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.connect-btn-compact {
  padding: 5px 8px;
  background: rgba(0, 255, 102, 0.12);
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
  border-radius: 6px;
  font-family: var(--font-pixel);
  font-size: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.connect-btn-compact:hover {
  background: rgba(0, 255, 102, 0.25);
}

.logout-btn-compact {
  padding: 4px 8px;
  background: rgba(255, 51, 102, 0.12);
  border: 1px solid #ff3366;
  color: #ff3366;
  border-radius: 6px;
  font-family: var(--font-pixel);
  font-size: 7px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 8px rgba(255, 51, 102, 0.2);
  transition: background 0.2s ease, transform 0.1s ease;
}

.logout-btn-compact:hover {
  background: rgba(255, 51, 102, 0.28);
  box-shadow: 0 0 12px rgba(255, 51, 102, 0.4);
  transform: translateY(-1px);
}

/* Progression Card Details */
.prog-level-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8px;
}

.prog-level-num {
  color: #ffffff;
  font-weight: bold;
}

.addiction-next {
  color: #8a99ad;
}

/* Stat List Row for Cards */
.stat-list-row {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
}

/* Degen Quote Card */
.quote-card {
  position: relative;
  border-left: 3px solid var(--cash-gold);
  background: rgba(18, 22, 32, 0.85);
  padding: 12px;
}

.quote-mark {
  font-size: 16px;
  color: rgba(255, 215, 0, 0.3);
  line-height: 0.8;
}

.quote-text {
  font-size: 8px;
  line-height: 1.4;
  color: #ffffff;
  font-style: italic;
}

.yellow-highlight {
  background: rgba(255, 215, 0, 0.15);
  padding: 2px 4px;
  border-radius: 3px;
  color: var(--cash-gold);
}

.quote-sub {
  font-size: 6px;
  color: #8a99ad;
  margin-top: 4px;
  text-align: right;
}

/* Compact Terminal Social Buttons */
.socials-card {
  padding: 10px;
}

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

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 255, 102, 0.25);
  border-radius: 6px;
  color: #cfd8dc;
  text-decoration: none;
  font-size: 7px;
  transition: all 0.2s ease;
}

.social-btn:hover {
  background: rgba(0, 255, 102, 0.15);
  border-color: var(--neon-green);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.25);
}

.social-icon {
  font-size: 9px;
}
.profile-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-box {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 102, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.profile-avatar {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.username {
  font-size: 10px;
  font-weight: bold;
  color: #ffffff;
}

.user-status-tag {
  font-size: 7px;
  color: var(--neon-green);
  background: rgba(0, 255, 102, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px;
  border-radius: 6px;
  text-align: center;
}

.p-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.p-label {
  font-size: 7px;
  color: #8a99ad;
}

.p-val {
  font-size: 9px;
  font-weight: bold;
}

.gold-text { color: var(--cash-gold); }
.green-text { color: var(--neon-green); }
.red-text { color: var(--bear-red); }

/* Addiction Level Section */
.card-title {
  font-size: 9px;
  color: #8a99ad;
  letter-spacing: 0.5px;
}

.addiction-bar-wrapper {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 102, 0.2);
}

.addiction-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ff66, #ffd700, #ff3366);
  border-radius: 5px;
  transition: width 0.3s ease;
}

.addiction-footer {
  display: flex;
  justify-content: space-between;
  font-size: 7px;
  color: #d0d7de;
}

.addiction-level-tag {
  color: var(--cash-gold);
}

/* Market Status Section */
.market-status-row {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
}

.m-label {
  color: #8a99ad;
}

.m-val {
  font-weight: bold;
}

.market-card.fomo-active-state {
  border-color: var(--bear-red);
  box-shadow: 0 0 15px rgba(255, 51, 102, 0.4);
  animation: fomoPulse 1s infinite alternate;
}

@keyframes fomoPulse {
  from { background: rgba(35, 10, 15, 0.9); }
  to { background: rgba(55, 15, 25, 0.95); }
}

/* Connect Button */
.panel-action {
  width: 100%;
}

.connect-btn {
  width: 100%;
  padding: 10px;
  background: rgba(0, 255, 102, 0.12);
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
  border-radius: 8px;
  font-family: var(--font-pixel);
  font-size: 9px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.connect-btn:hover {
  background: rgba(0, 255, 102, 0.25);
  transform: translateY(-1px);
}

/* Leaderboard Panel */
.leaderboard-full-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.leaderboard-full-card .leaderboard-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  margin: 6px 0;
}

.leaderboard-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lb-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  font-size: 8px;
  border-left: 2px solid transparent;
}

.lb-item.top-1 {
  border-left-color: #ffd700;
  background: rgba(255, 215, 0, 0.1);
}

.lb-item.top-2 {
  border-left-color: #c0c0c0;
  background: rgba(192, 192, 192, 0.08);
}

.lb-item.top-3 {
  border-left-color: #cd7f32;
  background: rgba(205, 127, 50, 0.08);
}

.lb-item-empty {
  opacity: 0.65;
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.lb-rank {
  width: 40px;
}

.lb-name {
  flex: 1;
  color: #e0e0e0;
}

.lb-score {
  font-weight: bold;
  color: var(--neon-green);
}

.lb-empty-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 30px 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(0, 255, 102, 0.2);
  border-radius: 8px;
  text-align: center;
  margin: auto 0;
}

.lb-empty-title {
  font-size: 9px;
  color: var(--cash-gold);
  font-weight: bold;
  letter-spacing: 1px;
}

.lb-empty-sub {
  font-size: 7px;
  color: #8a99ad;
}

.modal-wallet-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 102, 0.25);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-rank-footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ur-row {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
}

.ur-label {
  color: #8a99ad;
}

/* Login Modal */
.login-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.login-modal-overlay.hidden {
  display: none;
}

.login-modal-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: rgba(15, 20, 30, 0.95);
  border: 1px solid var(--neon-green);
  box-shadow: 0 0 30px rgba(0, 255, 102, 0.25);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.close-modal-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: #8a99ad;
  font-size: 20px;
  cursor: pointer;
}

.close-modal-btn:hover {
  color: #ffffff;
}

.modal-subhead {
  font-size: 9px;
  color: #8a99ad;
  margin-top: -4px;
}

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

.form-group label {
  font-size: 8px;
  color: #8a99ad;
}

.form-group input {
  padding: 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #ffffff;
  font-family: var(--font-pixel);
  font-size: 9px;
}

.form-group input:focus {
  outline: none;
  border-color: var(--neon-green);
}

.modal-submit-btn {
  width: 100%;
  margin-top: 8px;
}

.signup-prompt {
  font-size: 8px;
  color: #8a99ad;
}

.neon-link {
  color: var(--neon-green);
  text-decoration: none;
}

.neon-link:hover {
  text-decoration: underline;
}

/* Responsive Breakpoints — Preserve Single-Page Terminal View */
@media (max-width: 1100px) {
  .side-panel {
    flex: 0 0 24%;
    min-width: 190px;
  }
  .center-column {
    flex: 1;
  }
}

@media (max-width: 850px) {
  .layout-container {
    gap: 8px;
    padding: 8px;
  }
  .side-panel {
    min-width: 160px;
  }
}

/* ==========================================================================
   MOBILE RESPONSIVE LAYOUT ENGINE (Screen Width <= 768px)
   Targeted for mobile viewports (e.g. 390x844, 375x812, 414x896)
   ========================================================================== */
@media (max-width: 768px) {
  html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* 1. Stack 3-Column Layout into Vertical Mobile Stream */
  .layout-container {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    max-height: none;
    padding: 10px 8px 30px 8px;
    gap: 16px;
    overflow-x: hidden;
    overflow-y: visible;
    align-items: center;
  }

  /* 2. Order Priority: GAME FIRST -> PROFILE / DASHBOARD SECOND -> LEADERBOARD THIRD */
  .center-column {
    order: 1;
    flex: none;
    width: 100%;
    max-width: 480px;
    height: auto;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .left-panel {
    order: 2;
    flex: none;
    width: 100%;
    max-width: 480px;
    height: auto;
    max-height: none;
    overflow-y: visible;
    margin: 0 auto;
  }

  .right-panel {
    order: 3;
    flex: none;
    width: 100%;
    max-width: 480px;
    height: auto;
    max-height: none;
    overflow-y: visible;
    margin: 0 auto;
  }

  /* 3. Game Container Responsive Sizing */
  #game-container {
    width: 100%;
    max-width: 100%;
    height: min(74vh, 600px);
    min-height: 480px;
    aspect-ratio: 450 / 720;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 255, 102, 0.2);
    border: 1px solid rgba(0, 255, 102, 0.35);
    overflow: hidden;
    position: relative;
  }

  canvas#gameCanvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  /* 4. Touchscreen HUD & Overlay Adjustments */
  #hud-overlay {
    padding: 6px 8px;
  }

  .hud-bar {
    padding: 4px 8px;
    gap: 4px;
  }

  .brand-title {
    font-size: 8px;
  }

  .hud-stat {
    font-size: 7px;
  }

  .stat-value {
    font-size: 9px;
  }

  /* Modals on Mobile */
  .modal-content {
    padding: 16px 14px;
    max-width: 92%;
  }

  .game-logo {
    font-size: 1.3rem;
  }

  .cat-preview-box {
    width: 65px;
    height: 65px;
  }

  #heroCatIcon {
    width: 45px;
    height: 45px;
  }

  .controls-card {
    padding: 8px 10px;
    margin-bottom: 12px;
  }

  .pulse-text {
    font-size: 0.65rem;
  }

  .keys-legend span {
    font-size: 0.55rem;
    padding: 3px 6px;
  }

  .arcade-btn {
    padding: 12px 20px;
    font-size: 0.75rem;
  }
}

/* =========================================================================
   GAME PAGE SITE-WIDE MAINTENANCE OVERLAY (Full Viewport Cover)
   ========================================================================= */
#gameMaintenanceOverlay {
    display: none !important;
}

html.site-maintenance-active,
html.site-maintenance-active body,
body.site-maintenance-active {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #06080e !important;
    background-image: none !important;
}

html.site-maintenance-active body::before,
body.site-maintenance-active::before {
    display: none !important;
    content: none !important;
}

html.site-maintenance-active #gameMaintenanceOverlay,
body.site-maintenance-active #gameMaintenanceOverlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 24px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    z-index: 2147483647 !important;
    background: #06080e !important;
    background: radial-gradient(circle at 50% 35%, #141b2a 0%, #05070d 85%) !important;
}

html.site-maintenance-active #gameMaintenanceOverlay .maintenance-message-card,
body.site-maintenance-active #gameMaintenanceOverlay .maintenance-message-card {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    max-width: 600px !important;
    width: min(600px, 90vw) !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    text-align: center !important;
    background: rgba(14, 18, 28, 0.95) !important;
    border: 2px solid var(--neon-red, #ff3366);
    box-shadow: 0 0 35px rgba(255, 51, 102, 0.25), inset 0 0 15px rgba(255, 51, 102, 0.1);
    border-radius: 12px !important;
    padding: 40px 32px !important;
}

html.site-maintenance-active #gameMaintenanceOverlay .maintenance-status,
body.site-maintenance-active #gameMaintenanceOverlay .maintenance-status {
    font-family: var(--font-retro, 'Press Start 2P', monospace);
    font-size: 0.7rem;
    color: var(--neon-red, #ff3366);
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.4);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

html.site-maintenance-active #gameMaintenanceOverlay h1,
body.site-maintenance-active #gameMaintenanceOverlay h1 {
    font-family: var(--font-retro, 'Press Start 2P', monospace);
    font-size: 1.2rem;
    color: var(--neon-red, #ff3366);
    margin: 8px 0;
    line-height: 1.4;
}

html.site-maintenance-active #gameMaintenanceOverlay p,
body.site-maintenance-active #gameMaintenanceOverlay p {
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0;
}

html.site-maintenance-active body > *:not(#gameMaintenanceOverlay):not(script),
body.site-maintenance-active > *:not(#gameMaintenanceOverlay):not(script) {
    display: none !important;
}
