@font-face {
  font-family: "NYT";
  src: url(../fonts/NYTKarnakCondensed.ttf);
}

* {
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
    "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
  background-color: black;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

html.switch,
body.switch {
  background-color: white;
}

#container {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#game {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: auto;
  transition: all 0.3s ease-in-out;
  gap: 5px;
}

/* ============================== FIXED TOAST SYSTEM Z-INDEX ============================== */
/* Add this to your frontend/css/styles.css or update existing toast styles */

.toast-container {
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12050; /* Above recovery security overlay (11000) and other modals */
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-container-below {
  z-index: 9000; /* Below modal overlays so they don't obscure dialogs */
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.toast {
  background-color: white;
  color: black;
  padding: 16px 20px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  min-width: 200px;
  box-shadow: 0 4px 23px 0 rgba(0, 0, 0, 0.2);
  animation: toast-in 0.2s ease-out;
  pointer-events: auto;
}

.toast.below-modals-toast {
  pointer-events: none;
}

/* Special positioning for wallet disconnect toast to show above wallet gate */
.toast.wallet-disconnect-toast {
  position: fixed;
  top: 10%;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  z-index: 10005; /* Above wallet gate (10004) */
  animation: wallet-disconnect-in 0.2s ease-out;
}

.toast.wallet-disconnect-toast.fade-out {
  animation: wallet-disconnect-out 0.2s ease-in forwards;
}

/* Special positioning for edit profile toasts to show above edit profile modal */
.toast.edit-profile-toast {
  position: fixed;
  top: 10%;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  z-index: 10007; /* Above edit profile modal (10006) */
  animation: wallet-disconnect-in 0.2s ease-out;
}

.toast.edit-profile-toast.fade-out {
  animation: wallet-disconnect-out 0.2s ease-in forwards;
}

.toast.success {
  background-color: #6aaa64;
  color: white;
}

.toast.error {
  background-color: #787c7e;
  color: white;
}

.toast.warning {
  background-color: #c9b458;
  color: white;
}

.toast.info {
  background-color: #17a2b8;
  color: white;
}

.toast.fade-out {
  animation: toast-out 0.2s ease-in forwards;
}

/* ✅ ALTERNATIVE: Leaderboard-specific toast positioning */
.leaderboard-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000; /* Higher than leaderboard modal */
  background: #28a745;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: slideInRight 0.3s ease-out;
}

.leaderboard-toast.error {
  background: #dc3545;
}

.leaderboard-toast.warning {
  background: #ffc107;
  color: #333;
}

.leaderboard-toast.info {
  background: #17a2b8;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes wallet-disconnect-in {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes wallet-disconnect-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================== ✅ NEW: WEBSOCKET STATUS INDICATOR ============================== */

.websocket-status {
  position: fixed;
  top: calc(3.25rem + 20px);
  left: 20px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  z-index: 1001;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: none; /* Hidden by default */
}

.websocket-status.connected {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  display: block;
}

.websocket-status.disconnected {
  background: linear-gradient(135deg, #dc3545, #e74c3c);
  color: white;
  display: block;
  animation: pulse-warning 2s infinite;
}

.websocket-status.connecting {
  background: linear-gradient(135deg, #ffc107, #ffab00);
  color: #333;
  display: block;
  animation: pulse-connecting 1.5s infinite;
}

@keyframes pulse-warning {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

@keyframes pulse-connecting {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}

/* ============================== ✅ NEW: LIVE UPDATE NOTIFICATIONS ============================== */

.live-update-notification {
  position: fixed;
  top: calc(3.25rem + 28px);
  right: 20px;
  background: linear-gradient(135deg, #17a2b8, #20c997);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  z-index: 1000;
  animation: slideInRight 0.3s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 300px;
  word-wrap: break-word;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ============================== WALLET GATE ============================== */

.wallet-disconnected {
  opacity: 0.3;
  pointer-events: none;
  filter: grayscale(70%);
  position: relative;
}

.wallet-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10004;
  color: white;
  text-align: center;
  padding: 2rem;
  box-sizing: border-box;
}

.wallet-gate-overlay h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: gainsboro;
}

.wallet-gate-overlay p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: rgb(129, 131, 132);
  max-width: 400px;
}

.wallet-gate-overlay button {
  cursor: pointer !important;
}

.wallet-gate-overlay .connect-prompt {
  background: #6ca965;
  border: 1px solid gainsboro;
  border-radius: 10px;
  color: white;
  font-family: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 1rem 2rem;
  outline: none;
  transition: all 0.2s ease-in-out;
}

.wallet-gate-overlay .connect-prompt:hover {
  background: #5a9553;
  transform: translateY(-2px);
}

.wallet-gate-overlay {
  background-color: rgb(226, 226, 224, 1);
}

.wallet-gate-overlay .nyt-modal-header,
.wallet-gate-overlay .nyt-modal-content {
  text-align: center;
}

.wallet-gate-overlay .nyt-modal-text {
  margin-left: auto;
  margin-right: auto;
}

.wallet-gate-overlay .nyt-modal-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.burndle-logo {
  background-image: url(../images/BURNdlelogo.png);
  background-size: contain;
  background-repeat: no-repeat;
  display: inline-block;
  width: auto;
  height: 7.5rem;
  aspect-ratio: 1/1;
}

.nyt-modal-title {
  font-family: NYT, "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
    "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
  font-size: 3rem !important;
}

.nyt-modal-title,
.nyt-modal-subtitle,
.nyt-modal-text {
  color: black !important;
}

.nyt-modal-subtitle {
  font-size: 1.75rem !important;
}

.nyt-modal-text {
  font-size: 1rem !important;
}

.nyt-button-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.nyt-button {
  color: white !important;
  font-family: inherit !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  padding: 0.75rem 3.75rem !important;
  margin: 0 !important;
  outline: none !important;
  box-sizing: border-box !important;

  background: #6ca965;
  border: 1px solid gainsboro;
  border-radius: 2rem;
  transition: all 0.3s ease;
}

.nyt-button:hover {
  filter: brightness(1.05);
}

.nyt-button-secondary {
  background-color: #c8b653;
}

/* Loading screen overlay - same as wallet gate but with loading bar */
.loading-screen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10005; /* Higher than wallet gate */
  color: white;
  text-align: center;
  padding: 2rem;
  box-sizing: border-box;
  background-color: rgb(226, 226, 224, 1);
}

/* Loading bar container */
.loading-bar-container {
  width: 100%;
  max-width: 400px;
  height: 16px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  margin: 2.6rem auto 3rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Loading bar progress */
.loading-bar {
  height: 100%;
  width: 0%;
  background: #000000;
  transition: width 0.3s ease;
  border-radius: 8px;
}

/* Loading screen specific styles to match wallet gate */
.loading-screen-overlay .nyt-modal {
  max-width: 28rem;
  width: 100%;
  padding: 2.5rem;
  margin-top: -2.15rem;
}

.loading-screen-overlay .nyt-modal-header {
  margin-bottom: 2.6rem;
}

.loading-screen-overlay .nyt-modal-subtitle {
  font-size: 1.75rem !important;
  margin-top: 1rem;
}

.loading-screen-overlay .nyt-modal-text {
  font-size: 1rem !important;
}

/* ============================== HEADER ============================== */

header {
  position: relative;
  color: white;
  font-size: 2rem;
  border-bottom: 1px solid rgb(58, 58, 60);
  text-align: center;
  width: 100%;
  padding: 0 1rem;
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  z-index: 10003;
}

.header-left {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0.25rem;
}

.play-button {
  color: white !important;
  font-family: inherit !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  padding: 0.5rem 1rem !important;
  outline: none !important;
  box-sizing: border-box !important;

  background: #6ca965;
  border: 1px solid gainsboro;
  border-radius: 2rem;
  transition: all 0.3s ease;
}

.play-button:hover {
  background: #5a9553;
  transform: translateY(-1px);
}

.play-button.disabled,
.play-button.locked {
  opacity: 0.6;
  cursor: default !important;
  pointer-events: none;
  transform: none !important;
}

.play-button.disabled:hover,
.play-button.locked:hover {
  background: #6ca965;
  transform: none;
}

.header-left-button {
  height: 3.25rem;
  width: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.header-left-button.switch {
}

.header-left-button:hover {
  background-color: rgb(65, 65, 65);
}

.header-left-button.switch:hover {
  background-color: rgb(216, 216, 216);
}

.header-left-icon {
  background-size: contain;
  background-repeat: no-repeat;
  display: inline-block;
  width: auto;
  height: 1.75rem;
  aspect-ratio: 1/1;
}

.header-left-icon.switch {
  filter: invert(100%) !important;
}

.header-left-x {
  background-image: url(../images/xicon.png);
}

.header-left-pf {
  background-image: url(../images/pficon.png);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  height: 100%;
  margin-right: -1rem;
}

.header-right-button {
  height: 3.25rem;
  width: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.header-right-button.switch {
}

.header-right-button:hover {
  background-color: rgb(65, 65, 65);
}

.header-right-button.switch:hover {
  background-color: rgb(216, 216, 216);
}

.header-right-icon {
  background-size: contain;
  background-repeat: no-repeat;
  display: inline-block;
  width: auto;
  height: 1.75rem;
  aspect-ratio: 1/1;
}

.header-right-icon.switch {
  filter: invert(100%) !important;
}

.header-right-rules {
  background-image: url(../images/rulesicon.png);
}

.header-right-leaderboard {
  background-image: url(../images/leaderboardicon.png);
}

.header-right-burn {
  background-image: url(../images/burnicon.png);
}

.header-right-daynight {
  background-image: url(../images/dayicon.png);
}

.header-right-profile {
  background-image: url(../images/profile.png);
}

.header-right-wallet {
  background-image: url(../images/wallet.png);
}

.connect-button {
  /* Icon button styling inherited from .header-right-button */
  cursor: pointer !important;
}

.wallet-button-disabled {
  cursor: not-allowed !important;
  opacity: 0.5;
  pointer-events: none;
}

/* Balance Dropdown */
.balance-dropdown-container {
  position: relative;
  display: inline-block;
}

.balance-dropdown-button {
  height: 3.25rem;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.balance-dropdown-button:hover {
  background-color: rgb(65, 65, 65);
}

.balance-dropdown-button.switch:hover {
  background-color: rgb(216, 216, 216);
}

.dropdown-arrow {
  width: 12px;
  height: 8px;
  color: #ffffff;
  transition: transform 0.2s ease;
}

.dropdown-arrow path {
  stroke: currentColor;
}

.dropdown-arrow.switch {
  color: #000000;
}

.balance-dropdown-container.active .dropdown-arrow {
  transform: rotate(180deg);
}

.balance-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: black;
  border: 1px solid gainsboro;
  border-radius: 5px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.balance-dropdown-menu.switch {
  background: rgba(240, 240, 245, 0.98);
  border-color: rgba(0, 0, 0, 0.1);
}

.balance-dropdown-container.active .balance-dropdown-menu {
  display: block;
}

.balance-header {
  margin-bottom: 1rem;
  text-align: left;
}

.balance-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.balance-label.switch {
  color: rgba(0, 0, 0, 0.6);
}

.balance-value {
  font-size: 1rem;
  font-weight: bold;
  color: white;
}

.balance-value.switch {
  color: black;
}

.balance-actions {
  display: flex;
  gap: 0.75rem;
}

.balance-deposit-btn,
.balance-withdraw-btn {
  flex: 1;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.balance-deposit-btn {
  background: #6ca965;
  color: white;
}

.balance-deposit-btn:hover {
  background: #568750;
  transform: translateY(-1px);
}

.balance-withdraw-btn {
  background: rgba(255, 255, 255, 0.184);
  color: white;
}

.balance-withdraw-btn.switch {
  background: rgba(0, 0, 0, 0.1);
  color: black;
}

.balance-withdraw-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.balance-withdraw-btn.switch:hover {
  background: rgba(0, 0, 0, 0.15);
}

/* Hamburger Menu - Hidden by default, shown on mobile */
.hamburger-menu-container {
  display: none;
  position: relative;
}

.hamburger-button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  align-items: center;
}

.hamburger-button span {
  display: block;
  width: 24px;
  height: 3px;
  background: white;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger-button.switch span {
  background: black;
}

.hamburger-button.active span:nth-child(1) {
  opacity: 0;
}

.hamburger-button.active span:nth-child(2) {
  transform: none;
}

.hamburger-button.active span:nth-child(3) {
  opacity: 0;
}

.hamburger-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.5rem;
  background: rgba(18, 18, 19, 1);
  border: 1px solid rgba(58, 58, 60, 1);
  border-radius: 8px;
  z-index: 10002;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  flex-direction: row;
  padding: 0.35rem;
  gap: 0.1rem;
}

.hamburger-dropdown.switch {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(211, 214, 219, 1);
}

.hamburger-dropdown.active {
  display: flex;
}

.hamburger-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  cursor: pointer;
  transition: background 0.2s ease;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  width: 2.25rem;
  height: 2.25rem;
}

.hamburger-item.switch {
  color: black;
}

.hamburger-item:hover {
  background: rgb(58, 58, 60);
}

.hamburger-item.switch:hover {
  background: rgb(240, 240, 240);
}

.hamburger-icon {
  background-size: contain;
  background-repeat: no-repeat;
  display: inline-block;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

.hamburger-icon.switch {
  filter: invert(100%) !important;
}

/* Connect button switch styling removed - now using header-right-icon.switch */

/* ============================== WALLET DROPDOWN ============================== */

.wallet-dropdown-container {
  position: relative;
  display: inline-block;
}

.wallet-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: black;
  border: 1px solid gainsboro;
  border-radius: 5px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  overflow: hidden;
}

.wallet-dropdown-menu.show {
  display: block;
}

.wallet-dropdown-item {
  padding: 0.75rem 1rem;
  color: white;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(211, 211, 211, 0.2);
  display: flex;
}

.wallet-dropdown-item:last-child {
  border-bottom: none;
}

.wallet-dropdown-item:hover {
  background: rgb(32, 32, 32);
}

.wallet-dropdown-item.wallet-edit-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
}

.wallet-dropdown-item.wallet-recover-key {
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.wallet-dropdown-item .profile-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.wallet-dropdown-item .profile-identifier {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.wallet-dropdown-item .edit-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
  flex-shrink: 0;
  margin-left: 0.5rem;
  color: white;
}

.switch .wallet-dropdown-item .edit-icon {
  color: black;
}

.switch .wallet-dropdown-item .profile-identifier {
  color: rgba(0, 0, 0, 0.5);
}

.wallet-dropdown-item.wallet-disconnect {
  color: #ff6b6b;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Light mode styles */
.switch .wallet-dropdown-menu {
  background: white;
  border-color: #ddd;
}

.switch .wallet-dropdown-item {
  color: black;
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.switch .wallet-dropdown-item:hover {
  background: rgb(239, 239, 239);
}

.switch .wallet-dropdown-item.wallet-username:hover {
  background: transparent;
}

.switch .wallet-dropdown-item.wallet-disconnect {
  color: #dc3545;
}

/* ============================== EDIT PROFILE MODAL ============================== */

.edit-profile-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10006;
  display: none;
  align-items: center;
  justify-content: center;
}

.edit-profile-modal.show {
  display: flex;
}

.edit-profile-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-profile-content {
  position: relative;
  background: #121213;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: calc(75% + 1rem);
  max-width: calc(375px + 1rem);
  max-height: 68vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 1;
  color: white;
  animation: modalSlideIn 0.3s ease-out;
}

.edit-profile-header {
  background: #121213;
  padding: 1.25rem 1.5rem;
  border-radius: 5px 5px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.edit-profile-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: white;
  font-weight: 600;
}

.edit-profile-close {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 1;
  padding: 0;
}

.edit-profile-close:hover {
  transform: translateY(-50%) scale(1.1);
}

.edit-profile-body {
  padding: 1.5rem;
}

.profile-wallet-info {
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wallet-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wallet-address {
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  color: white;
  word-break: break-all;
}

.username-input-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.username-input-section label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.username-input {
  width: 100%;
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  color: white;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.username-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.username-input:focus {
  outline: none;
  border-color: #6aaa64;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(106, 170, 100, 0.2);
}

.username-hint {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.profile-info-section {
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.profile-info-section label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.profile-info-value {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  word-break: break-all;
}

.edit-profile-footer {
  padding: 0 1.5rem 1.5rem;
}

.profile-save-btn {
  width: 100%;
  padding: 0.5rem;
  background: #6ca965;
  border: none;
  border-radius: 30px;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.profile-save-btn:hover {
  background: #568750;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 169, 101, 0.4);
}

.profile-save-btn:active {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .edit-profile-content {
    width: calc(100% - 20px);
    max-width: 100%;
    margin: 10px;
  }

  .edit-profile-header {
    padding: 1.1rem 1.25rem;
  }

  .edit-profile-body {
    padding: 1.25rem;
  }

  .edit-profile-footer {
    padding: 0 1.25rem 1.25rem;
  }
}

/* Light mode styles - colors only, dimensions/spacing inherited from base */
.switch .edit-profile-content {
  background: #ffffff;
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.switch .edit-profile-header {
  background: #f5f5f5;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.switch .edit-profile-header h3 {
  color: black;
}

.switch .edit-profile-close {
  background: rgba(0, 0, 0, 0.1);
  color: black;
}

.switch .edit-profile-close:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: translateY(-50%);
}

.switch .profile-wallet-info {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.switch .wallet-label {
  color: rgba(0, 0, 0, 0.6);
}

.switch .wallet-address {
  color: #333;
}

.switch .username-input-section label {
  color: rgba(0, 0, 0, 0.8);
}

.switch .username-input {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.2);
  color: #333;
}

.switch .username-input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.switch .username-input:focus {
  background: rgba(0, 0, 0, 0.08);
  border-color: #6aaa64;
}

.switch .username-hint {
  color: rgba(0, 0, 0, 0.5);
}

.switch .profile-save-btn {
  background: white;
  color: black;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.switch .profile-save-btn:hover {
  background: rgb(216, 216, 216);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.switch .edit-profile-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.header-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 2.5rem;
  font-weight: bold;
  margin: 0;
  text-align: center;
  font-family: NYT, "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
    "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
}

.header-title.switch {
  color: black;
}

/* ============================== GAME SECTION ============================== */

#board-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0px;
}

#board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 5px;
  padding: 10px 10px 5px 10px;
  box-sizing: border-box;
}

.square {
  border: 2px solid rgb(58, 58, 60);
  width: 56px;
  height: 56px;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  font-size: 29px;
  font-weight: bold;
  color: gainsboro; /* Default color for dark mode */
  text-transform: uppercase;

  display: flex;
  justify-content: center;
  align-items: center;

  transition: all 0.1s ease-in-out;
  transform-style: preserve-3d;
}

/* Speed up shake animation */
.animate__shakeX {
  --animate-duration: 0.75s !important;
  animation-duration: 0.75s !important;
}

/* Light mode tiles - only for unguessed tiles */
.square.switch {
  color: black;
  border-color: rgb(211, 214, 218);
}

/* Guessed tiles always have white text regardless of theme */
.square.guessed {
  color: white !important;
}

/* Light mode border for tiles */
.square.switch {
  border-color: rgb(211, 214, 218);
}

/* Custom tile flip animation */
@keyframes tileFlip {
  0% {
    transform: rotateX(0deg);
  }
  50% {
    transform: rotateX(90deg);
  }
  100% {
    transform: rotateX(0deg);
  }
}

.tile-flip {
  animation: tileFlip 0.6s ease-in-out;
}

.animate__bounce {
  animation-duration: 0.8s !important;
}

#keyboard-container {
  margin-top: 0px;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto 4px;
  touch-action: manipulation;
}

.keyboard-row button {
  font-family: inherit;
  font-weight: bold;
  border: 0;
  padding: 0;
  height: 58px;
  cursor: pointer;
  background-color: rgb(129, 131, 132);
  color: rgb(215, 218, 220);
  flex: 1 1 0;
  min-width: 43px;
  text-transform: uppercase;
  margin-right: 6px;
  border-radius: 4px;
  user-select: none;
  transition: all 0.2s ease-in-out;
  font-size: 18px;
}

/* Light mode keyboard keys */
.keyboard-row button.switch {
  background-color: rgb(211, 214, 218);
  color: rgb(56, 58, 60);
}

.keyboard-row button:hover {
  background-color: rgb(149, 151, 152);
}

.keyboard-row button.switch:hover {
  background-color: rgb(191, 194, 198);
}

.keyboard-row button.wide-button {
  flex: 1.5 1 0;
  min-width: 65px;
  font-size: 12px;
}

.keyboard-row button:last-child {
  margin-right: 0;
}

.spacer-half {
  flex-grow: 0.5;
}

/* Delete icon styling */
.delete-icon {
  height: 20px;
  width: auto;
  fill: rgb(215, 218, 220);
  display: block;
  margin: 0 auto;
  pointer-events: none;
}

.switch .delete-icon {
  fill: rgb(56, 58, 60);
}

/* ============================== FOOTER ============================== */

footer {
  color: white;
  position: fixed;
  bottom: 0;
  left: 0;
  min-width: 100vw;
  height: 3.5rem;
  background-color: rgb(0, 0, 0, 0.5);
}

.switch footer {
  background-color: rgba(255, 255, 255, 0.5);
  color: #000000;
}

.footer-information {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
}

.footer-left {
  height: 100%;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-right {
  height: 100%;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Ensure consistent styling for all footer text elements */
.streak-title,
.prize--title,
.time-title,
.sol-balance-title {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.8;
  margin-bottom: 0.2rem;
  text-align: center;
}

.switch .streak-title,
.switch .prize--title,
.switch .time-title,
.switch .sol-balance-title {
  opacity: 0.6;
  color: #333333;
}

.steak-counter,
.prize-count,
.time-countdown,
.sol-balance-counter {
  font-size: 1.25rem;
  font-weight: bold;
  text-align: center;
  position: relative;
}

.switch .steak-counter,
.switch .prize-count,
.switch .time-countdown,
.switch .sol-balance-counter {
  color: #000000;
}

/* Floating +100,000 animation */
.balance-float-text {
  position: absolute;
  font-size: 1.25rem;
  font-weight: bold;
  color: #ffffff;
  pointer-events: none;
  animation: floatUp 3s ease-out forwards;
  left: 50%;
  transform: translateX(-50%);
  top: -3rem;
  z-index: 1000;
  white-space: nowrap;
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-40px);
  }
}

/* ============================== STREAK ============================== */

.streak-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Keep as 2x2 grid */
  gap: 1.5rem;
}

.streak-container {
  padding: 0.25rem;
  pointer-events: none;
}

.steak-counter {
  font-weight: bold;
  font-size: 1.2rem;
}

/* ============================== LEADERBOARD MODAL STYLES ============================== */
/* Add this to your frontend/css/leaderboard.css or append to styles.css */

.leaderboard-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10010;
  animation: fadeIn 0.3s ease-out;
  backdrop-filter: blur(5px);
}

.leaderboard-modal.show {
  display: flex;
  z-index: 10010;
}

.leaderboard-modal.show ~ * {
  pointer-events: none;
}

.leaderboard-content {
  background: #121213;
  border-radius: 5px;
  padding: 0;
  width: calc(75% + 1rem);
  max-width: calc(375px + 1rem);
  max-height: 68vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease-out;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  display: flex;
  flex-direction: column;
}

.leaderboard-header {
  background: #6aaa64;
  padding: 1.25rem 1.5rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px 5px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.leaderboard-title {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.leaderboard-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ✅ UNIFIED CLOSE BUTTON STYLES FOR ALL MODALS */
.leaderboard-close,
.burn-close,
.rules-close {
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  pointer-events: auto !important;
  z-index: 10000;
  line-height: 1;
  padding: 0;
  outline: none;
}

.leaderboard-close:hover,
.burn-close:hover,
.rules-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.leaderboard-close:focus,
.burn-close:focus,
.rules-close:focus,
.leaderboard-close:focus-visible,
.burn-close:focus-visible,
.rules-close:focus-visible,
.leaderboard-close:active,
.burn-close:active,
.rules-close:active {
  outline: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transform: translateY(-50%);
}

.leaderboard-search {
  padding: 1.25rem 1.5rem;
  background: #121213;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: auto; /* Allow interactions */
}

.search-container {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
  /* ✅ FIX: Ensure input is above other elements */
  position: relative;
  z-index: 10;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
  outline: none;
  border-color: #6aaa64;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(106, 170, 100, 0.3);
  /* ✅ FIX: Add stronger focus indication */
  border-width: 2px;
  transform: scale(1.02);
}

.search-container:focus-within {
  transform: scale(1.01);
  transition: transform 0.2s ease;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  pointer-events: none; /* Don't block clicks */
  z-index: 1;
}

.search-results-info {
  text-align: center;
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

.leaderboard-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0;
  background: #121213;
  max-height: clamp(240px, calc(68vh - 220px), 420px);
}

.leaderboard-list::-webkit-scrollbar {
  width: 8px;
}

.leaderboard-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.leaderboard-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.leaderboard-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.leaderboard-item.current-player {
  background: rgba(255, 255, 255, 0.08);
}

.leaderboard-rank {
  font-size: 0.9rem;
  font-weight: bold;
  color: white;
  min-width: 2.35rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leaderboard-rank.rank-1 {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.leaderboard-rank.rank-2 {
  color: #c0c0c0;
  text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.leaderboard-rank.rank-3 {
  color: #cd7f32;
  text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

.leaderboard-player {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.player-username {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  letter-spacing: 0.3px;
  margin-left: 1.25rem;
}

.player-wallet-container {
  display: flex;
  align-items: center;
  gap: 0.18rem;
  margin-left: 0;
}

.leaderboard-you-badge {
  color: #667eea;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  margin-left: 1.25rem;
}

.leaderboard-global-highlight {
  color: #ffd700;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  margin-left: 0;
}

.player-wallet {
  font-family: "Courier New", monospace;
  color: white;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  position: relative;
}

.player-wallet:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #4caf50;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.copy-icon {
  width: 16px;
  height: 16px;
  opacity: 0.6;
  transition: all 0.3s ease;
  flex: 0 0 16px;
}

.copy-checkmark {
  color: #4caf50;
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.player-wallet:hover .copy-icon {
  opacity: 1;
  color: #4caf50;
}

.solscan-link {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 24px;
  height: 24px;
}

.solscan-link:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #6aaa64;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.solscan-icon {
  width: 12px;
  height: 12px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  flex-shrink: 0;
}

.solscan-link:hover .solscan-icon {
  opacity: 1;
  color: #6aaa64;
}

.leaderboard-streak {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  color: white;
  font-weight: bold;
  min-width: 3.5rem;
  justify-content: center;
}

.streak-main {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.95rem;
}

.streak-fire {
  color: #ff6b35;
  font-size: 0.95rem;
  text-shadow: 0 0 8px rgba(255, 107, 53, 0.6);
}

.streak-number {
  font-size: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  font-weight: bold;
}

.streak-label {
  font-size: 0.65rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.streak-current {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  opacity: 0.8;
}

.current-number {
  font-weight: 600;
}

.current-label {
  font-size: 0.6rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.leaderboard-pagination {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  background: #121213;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 80px;
  backdrop-filter: blur(10px);
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  border-color: #6aaa64;
  transform: translateY(-2px);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.pagination-info {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.82rem;
  min-width: 120px;
  text-align: center;
}

.empty-leaderboard {
  text-align: center;
  padding: 3rem;
  color: rgba(255, 255, 255, 0.6);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-leaderboard h3 {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.empty-leaderboard p {
  color: rgba(255, 255, 255, 0.6);
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.trophy-icon {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

.rank-1 .trophy-icon {
  color: #ffd700;
}

.rank-2 .trophy-icon {
  color: #c0c0c0;
}

.rank-3 .trophy-icon {
  color: #cd7f32;
}

/* ============================== ANIMATIONS ============================== */

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ============================== RESPONSIVE DESIGN ============================== */

@media (max-width: 768px) {
  .leaderboard-content {
    width: calc(100% - 2rem);
    max-width: 420px;
    max-height: 90vh;
    border-radius: 5px;
  }

  .leaderboard-header {
    padding: 1.25rem 1.25rem 1.15rem;
  }

  .leaderboard-title {
    font-size: 1.25rem;
  }

  .leaderboard-subtitle {
    font-size: 0.9rem;
  }

  .leaderboard-search {
    padding: 1.1rem 1.25rem;
  }

  .leaderboard-item {
    padding: 0.8rem 1rem;
  }

  .leaderboard-rank {
    min-width: 2.1rem;
    font-size: 0.83rem;
  }

  .player-wallet {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  .player-wallet-container {
    gap: 0.16rem;
    margin-left: 0;
  }

  .leaderboard-player {
    margin-left: 0;
  }

  .solscan-link {
    min-width: 22px;
    height: 22px;
    padding: 0.2rem;
  }

  .copy-icon,
  .copy-checkmark,
  .solscan-icon {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
  }

  .copy-checkmark {
    font-size: 1rem;
  }

  .leaderboard-streak {
    min-width: 3rem;
  }

  .streak-main {
    font-size: 0.88rem;
  }

  .streak-number {
    font-size: 0.92rem;
  }

  .leaderboard-you-badge {
    font-size: 0.72rem;
    margin-left: 1.25rem;
    gap: 0.16rem;
  }

  .leaderboard-global-highlight {
    font-size: 0.72rem;
    margin-left: 0;
    gap: 0.16rem;
  }

  .streak-current {
    font-size: 0.75rem;
  }

  .streak-label,
  .current-label {
    font-size: 0.6rem;
  }

  .pagination-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    min-width: 70px;
  }

  .leaderboard-pagination {
    padding: 1rem;
  }

  .pagination-info {
    font-size: 0.8rem;
    min-width: 100px;
  }

  .search-input {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 0.8rem 1rem 0.8rem 2.5rem;
  }

  .search-input:focus {
    transform: none; /* Prevent layout issues on mobile */
  }

  /* Footer responsive styling */
  .footer-left,
  .footer-right {
    gap: 0.75rem;
  }

  .footer-information {
    padding: 0 0.75rem;
    gap: 1.5rem;
  }

  .streak-title,
  .prize--title,
  .time-title,
  .sol-balance-title {
    font-size: 0.8rem;
  }

  .steak-counter,
  .prize-count,
  .time-countdown,
  .sol-balance-counter {
    font-size: 1.1rem;
  }

  /* Hide header title on tablets and below */
  .header-title {
    display: none;
  }

  /* Responsive header buttons for tablets */
  .header-right {
    gap: 0.15rem;
  }

  .header-left-button,
  .header-right-button {
    height: 2.75rem;
    width: 2.75rem;
  }

  .header-left-icon,
  .header-right-icon {
    height: 1.5rem;
  }

  /* Responsive play button for tablets */
  .play-button {
    font-size: 0.95rem !important;
    padding: 0.45rem 0.9rem !important;
  }

  /* Responsive tile sizing for tablets */
  .square {
    width: 52px;
    height: 52px;
    font-size: 27px;
  }

  #board {
    grid-gap: 5px;
  }
}

/* Make footer non-fixed on short screens */
@media (max-height: 700px) {
  body {
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
  }

  #container {
    flex: 1;
    min-height: auto;
    padding-bottom: 0;
  }

  footer {
    position: relative;
    margin-top: auto;
  }
}

@media (max-width: 507px) {
  /* Show hamburger menu and hide desktop buttons */
  .hamburger-menu-container {
    display: block;
  }

  .header-left-button,
  .header-right-button {
    display: none !important;
  }

  /* Keep connect button (profile) and balance dropdown visible on mobile */
  .connect-button {
    display: flex !important;
  }

  .balance-dropdown-container {
    display: inline-block !important;
  }

  /* Adjust balance dropdown button size for mobile */
  .balance-dropdown-button {
    height: 2.75rem;
    padding: 0 0.5rem;
    gap: 0.35rem;
  }

  .balance-dropdown-button .header-right-icon {
    height: 1.5rem;
  }

  /* Keep only play button and connect button visible */
  .header-left {
    gap: 0.5rem;
  }

  /* Center the hamburger menu in viewport */
  .hamburger-menu-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  /* Adjust header right spacing for mobile */
  .header-right {
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  /* Responsive play button for mobile */
  .play-button {
    position: relative !important;
    top: 1px !important;
  }

  /* Mobile-specific keyboard gap */
  #keyboard-container {
    gap: 4px;
    padding: 0 0.5rem;
  }

  .keyboard-row {
    margin: 0 auto 4px;
  }

  .keyboard-row button {
    height: 45px;
    min-width: 0;
    margin-right: 6px;
    font-size: 18px;
  }

  .keyboard-row button.wide-button {
    min-width: 0;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  /* Responsive tile sizing for mobile */
  .square {
    width: 47px;
    height: 47px;
    font-size: 23px;
  }

  #board {
    grid-gap: 4px;
  }

  footer {
    padding-bottom: 0.5rem;
  }

  .footer-information {
    padding-left: 0.5rem;
  }

  .leaderboard-content {
    width: calc(100% - 1.5rem);
    max-width: none;
    border-radius: 5px;
    max-height: 95vh;
  }

  .leaderboard-header {
    padding: 1.1rem 1.1rem 1rem;
  }

  .leaderboard-title {
    font-size: 1.15rem;
  }

  .leaderboard-subtitle {
    font-size: 0.85rem;
  }

  .leaderboard-item {
    padding: 0.6rem 0.8rem;
  }

  .leaderboard-rank {
    min-width: 1.8rem;
    font-size: 0.72rem;
  }

  .player-wallet {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
  }

  .player-wallet-container {
    gap: 0.14rem;
    margin-left: 0;
  }

  .copy-icon,
  .copy-checkmark,
  .solscan-icon {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
  }

  .copy-checkmark {
    font-size: 0.9rem;
  }

  .solscan-link {
    min-width: 20px;
    height: 20px;
    padding: 0.16rem;
  }

  .leaderboard-streak {
    min-width: 2.4rem;
  }

  .streak-main,
  .streak-fire {
    font-size: 0.78rem;
  }

  .streak-number {
    font-size: 0.76rem;
  }

  .streak-current {
    font-size: 0.64rem;
  }

  .current-label {
    font-size: 0.48rem;
  }

  .leaderboard-you-badge {
    font-size: 0.68rem;
    gap: 0.14rem;
    margin-left: 1.25rem;
  }

  .leaderboard-global-highlight {
    font-size: 0.66rem;
    gap: 0.14rem;
    margin-left: 0;
  }

  .leaderboard-search {
    padding: 1rem;
  }

  .search-input {
    font-size: 0.9rem;
  }

  .pagination-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    min-width: 60px;
  }

  .pagination-info {
    font-size: 0.75rem;
  }
}

/* ============================== THEME COMPATIBILITY ============================== */

/* Light mode styles */
.switch .leaderboard-content {
  background: #ffffff;
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.switch .leaderboard-header {
  background: #6aaa64;
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.switch .search-input {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
  border-color: rgba(0, 0, 0, 0.2);
}

.switch .search-input:focus {
  border-color: #6aaa64;
  box-shadow: 0 0 20px rgba(106, 170, 100, 0.2);
}

.switch .search-input::placeholder {
  color: rgba(0, 0, 0, 0.6);
}

.switch .search-icon {
  color: rgba(0, 0, 0, 0.6);
}

.switch .leaderboard-item {
  border-bottom-color: rgba(0, 0, 0, 0.15);
  color: #333;
}

.switch .leaderboard-item.current-player {
  background: #e8e8e8;
}

.switch .leaderboard-rank {
  color: #333;
}

.switch .leaderboard-rank.rank-1 {
  color: #b8860b; /* Darker gold for light mode */
}

.switch .leaderboard-rank.rank-2 {
  color: #708090; /* Darker silver for light mode */
}

.switch .leaderboard-rank.rank-3 {
  color: #a0522d; /* Darker bronze for light mode */
}

.switch .player-username {
  color: #333;
}

.switch .player-wallet {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
  border-color: rgba(0, 0, 0, 0.2);
}

.switch .leaderboard-you-badge {
  color: #4b58c2;
}

.switch .leaderboard-global-highlight {
  color: #b8860b;
}

.switch .player-wallet:hover {
  background: rgba(0, 0, 0, 0.15);
  border-color: #6aaa64;
}

.switch .player-wallet:hover .copy-icon {
  color: #6aaa64;
}

.switch .solscan-link {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.2);
}

.switch .solscan-link:hover {
  background: rgba(0, 0, 0, 0.15);
  border-color: #6aaa64;
}

.switch .solscan-link:hover .solscan-icon {
  color: #6aaa64;
}

.switch .leaderboard-streak {
  color: #333;
}

.switch .streak-current {
  color: #555;
}

.switch .streak-label,
.switch .current-label {
  color: #666;
}

.switch .pagination-btn {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
  border-color: rgba(0, 0, 0, 0.2);
}

.switch .pagination-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.2);
}

.switch .search-results-info {
  color: rgba(0, 0, 0, 0.7);
}

.switch .pagination-info {
  color: rgba(0, 0, 0, 0.8);
}

.switch .empty-leaderboard {
  color: rgba(0, 0, 0, 0.6);
}

.switch .empty-leaderboard h3 {
  color: rgba(0, 0, 0, 0.8);
}

.switch .empty-leaderboard p {
  color: rgba(0, 0, 0, 0.6);
}

.switch .leaderboard-list {
  background: #ffffff;
}

.switch .leaderboard-search {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.switch .leaderboard-pagination {
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
}

/* Scrollbar styles for light mode */
.switch .leaderboard-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.switch .leaderboard-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
}

.switch .leaderboard-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* ============================== ACCESSIBILITY ============================== */
.leaderboard-modal * {
  box-sizing: border-box;
}

.leaderboard-modal input {
  pointer-events: auto !important;
  user-select: text !important;
}

.leaderboard-modal *:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.pagination-btn:focus,
.player-wallet:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .leaderboard-content {
    border: 2px solid white;
  }

  .leaderboard-item {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  }

  .player-wallet {
    border: 2px solid white;
  }

  .pagination-btn {
    border: 2px solid white;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .leaderboard-modal,
  .leaderboard-content,
  .leaderboard-item,
  .player-wallet,
  .pagination-btn,
  .spinner {
    animation: none;
    transition: none;
  }

  .leaderboard-item:hover {
    transform: none;
  }

  .player-wallet:hover {
    transform: none;
  }

  .pagination-btn:hover:not(:disabled) {
    transform: none;
  }
}

/* ============================== RESPONSIVE DESIGN ============================== */

@media (max-width: 768px) {
  .websocket-status {
    top: calc(3.25rem + 10px);
    left: 10px;
    font-size: 10px;
    padding: 6px 12px;
  }

  .live-update-notification {
    top: calc(3.25rem + 18px);
    right: 10px;
    left: 10px;
    max-width: none;
    font-size: 12px;
    padding: 10px 16px;
  }

  .streak-modal-content {
    padding: 1.5rem;
    width: 95%;
  }

  .streak-stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }
}

/* ============================== GAME ENTRY MODAL STYLES ============================== */
.game-entry-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10015;
}

.game-entry-modal.show {
  display: flex;
}

.game-entry-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-entry-modal-content {
  position: relative;
  background: #121213;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: calc(75% + 1rem);
  max-width: calc(375px + 1rem);
  max-height: 68vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  color: white;
  animation: modalSlideIn 0.3s ease-out;
  display: flex;
  flex-direction: column;
}

.game-entry-modal-content.switch {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.1);
  color: black;
}

.game-entry-modal-header {
  background: #121213;
  padding: 1.25rem 1.5rem;
  border-radius: 5px 5px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.game-entry-modal-header.switch {
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.game-entry-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
}

.game-entry-modal-header.switch h2 {
  color: black;
}

.game-entry-modal-close {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 1;
  padding: 0;
}

.game-entry-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.05);
}

.game-entry-modal-close.switch {
  background: rgba(0, 0, 0, 0.2);
  color: rgba(0, 0, 0, 0.8);
}

.game-entry-modal-close.switch:hover {
  background: rgba(0, 0, 0, 0.3);
  transform: translateY(-50%);
}

.game-entry-modal-subtitle {
  margin: 1.25rem 0 0;
  padding: 0 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}

.game-entry-modal-subtitle.switch {
  color: rgba(0, 0, 0, 0.6);
}

.game-entry-modal-body {
  padding: 1.5rem;
}

.game-entry-amount {
  margin-bottom: 1.25rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  text-align: center;
}

.game-entry-amount.switch {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.game-entry-amount .amount {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #4caf50;
}

.game-entry-amount.switch .amount {
  color: #4caf50;
}

.game-entry-rules {
  margin-bottom: 0.75rem;
}

.game-entry-rules p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0;
  font-weight: 500;
}

.game-entry-rules ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.game-entry-rules li {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

.game-entry-rules li strong {
  color: white;
  font-weight: 600;
  font-size: 0.82rem;
}

.game-entry-rules.switch p {
  color: rgba(0, 0, 0, 0.6);
}

.game-entry-rules.switch li {
  color: rgba(0, 0, 0, 0.65);
}

.game-entry-rules.switch li strong {
  color: rgba(0, 0, 0, 0.9);
}

.game-entry-status {
  margin-top: 0.6rem;
  padding: 0.45rem;
  border-radius: 5px;
  text-align: center;
  border: 1px solid #e67e22;
  background: rgba(230, 126, 34, 0.1);
  color: #e67e22;
}

.game-entry-status.switch {
  border-color: rgba(230, 126, 34, 0.4);
  background: rgba(230, 126, 34, 0.1);
  color: rgba(230, 126, 34, 0.9);
}

.game-entry-status.success {
  border-color: #27ae60;
  background: rgba(39, 174, 96, 0.12);
  color: #27ae60;
}

.game-entry-status.error {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.12);
  color: #e74c3c;
}

.game-entry-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.game-entry-status .loading-spinner {
  width: 3.5px;
  height: 3.5px;
  border: 0.5px solid rgba(230, 126, 34, 0.3);
  border-top-color: #e67e22;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.game-entry-status.success .loading-spinner,
.game-entry-status.error .loading-spinner {
  display: none;
}

.game-entry-modal-footer {
  padding: 0 1.5rem 1.5rem;
}

.game-entry-actions {
  display: flex;
  gap: 1rem;
}

.game-entry-confirm-btn,
.game-entry-cancel-btn {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.game-entry-confirm-btn {
  background: #6ca965;
  color: white;
  box-shadow: none;
}

.game-entry-confirm-btn:hover {
  background: #568750;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(86, 135, 80, 0.4);
}

.game-entry-confirm-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.game-entry-cancel-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
}

.game-entry-cancel-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
  transform: translateY(-1px);
}

.game-entry-cancel-btn.switch {
  border-color: rgba(0, 0, 0, 0.2);
  color: rgba(0, 0, 0, 0.75);
}

.game-entry-cancel-btn.switch:hover {
  border-color: rgba(0, 0, 0, 0.35);
  color: rgba(0, 0, 0, 0.9);
}

.game-entry-modal-body.switch {
  color: rgba(0, 0, 0, 0.8);
}

@media (max-width: 600px) {
  .game-entry-modal-content {
    margin: 10px;
    width: calc(100% - 20px);
    max-height: 80vh;
  }

  .game-entry-modal-header {
    padding: 1.1rem 1.25rem;
  }

  .game-entry-modal-body {
    padding: 1.25rem;
  }

  .game-entry-modal-footer {
    padding: 0 1.25rem 1.25rem;
  }

  .game-entry-actions {
    flex-direction: column;
  }

  .game-entry-amount .amount {
    font-size: 1.5rem;
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ============================== BURN MODAL STYLES ============================== */
.burn-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10010;
  animation: fadeIn 0.3s ease-out;
  backdrop-filter: blur(5px);
}

.burn-modal.show {
  display: flex;
  z-index: 10010;
}

.burn-content {
  background: #121213;
  border-radius: 5px;
  padding: 0;
  width: calc(75% + 1rem);
  max-width: calc(375px + 1rem);
  max-height: 68vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease-out;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  color: white;
}

.burn-header {
  background: #ff6b35;
  padding: 1.25rem 1.5rem;
  border-radius: 5px 5px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.burn-title {
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

/* ✅ Burn close button styles now unified above with leaderboard and rules */

.burn-body {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  overflow-y: auto;
  max-height: calc(68vh - 140px);
}

/* ============================== STATS GRID ============================== */
.burn-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stats-section {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.25rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}

/* Ensure burn modal sections use white/transparent colors only */
.burn-modal .stats-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.burn-modal .section-title {
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding-bottom: 1rem;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-row:last-child {
  border-bottom: none;
}

/* Ensure burn modal stats rows use white borders */
.burn-modal .stats-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.burn-modal .stats-row:last-child {
  border-bottom: none !important;
}

.stat-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-value {
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-value.large {
  font-size: 1.3rem;
}

.stat-value.highlight {
  color: #ff6b35;
  text-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

/* ============================== BURN PERCENTAGE VISUALIZATION ============================== */
.burn-percentage-viz {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.5rem;
}

.percentage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.percentage-title {
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

.percentage-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ff6b35;
  text-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

.burn-progress {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  overflow: hidden;
  margin: 1rem 0;
  position: relative;
}

.burn-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6b35, #ff8c42, #ffaa5c);
  transition: width 0.8s ease-out;
  position: relative;
  border-radius: 6px;
}

.burn-progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

.burn-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.detail-item {
  text-align: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.detail-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.25rem;
}

.detail-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
}

/* ============================== LOADING STATES ============================== */
.loading-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  font-size: 0.75rem;
}

.error-text {
  color: #ff6b6b;
  font-size: 0.82rem;
}


/* ============================== ANIMATIONS ============================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

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

.pulse {
  animation: pulse 2s infinite;
}

/* ============================== RESPONSIVE DESIGN ============================== */
@media (max-width: 600px) {
  .burn-content {
    width: calc(100% - 20px);
    max-width: 100%;
    max-height: 92vh;
    border-radius: 12px;
  }

  .burn-header {
    padding: 1.1rem 1.25rem;
  }

  .burn-body {
    padding: 1.25rem;
  }

  .burn-details {
    grid-template-columns: 1fr;
  }

  .stats-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .percentage-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ============================== THEME COMPATIBILITY ============================== */
.switch .burn-content {
  background: #ffffff;
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.switch .burn-header {
  background: #ff6b35;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.switch .burn-title {
  color: white;
}

.switch .burn-subtitle {
  color: rgba(255, 255, 255, 0.9);
}

.switch .stats-section,
.switch .burn-percentage-viz {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.switch .section-title,
.switch .percentage-title {
  color: black;
}

.switch .burn-modal .section-title {
  border-bottom: 1px solid rgba(0, 0, 0, 0.2) !important;
}

.switch .burn-modal .stats-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.15) !important;
}

.switch .burn-modal .stats-row:last-child {
  border-bottom: none !important;
}

.switch .stat-label {
  color: rgba(0, 0, 0, 0.6);
}

.switch .stat-value {
  color: #333;
}

.switch .stat-value.highlight {
  color: #ff6b35;
  text-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

.switch .detail-item {
  background: rgba(0, 0, 0, 0.03);
}

.switch .detail-label {
  color: rgba(0, 0, 0, 0.5);
}

.switch .detail-value {
  color: #333;
}

.switch .last-updated {
  color: rgba(0, 0, 0, 0.5);
}

.switch .burn-progress {
  background: rgba(0, 0, 0, 0.2);
}

/* ============================== SUBMISSION BLOCKING STYLES ============================== */

/* Danger countdown styling */
.danger-countdown {
  color: #ff4444 !important;
  font-weight: bold;
  animation: pulse-danger 1s infinite;
  text-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
}

@keyframes pulse-danger {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Blocked enter key styling */
.submission-blocked {
  background-color: #666 !important;
  color: #999 !important;
  opacity: 0.5;
  cursor: not-allowed !important;
  transition: all 0.2s ease;
}

.submission-blocked:hover {
  background-color: #666 !important;
  color: #999 !important;
}

/* Board danger styling */
.submission-danger {
  opacity: 0.7;
  filter: grayscale(20%);
  transition: all 0.3s ease;
}

/* Light mode variations */
html.switch .danger-countdown {
  color: #cc0000 !important;
  text-shadow: 0 0 5px rgba(204, 0, 0, 0.3);
}

html.switch .submission-blocked {
  background-color: #ccc !important;
  color: #888 !important;
}

/* Disabled keyboard styling during final 3 seconds */
#keyboard-container.keyboard-disabled {
  opacity: 0.8;
  transition: all 0.3s ease;
}

#keyboard-container.keyboard-disabled .key {
  pointer-events: none !important;
}

#keyboard-container.keyboard-disabled .wide-button {
  pointer-events: none !important;
}

/* Red and glowing countdown timer during final 3 seconds */
#countdown-timer.countdown-danger {
  color: #ff4444 !important;
  text-shadow: 0 0 10px #ff4444, 0 0 20px #ff4444, 0 0 30px #ff4444 !important;
  font-weight: bold !important;
  animation: countdown-glow 1s ease-in-out infinite alternate !important;
}

@keyframes countdown-glow {
  from {
    text-shadow: 0 0 10px #ff4444, 0 0 20px #ff4444, 0 0 30px #ff4444;
  }
  to {
    text-shadow: 0 0 15px #ff4444, 0 0 25px #ff4444, 0 0 35px #ff4444;
  }
}

/* Light mode countdown danger styling */
html.switch #countdown-timer.countdown-danger {
  color: #cc0000 !important;
  text-shadow: 0 0 10px #cc0000, 0 0 20px #cc0000, 0 0 30px #cc0000 !important;
}

html.switch @keyframes countdown-glow {
  from {
    text-shadow: 0 0 10px #cc0000, 0 0 20px #cc0000, 0 0 30px #cc0000;
  }
  to {
    text-shadow: 0 0 15px #cc0000, 0 0 25px #cc0000, 0 0 35px #cc0000;
  }
}

/* ============================== RULES MODAL STYLES ============================== */
.rules-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10010;
  padding: 20px;
  box-sizing: border-box;
}

.rules-modal.show {
  display: flex;
  z-index: 10010;
}

.rules-content {
  background: #121213;
  border-radius: 5px;
  padding: 0;
  width: calc(75% + 1rem);
  max-width: calc(375px + 1rem);
  max-height: 68vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  animation: modalSlideIn 0.3s ease-out;
}

.rules-header {
  background: #1a1a1a;
  padding: 1.25rem 1.5rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px 5px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ✅ Rules close button styles now unified above with leaderboard and burn */

.rules-title {
  color: white;
  font-size: 1.25rem;
  margin: 0;
  font-weight: 600;
}

.rules-body {
  padding: 1.35rem;
  max-height: calc(68vh - 140px);
  overflow-y: auto;
}

.rules-section {
  margin-bottom: 2rem;
}

.rules-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.rules-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
}

.rule-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(5px);
}

.rule-number {
  background: #667eea;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.rule-text {
  color: #e4e4e4;
  line-height: 1.5;
  font-size: 0.78rem;
}

.rule-text strong {
  color: white;
  font-size: 0.84rem;
}

.reward-info {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.reward-highlight {
  text-align: center;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.reward-highlight h3 {
  color: white;
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
}

.reward-highlight p {
  color: #e4e4e4;
  margin: 0;
  line-height: 1.5;
  font-size: 0.78rem;
}

.reward-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
  gap: 0.45rem;
}

.split-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.position {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.6rem;
}

.percentage {
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
}

.game-countdown-container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.game-countdown {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 60px;
}

.countdown-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.countdown-label {
  color: #888;
  font-size: 0.55rem;
  margin-top: 0.3rem;
}

.countdown-message {
  color: #e4e4e4;
  font-style: italic;
  margin-top: 0.5rem;
  font-size: 0.78rem;
}

/* Light mode styles for rules modal */
.switch .rules-content {
  background: #ffffff;
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.switch .rules-header {
  background: #e0e0e0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.switch .rules-title {
  color: #222;
}

.switch .rules-subtitle {
  color: #555;
}

.switch .section-title {
  color: #333;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.switch .rule-text {
  color: #444;
}

.switch .rule-text strong {
  color: #222;
}

.switch .reward-highlight p {
  color: #444;
}

.switch .countdown-message {
  color: #444;
}

.switch .countdown-label {
  color: #666;
}

.switch .reward-highlight h3 {
  color: #222;
}

.switch .split-item {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.switch .reward-info {
  background: #e8e8e8;
  border: 1px solid #d0d0d0;
}

.switch .position {
  color: #555;
}

.switch .percentage {
  color: #222;
}

.switch .countdown-item {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.switch .countdown-value {
  color: #222;
  text-shadow: none;
}

.switch .rules-close {
  background: rgba(0, 0, 0, 0.1);
  color: #222;
}

.switch .rules-close:hover {
  background: rgba(0, 0, 0, 0.2);
}

.switch .rule-number {
  background: #667eea;
  color: white;
}

.switch .rule-item {
  background: rgba(0, 0, 0, 0.08);
  border-left: 4px solid #667eea;
}

.switch .rule-item:hover {
  background: rgba(0, 0, 0, 0.12);
}

/* Mobile responsiveness for rules modal */
@media (max-width: 600px) {
  .rules-content {
    width: calc(100% - 20px);
    max-width: 100%;
    max-height: 92vh;
    border-radius: 12px;
  }

  .rules-header {
    padding: 1.1rem 1.25rem;
  }

  .rules-body {
    padding: 1.25rem;
  }

  .reward-split {
    grid-template-columns: 1fr;
  }

  .game-countdown {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .countdown-item {
    min-width: 70px;
    padding: 0.65rem;
  }

  .countdown-value {
    font-size: 1.4rem;
  }
}

/* Game Start Modal Styles */
.game-start-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10006;
  animation: fadeIn 0.3s ease-out;
}

.game-start-modal.show {
  display: flex;
}

.game-start-content {
  background: #121213;
  border-radius: 20px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  transform: scale(0.8);
  animation: modalPopIn 0.5s ease-out forwards;
}

@keyframes modalPopIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes modalShrink {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.3);
    opacity: 0;
  }
}

.game-start-content.shrinking {
  animation: modalShrink 0.5s ease-in forwards;
}

.game-start-header h2 {
  margin: 0 0 1rem 0;
  color: white;
  font-size: 2rem;
}

.countdown-intro {
  font-size: 1.2rem;
  margin: 0 0 2rem 0;
  color: white;
}

.game-start-modal .game-countdown-container .game-countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.game-start-modal .game-countdown-container .countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 1rem;
  min-width: 80px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-start-modal .game-countdown-container .countdown-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.game-start-modal .game-countdown-container .countdown-label {
  font-size: 0.9rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.game-start-modal .game-countdown-container .countdown-message {
  font-size: 1.2rem;
  color: white;
  margin: 0;
  font-weight: 500;
}

/* ===== DEPOSIT MODAL STYLES ===== */
.deposit-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10015;
}

.deposit-modal.show {
  display: flex;
}

.deposit-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.deposit-modal-content {
  position: relative;
  background: #121213;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: calc(75% + 1rem);
  max-width: calc(375px + 1rem);
  max-height: 68vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 1;
  color: white;
  animation: modalSlideIn 0.3s ease-out;
}

.deposit-modal-content.switch {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.1);
  color: black;
}

.deposit-modal-header {
  background: #121213;
  padding: 1.25rem 1.5rem;
  border-radius: 5px 5px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.deposit-modal-header.switch {
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.deposit-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
}

.deposit-modal-header.switch h2 {
  color: black;
}

.deposit-modal-close {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 1;
  padding: 0;
}

.deposit-modal-close:hover {
  transform: translateY(-50%) scale(1.15);
}

.deposit-modal-close.switch {
  color: rgba(0, 0, 0, 0.8);
}

.deposit-modal-close.switch:hover {
  transform: translateY(-50%) scale(1.15);
}

.deposit-modal-subtitle.switch {
  color: rgba(0, 0, 0, 0.6);
}

.deposit-modal-body {
  padding: 1.5rem;
}

.deposit-info-container {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.deposit-token-section {
  flex: 1;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

.deposit-token-section.switch {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.deposit-balance-section {
  flex: 1;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

.deposit-balance-section.switch {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.deposit-token-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.deposit-token-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.deposit-token-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
}

.deposit-token-name.switch {
  color: black;
}

.deposit-balance {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.deposit-balance-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
}

.deposit-balance-label.switch {
  color: rgba(0, 0, 0, 0.5);
}

.deposit-balance-value {
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
}

.deposit-balance-value.switch {
  color: black;
}

.deposit-warning {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.65rem;
  line-height: 1.4;
  margin-top: 1.25rem;
}

.deposit-warning.switch {
  background: rgba(255, 193, 7, 0.15);
  color: rgba(0, 0, 0, 0.8);
}

.deposit-address-section {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.deposit-address-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.deposit-address-label.switch {
  color: rgba(0, 0, 0, 0.6);
}

.deposit-address-value {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  color: white;
}

.deposit-address-value.switch {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
  color: black;
}

.deposit-address-text {
  flex: 1;
  font-family: monospace;
  font-size: 0.9rem;
  word-break: break-all;
  line-height: 1.6;
}

.deposit-address-copy-btn {
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 6px;
}

.deposit-address-copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.deposit-address-copy-btn:active {
  transform: scale(0.95);
}

.deposit-address-copy-btn.switch {
  color: rgba(0, 0, 0, 0.6);
}

.deposit-address-copy-btn.switch:hover {
  background: rgba(0, 0, 0, 0.1);
  color: black;
}

.deposit-modal-footer {
  padding: 0 1.5rem 1.5rem;
}

.copy-address-btn {
  width: 100%;
  padding: 0.5rem;
  margin-top: 1.5rem;
  background: #6ca965;
  border: none;
  border-radius: 30px;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.copy-address-btn:hover {
  background: #568750;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(86, 135, 80, 0.4);
}

.copy-address-btn:active {
  transform: translateY(0);
}

/* ============================== WITHDRAW MODAL ============================== */

.withdraw-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10015;
}

.withdraw-modal.show {
  display: flex;
}

.withdraw-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.withdraw-modal-content {
  position: relative;
  background: #121213;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: calc(75% + 1rem);
  max-width: calc(375px + 1rem);
  max-height: 68vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 1;
  color: white;
  animation: modalSlideIn 0.3s ease-out;
}

.withdraw-modal-content.switch {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.1);
  color: black;
}

.withdraw-modal-header {
  background: #121213;
  padding: 1.25rem 1.5rem;
  border-radius: 5px 5px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.withdraw-modal-header.switch {
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.withdraw-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
}

.withdraw-modal-header.switch h2 {
  color: black;
}

.withdraw-modal-close {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 1;
  padding: 0;
}

.withdraw-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.withdraw-modal-close.switch {
  background: rgba(0, 0, 0, 0.2);
  color: rgba(0, 0, 0, 0.8);
}

.withdraw-modal-close.switch:hover {
  background: rgba(0, 0, 0, 0.3);
  transform: translateY(-50%);
}

.withdraw-modal-subtitle {
  padding: 0.5rem 1.5rem 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.withdraw-modal-subtitle.switch {
  color: rgba(0, 0, 0, 0.6);
}

.withdraw-modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.withdraw-token-toggle {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.4rem;
  margin-top: -0.5rem;
  margin-bottom: -0.5rem;
}

.withdraw-token-button {
  flex: 0 0 auto;
  padding: 0.44rem 0.6rem;
  min-width: 66px;
  border-radius: 5px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #ebebeb;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.015em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
  box-shadow: none;
}

.withdraw-token-button.active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: translateY(-0.5px);
}

.withdraw-token-button:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-0.5px);
}

.withdraw-token-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.3);
  outline-offset: 2px;
}

.withdraw-token-button:active {
  transform: translateY(0);
}

.withdraw-token-toggle.switch {
  gap: 0.4rem;
}

.withdraw-token-button.switch {
  background: rgba(0, 0, 0, 0.05);
  color: #121213;
}

.withdraw-token-button.switch:hover {
  background: rgba(0, 0, 0, 0.08);
}

.withdraw-token-button.switch.active {
  background: #121213;
  color: #f8f8f8;
  transform: translateY(-0.5px);
}

.withdraw-info-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 0;
}

.withdraw-token-section {
  flex: 1;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

.withdraw-token-section.switch {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.withdraw-balance-section {
  flex: 1;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

.withdraw-balance-section.switch {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.withdraw-token-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.withdraw-token-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px;
  box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.withdraw-token-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
}

.withdraw-token-name.switch {
  color: black;
}

.withdraw-balance {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.withdraw-balance-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
}

.withdraw-balance-label.switch {
  color: rgba(0, 0, 0, 0.5);
}

.withdraw-balance-value {
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
}

.withdraw-balance-value.switch {
  color: black;
}

.withdraw-amount-section {
  margin-bottom: 0;
}

.withdraw-amount-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.withdraw-amount-label.switch {
  color: rgba(0, 0, 0, 0.6);
}

.withdraw-amount-input-container {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  padding: 0.5rem 0.75rem;
}

.withdraw-amount-input-container.switch {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
}

.withdraw-amount-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
}

.withdraw-amount-input.switch {
  color: black;
}

/* Remove spinner arrows from number input */
.withdraw-amount-input::-webkit-outer-spin-button,
.withdraw-amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.withdraw-amount-input[type="number"] {
  -moz-appearance: textfield;
}

.withdraw-amount-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.withdraw-amount-input.switch::placeholder {
  color: rgba(0, 0, 0, 0.3);
}

.withdraw-amount-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.withdraw-max-btn {
  background: transparent;
  align-self: flex-end;
  border: none;
  padding: 0;
  color: #6ca965;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.withdraw-max-btn:hover {
  color: #80c777;
}

.withdraw-max-btn:active {
  transform: scale(0.95);
}

.withdraw-amount-suffix {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.withdraw-burn-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px;
  box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.withdraw-burn-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.withdraw-burn-text.switch {
  color: rgba(0, 0, 0, 0.6);
}

.withdraw-token-icon.sol-token,
.withdraw-burn-icon.sol-token {
  background: none;
  padding: 0;
  box-shadow: none;
}

.withdraw-burn-icon.sol-token {
  box-shadow: none;
}

.withdraw-address-section {
  margin-bottom: 1.5rem;
}

.withdraw-address-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.withdraw-address-label.switch {
  color: rgba(0, 0, 0, 0.6);
}

.withdraw-address-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  color: white;
  font-size: 0.85rem;
  font-family: monospace;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.withdraw-address-input.switch {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
  color: black;
}

.withdraw-address-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.withdraw-address-input.switch::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.withdraw-address-input:focus {
  border-color: #5b7cfa;
}

.withdraw-modal-footer {
  padding: 0 1.5rem 1.5rem;
}

.withdraw-btn {
  width: 100%;
  padding: 0.5rem;
  background: #6ca965;
  border: none;
  border-radius: 30px;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.withdraw-btn:hover {
  background: #568750;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(91, 124, 250, 0.4);
}

.withdraw-btn:active {
  transform: translateY(0);
}

.withdraw-btn.invalid {
  background: #e74c3c;
  cursor: not-allowed;
}

.withdraw-btn.invalid:hover {
  background: #c0392b;
  transform: none;
  box-shadow: none;
}

@media (max-width: 600px) {
  .withdraw-modal-content {
    width: calc(100% - 20px);
    max-width: 100%;
    margin: 10px;
  }

  .withdraw-modal-header {
    padding: 1.1rem 1.25rem;
  }

  .withdraw-modal-body {
    padding: 1.25rem;
  }

  .withdraw-modal-footer {
    padding: 0 1.25rem 1.25rem;
  }
}

/* Mobile responsive for deposit modal */
@media (max-width: 480px) {
  .deposit-modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .deposit-modal-header {
    padding: 1.25rem 1.25rem 0.5rem;
  }

  .deposit-modal-body {
    padding: 1.25rem;
  }

  .deposit-token-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .deposit-balance {
    align-items: flex-start;
  }

  .deposit-address-value {
    flex-wrap: wrap;
  }

  .deposit-address-text {
    font-size: 0.8rem;
  }
}

/* ===== AUTHENTICATION MODAL STYLES ===== */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10020;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.auth-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal {
  background: #121213;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: calc(75% + 1rem);
  max-width: calc(375px + 1rem);
  max-height: 68vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  animation: modalSlideIn 0.3s ease-out;
  color: white;
}

.auth-modal-overlay.show .auth-modal {
  transform: scale(1);
}

.auth-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px 5px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #121213;
  position: relative;
}

.auth-modal-title {
  font-size: 1.2rem;
  margin: 0;
  color: white;
  font-weight: 600;
}

.auth-modal-close {
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 1;
  padding: 0;
}

.auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.auth-modal-content {
  padding: 1.5rem;
}

.auth-section {
  margin-bottom: 1.5rem;
}

.auth-section:last-of-type {
  margin-bottom: 1rem;
}

.auth-section-title {
  font-size: 1.1rem;
  margin: 0 0 1rem 0;
  color: white;
  font-weight: 600;
}

.auth-input-group {
  margin-bottom: 1.2rem;
}

.auth-input-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 0.85rem;
}

.auth-input-group input {
  width: 100%;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  color: white;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.auth-input-group input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.auth-input-group input:focus {
  outline: none;
  border-color: #6aaa64;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(106, 170, 100, 0.2);
}

.auth-extra-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -0.4rem;
  margin-bottom: 1.2rem;
}

.auth-forgot-password {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
  font-family: inherit;
  transition: color 0.2s ease;
}

.auth-forgot-password:hover,
.auth-forgot-password:focus {
  color: #ffffff;
  text-decoration: underline;
}

.password-input-wrapper {
  position: relative;
  width: 100%;
}

.password-input-wrapper input {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: color 0.2s ease;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

.password-toggle:focus-visible {
  outline: 2px solid #6aaa64;
  outline-offset: 2px;
}

.password-toggle:hover {
  color: #343a40;
}

.auth-modal .password-toggle {
  color: rgba(255, 255, 255, 0.7);
}

.auth-modal .password-toggle:hover {
  color: #ffffff;
}

.auth-modal .password-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.recovery-security-modal .password-toggle {
  color: rgba(255, 255, 255, 0.8);
}

.recovery-security-modal .password-toggle:hover {
  color: #ffffff;
}

.auth-submit-btn {
  width: 100%;
  padding: 0.5rem;
  background: #6aaa64;
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(106, 170, 100, 0.4);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: rgba(255, 255, 255, 0.6);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.auth-divider span {
  padding: 0 1rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.auth-phantom-btn {
  width: 100%;
  border: none;
  background: transparent;
}

.auth-phantom-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.3);
  outline-offset: 3px;
}

.phantom-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.phantom-button {
  width: 100%;
  padding: 0.45rem 0.75rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: none;
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}

.phantom-button:hover:not(.loading) {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
  box-shadow: none;
}

.phantom-button:active {
  transform: translateY(0);
}

.phantom-button.loading {
  opacity: 0.7;
  pointer-events: none;
}

.auth-phantom-note {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.auth-switch {
  text-align: center;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.auth-switch a {
  color: #6aaa64;
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.25rem;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .auth-modal {
    width: calc(100% - 20px);
    max-width: 100%;
    margin: 10px;
    max-height: 80vh;
  }

  .auth-modal-header {
    padding: 1.1rem 1.25rem;
  }

  .auth-modal-title {
    font-size: 1.15rem;
  }

  .auth-modal-content {
    padding: 1.25rem;
  }

  .verification-modal .auth-modal-header {
    padding: 1.1rem 2.5rem 1.1rem 1.1rem;
  }
}

/* ===== VERIFICATION MODAL STYLES ===== */
.verification-modal .auth-modal-header {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  padding: 1.25rem 3rem 1.25rem 1.25rem;
  position: relative;
}

.verification-modal .auth-modal-title {
  justify-self: center;
}

.verification-back-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
  font-size: 1.5rem;
}

.verification-back-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}

.verification-message {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.verification-message strong {
  color: white;
  font-weight: 600;
}

/* 6-Digit Code Input Boxes */
.verification-code-inputs {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.code-input {
  width: 45px;
  height: 55px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: white;
  transition: all 0.3s ease;
  outline: none;
}

.code-input:focus {
  border-color: #6aaa64;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(106, 170, 100, 0.2);
}

.code-input:not(:placeholder-shown) {
  border-color: rgba(255, 255, 255, 0.3);
}

/* Resend Button */
.resend-section {
  text-align: center;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
}

.resend-link-btn {
  background: none;
  border: none;
  color: #6b8afd;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.resend-link-btn:hover:not(:disabled) {
  text-decoration: underline;
  color: #8ba5ff;
}

.resend-link-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Make verification modal content flex to push terms to bottom */
.verification-modal .auth-modal-content {
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.verification-modal .auth-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.verification-modal #verification-form {
  flex: 1;
}

/* Terms Text */
.verification-terms {
  text-align: center;
  padding: 1.25rem 1rem 0;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.verification-terms p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
  margin: 0;
}

.verification-terms .terms-link {
  color: #6b8afd;
  text-decoration: none;
  font-weight: 600;
}

.verification-terms .terms-link:hover {
  text-decoration: underline;
  color: #8ba5ff;
}

/* ===== RECOVERY SECURITY MODAL ===== */
.recovery-security-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.recovery-security-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.recovery-security-modal {
  position: relative;
  width: calc(75% + 1rem);
  max-width: calc(375px + 1rem);
  max-height: 68vh;
  background: #121213;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

.recovery-security-header {
  background: #121213;
  padding: 1.25rem 1.5rem;
  border-radius: 5px 5px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.recovery-security-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
}

.recovery-security-close {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 1;
  padding: 0;
}

.recovery-security-close:hover {
  transform: translateY(-50%) scale(1.05);
}

.recovery-security-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
}

.recovery-security-description {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

.recovery-security-action {
  width: 100%;
  border: none;
  border-radius: 30px;
  padding: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  background: #6ca965;
  color: white;
  box-shadow: 0 4px 12px rgba(108, 169, 101, 0.4);
  transition: all 0.2s ease;
  font-family: inherit;
  line-height: 1;
}

.recovery-security-action.password {
  background: #6ca965;
  box-shadow: 0 4px 12px rgba(108, 169, 101, 0.4);
}

.recovery-security-action.phantom {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
  color: white;
  padding: 0.45rem 0.75rem;
}

.recovery-security-action.phantom.loading {
  padding: 0.45rem 0.75rem;
}

.recovery-security-action:hover:not(.loading) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(108, 169, 101, 0.45);
}

.recovery-security-action.password:hover:not(.loading) {
  box-shadow: 0 6px 16px rgba(108, 169, 101, 0.45);
}

.recovery-security-action.phantom:hover:not(.loading) {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.recovery-security-action.loading {
  opacity: 0.75;
  pointer-events: none;
}

.recovery-security-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
}

.recovery-security-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.recovery-security-action-text {
  font-size: 0.95rem;
}

.recovery-security-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recovery-security-input {
  width: 100%;
  padding: 0.5rem 0.85rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: white;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.recovery-security-input:focus {
  outline: none;
  border-color: #6b8afd;
  box-shadow: 0 0 0 2px rgba(107, 138, 253, 0.15);
}

.recovery-security-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0 1.5rem 1rem;
}

.recovery-security-warning {
  font-size: 0.72rem;
  text-align: center;
  color: #ff5c8d;
  line-height: 1.5;
  padding: 0 1.5rem 1.5rem;
}

.recovery-security-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: block;
  animation: recovery-spin 0.7s linear infinite;
}

@media (max-width: 600px) {
  .recovery-security-modal {
    width: calc(100% - 20px);
    max-width: 100%;
    margin: 10px;
  }

  .recovery-security-header {
    padding: 1.1rem 1.25rem;
  }

  .recovery-security-body {
    padding: 1.25rem;
  }

  .recovery-security-divider {
    margin: 0 1.25rem 0.85rem;
  }

  .recovery-security-warning {
    padding: 0 1.25rem 1.25rem;
  }
}

@keyframes recovery-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile responsiveness for code inputs */
@media (max-width: 480px) {
  .code-input {
    width: 40px;
    height: 50px;
    font-size: 1.2rem;
  }

  .verification-code-inputs {
    gap: 0.35rem;
  }

  .verification-modal .auth-modal-content {
    min-height: 320px;
  }
}

/* ===== RECOVERY KEY MODAL STYLES ===== */
.recovery-key-modal .auth-modal {
  width: calc(75% + 1rem);
  max-width: calc(375px + 1rem);
}

.recovery-key-description {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.recovery-key-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recovery-key-container {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 0.65rem;
  margin-bottom: 1.25rem;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recovery-key-text {
  color: white;
  font-size: 0.9rem;
  line-height: 1.6;
  display: block;
  max-width: 100%;
  margin: 0 auto;
  word-wrap: break-word;
  text-align: center;
  padding: 0 2.5rem;
  transition: filter 0.3s ease;
  font-family: "Courier New", monospace;
}

.recovery-key-text.blurred {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
}

.recovery-copy-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.recovery-copy-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}

.recovery-reveal-btn {
  width: 100%;
  padding: 0.5rem;
  background: #6aaa64;
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1.25rem;
}

.recovery-reveal-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(106, 170, 100, 0.4);
}

.recovery-reveal-btn:active {
  transform: translateY(0);
}

.recovery-reveal-btn.continue-btn {
  background: #6aaa64;
}

.recovery-reveal-btn.continue-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(106, 170, 100, 0.4);
}

.recovery-warning {
  padding: 0.75rem;
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.25);
  border-radius: 5px;
  color: #ffdb6d;
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: left;
}

/* Mobile responsiveness for recovery key */
@media (max-width: 480px) {
  .recovery-key-modal .auth-modal {
    max-width: 100%;
    margin: 1rem;
  }

  .recovery-key-text {
    font-size: 0.85rem;
    padding: 0 2rem;
  }

  .recovery-warning {
    text-align: left;
  }
}

/* Update wallet gate for 3-button layout */
.wallet-gate-overlay .nyt-button-container {
  flex-direction: row;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .wallet-gate-overlay .nyt-button-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .wallet-gate-overlay .nyt-button {
    width: 100%;
  }
}
