/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================
   CSS Variables - Synced with GameConfig.CSS
   ============================================ */
:root {
  /* Font Families */
  --font-main: sans-serif;
  --font-display: 'Ravenhell', serif;

  /* Tile dimensions - responsive */
  --tile-width: clamp(35px, 6.5vh, 55px);
  --tile-height: clamp(35px, 6.5vh, 55px);
  --tile-gap: 0px;

  /* Board styling */
  --board-bg: #18724A;
  --board-surface: rgba(28, 128, 84, 0.4);
  --board-padding: clamp(10px, 2vw, 20px);
  --board-radius: 10px;

  /* Table ambiance */
  --felt-light: #1e8a56;
  --felt-dark: #145a38;
  --vignette-strength: 0.2;

  /* 3D perspective (sync with GameConfig.CSS) */
  --perspective: 1200px;
  --board-rotation: 10deg;
  --level-height: 10px;

  /* Interaction lifts */
  --hover-lift: 8px;
  --select-lift: 25px;

  /* Z-index layers (sync with GameConfig.Z_INDEX) */
  --z-selected: 999999;
  --z-hover: 999998;
  --z-match-animation: 1000000;
  --z-auto-finish: 5000000;
  --z-overlay: 9000000;
  --z-shuffle-overlay: 9100000;

  /* Animation easing */
  --ease-bounce: cubic-bezier(0.18, 0.89, 0.32, 1.28);
  --ease-smooth: cubic-bezier(0.55, 0, 0.1, 1);

  /* Responsive board scaling */
  --board-scale: 1;

  /* Colors - ivory theme */
  --ivory: #fffff8;
  --ivory-side: #c8c8c0;
}

/* ============================================
   Fonts
   ============================================ */
@font-face {
  font-family: 'Ravenhell';
  src: url('../webfonts/ravenhell.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   Base Styles
   ============================================ */
html {
  background-color: var(--board-bg);
  height: 100%;
  overflow: hidden;
  /* Felt texture - layered gradients simulating fabric weave */
  background-image:
    /* Subtle light spot (table center lighting) */
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(40, 160, 100, 0.25) 0%, transparent 70%),
    /* Fine horizontal weave */
    repeating-linear-gradient(0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.03) 2px,
      rgba(0, 0, 0, 0.03) 4px),
    /* Fine vertical weave */
    repeating-linear-gradient(90deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px),
    /* Subtle color variation */
    radial-gradient(circle at 30% 70%, var(--felt-light) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, var(--felt-light) 0%, transparent 50%);
}

body {
  font-family: var(--font-main);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  height: 100%;
  width: 100%;
  /* Mobile Optimizations */
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
}

/* Vignette overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%,
      transparent 40%,
      rgba(0, 0, 0, var(--vignette-strength)) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Ensure app content is above the vignette */
#app {
  position: relative;
  z-index: 1;
}



/* ============================================
   Board Styles
   ============================================ */
.board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  perspective: var(--perspective);
  perspective-origin: 50% 50%;
  padding-bottom: 80px;
  /* Space for fixed auto-finish button */
}

.board-surface {
  position: relative;
  width: calc(8 * (var(--tile-width) + var(--tile-gap)));
  height: calc(8 * (var(--tile-height) + var(--tile-gap)));
  transform: scale(var(--board-scale)) rotateX(var(--board-rotation));
  transform-origin: center top;
  transform-style: preserve-3d;
  transition: transform 0.5s ease-out;
}

/* ============================================
   Header Styles (Top Bar)
   ============================================ */
.game-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.15);
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.game-title {
  display: flex;
  align-items: center;
  line-height: 1;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.level-badge {
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-right {
  display: flex;
  gap: 10px;
}

.header-icon-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
  color: #061B43;
  background-color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.header-icon-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-icon-btn:active {
  transform: scale(0.95);
}

.trophy-btn {
  color: #FF9900;
}

.user-btn {
  color: #5588EE;
}

/* ============================================
   Tile Base Styles
   ============================================ */
.tile {
  position: absolute;
  width: var(--tile-width);
  height: var(--tile-height);
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  overflow: visible;
  touch-action: manipulation;
  border-radius: 8px;
  /* Use CSS variable for base z-index */
  z-index: var(--base-z-index);
  /* Use smooth easing for exit to prevent dipping */
  transition: transform 0.25s var(--ease-smooth), z-index 0s 0.25s;
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--level) * var(--level-height)));
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Tile Face (::before pseudo-element) */
.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--tile-image);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-color: var(--ivory);
  border-radius: 6px;
  transform: translateZ(0);
  box-shadow:
    0 1px 0 var(--ivory-side),
    0 2px 0 var(--ivory-side),
    0 3px 0 var(--ivory-side),
    0 4px 0 var(--ivory-side),
    0 5px 0 var(--ivory-side),
    0 7px 10px rgba(0, 0, 0, 0.25);
  filter: brightness(calc(1 - var(--depth-darkness, 0) * 1.2));
  /* Use smooth easing for exit to prevent dipping */
  transition: all 0.25s var(--ease-smooth);
  pointer-events: none;
  z-index: 0;
}

/* Tile Bevel and Reflection (::after pseudo-element) */
.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  transform: translateZ(0.1px);
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  pointer-events: none;
  transition: all 0.25s var(--ease-smooth);
}

/* ============================================
   Tile States
   ============================================ */

/* Uncovered tile - enhanced depth */
.tile:not(.covered)::before {
  box-shadow:
    0 1px 0 var(--ivory-side),
    0 2px 0 var(--ivory-side),
    0 3px 0 var(--ivory-side),
    0 4px 0 var(--ivory-side),
    0 5px 0 var(--ivory-side),
    0 8px 12px rgba(0, 0, 0, 0.2);
}

/* Tile Front Layer (Illustration) */
.tile .tile-front {
  position: absolute;
  inset: 0;
  background-image: var(--tile-front-image, none);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 5;
  /* Above base ::before (0) */
  border-radius: 6px;
  /* Ensure it moves with the tile 3D transforms */
  transform: translateZ(0.1px);
}

/* Covered tile */
.tile.covered {
  cursor: not-allowed;
  /* Apply filter here so it affects BOTH base and front layers */
  filter: grayscale(1) brightness(0.8);
}

.tile.covered::before {
  background-color: var(--ivory-side);
  box-shadow:
    0 1px 0 #a8a8a0,
    0 2px 0 #a8a8a0,
    0 3px 0 #a8a8a0,
    0 4px 0 #a8a8a0,
    0 5px 0 #a8a8a0,
    0 6px 8px rgba(0, 0, 0, 0.35);
}

.tile.selected {
  z-index: var(--z-selected);
  transform: translateZ(calc(var(--level) * var(--level-height) + var(--select-lift)));
  transition: transform 0.25s var(--ease-bounce), z-index 0s;
}

.tile.selected::before {
  box-shadow:
    0 1px 0 var(--ivory-side),
    0 2px 0 var(--ivory-side),
    0 3px 0 var(--ivory-side),
    0 4px 0 var(--ivory-side),
    0 5px 0 var(--ivory-side),
    0 25px 40px rgba(0, 0, 0, 0.3);
  filter: brightness(1.1);
}

.tile.selected::after {
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.6) 0%, transparent 60%);
}

/* Hover state (uncovered tiles only) */
.tile:not(.covered):hover {
  z-index: var(--z-hover);
  transform: translateZ(calc(var(--level) * var(--level-height) + var(--hover-lift)));
  transition: transform 0.25s var(--ease-bounce), z-index 0s;
}

.tile:not(.covered):hover::before {
  transition: all 0.25s var(--ease-bounce);
  box-shadow:
    0 1px 0 var(--ivory-side),
    0 2px 0 var(--ivory-side),
    0 3px 0 var(--ivory-side),
    0 4px 0 var(--ivory-side),
    0 5px 0 var(--ivory-side),
    0 14px 22px rgba(0, 0, 0, 0.2);
  filter: brightness(1.05);
}

.tile:not(.covered):hover::after {
  transition: all 0.25s var(--ease-bounce);
}

/* Active state for better touch feedback */
.tile:not(.covered):active {
  transform: translateZ(calc(var(--level) * var(--level-height) + var(--hover-lift) - 2px)) scale(0.96);
  transition: transform 0.05s ease-out;
}

/* ============================================
   Tile Animations
   ============================================ */

/* Match Success Animation */
@keyframes match-success {
  0% {
    transform: translateZ(calc(var(--level) * var(--level-height))) scale(1);
    opacity: 1;
  }

  30% {
    transform: translateZ(calc(var(--level) * var(--level-height) + 60px)) scale(1.1);
    opacity: 1;
  }

  100% {
    transform: translateZ(calc(var(--level) * var(--level-height) + 200px)) scale(0.8);
    opacity: 0;
    visibility: hidden;
  }
}

.tile.match-success {
  animation: match-success 0.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards;
  z-index: 1000000;
}

/* Faster animation for auto-finish */
.auto-finishing .tile.match-success {
  animation-duration: 0.15s;
}

/* Match Failure Animation */
@keyframes match-failure {

  0%,
  100% {
    transform: translateZ(calc(var(--level) * var(--level-height))) translateX(0);
  }

  20%,
  60% {
    transform: translateZ(calc(var(--level) * var(--level-height))) translateX(-10px);
  }

  40%,
  80% {
    transform: translateZ(calc(var(--level) * var(--level-height))) translateX(10px);
  }
}

.tile.match-failure {
  animation: match-failure 0.4s ease-in-out;
}

/* Shake Animation for Locked Tiles */
@keyframes shake {

  0%,
  100% {
    transform: translateZ(calc(var(--level) * var(--level-height))) rotate(0deg);
  }

  25% {
    transform: translateZ(calc(var(--level) * var(--level-height))) rotate(-3deg);
  }

  75% {
    transform: translateZ(calc(var(--level) * var(--level-height))) rotate(3deg);
  }
}

.tile.locked-shake {
  animation: shake 0.3s ease-in-out;
  cursor: not-allowed;
}

/* Tile Leave Transition */
.tile-leave-active {
  transition: all 0.4s cubic-bezier(0.55, 0, 0.1, 1);
}

.tile-leave-to {
  opacity: 0;
  transform: scale(0.5) translateY(-20px);
}

/* ============================================
   Shuffle Animations
   ============================================ */
@keyframes shuffle-out {
  0% {
    transform: translateZ(0) scale(1) rotate(0deg);
    opacity: 1;
  }

  50% {
    transform: translateZ(100px) scale(0.5) rotate(180deg);
    opacity: 0.5;
  }

  100% {
    transform: translateZ(200px) scale(0) rotate(360deg);
    opacity: 0;
  }
}

@keyframes shuffle-in {
  0% {
    transform: translateZ(200px) scale(0) rotate(-360deg);
    opacity: 0;
  }

  50% {
    transform: translateZ(100px) scale(0.5) rotate(-180deg);
    opacity: 0.5;
  }

  100% {
    transform: translateZ(0) scale(1) rotate(0deg);
    opacity: 1;
  }
}

.tile.shuffling-out {
  animation: shuffle-out 0.4s ease-in forwards;
}

.tile.shuffling-in {
  animation: shuffle-in 0.4s ease-out forwards;
}

.shuffle-overlay {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(50, 115, 220, 0.9);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  font-weight: bold;
  z-index: var(--z-shuffle-overlay);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  font-family: var(--font-display);
}

/* ============================================
   Game Overlays
   ============================================ */
.game-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: var(--z-overlay);
}

/* ============================================
   Modal Shared Styles
   ============================================ */
.game-modal {
  position: relative;
  width: 90%;
  max-width: 420px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: modal-in 0.35s var(--ease-bounce);
}

@keyframes modal-in {
  0% {
    opacity: 0;
    transform: scale(0.85) translateY(30px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 2rem 2rem;
  gap: 12px;
}

.modal-top h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: #061B43;
  letter-spacing: 1px;
}

.modal-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.modal-bottom {
  background: #FFFFFF;
  padding: 1.5rem 2rem 2rem;
  text-align: center;
}

.modal-bottom p {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.modal-action-btn {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background-color: #061B43;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.modal-action-btn:hover {
  background-color: #0a2a5e;
  transform: translateY(-2px);
}

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

/* Victory Modal */
.victory-top {
  background: linear-gradient(135deg, #22AA66, #33cc77);
}

.victory-top .modal-icon-circle {
  color: #22AA66;
}

/* Defeat Modal */
.defeat-top {
  background: linear-gradient(135deg, #EE4433, #f47066);
}

.defeat-top .modal-icon-circle {
  color: #EE4433;
}

/* ============================================
   Auto-Finish Button
   ============================================ */
.button-auto-finish {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-auto-finish);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  background-color: #FF9900;
  color: #061B43;
  border: none;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
  font-family: var(--font-display);
}

.button-auto-finish i {
  font-size: 1.1rem;
}

.button-auto-finish:hover {
  transform: translateX(-50%) translateY(-2px);
  background-color: #ffaa33;
}

.button-auto-finish:active {
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   Game Over / Victory overlay styles
   ============================================ */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* ============================================
   Responsive Styles
   ============================================ */

/* Tablet - 768px */
@media (max-width: 768px) {
  :root {
    --tile-width: 45px;
    --tile-height: 45px;
    --level-height: 8px;
    --hover-lift: 6px;
    --select-lift: 20px;
  }

  .game-header {
    padding: 10px 16px;
  }

  .logo-img {
    height: 26px;
  }
}

/* Mobile - 600px */
@media (max-width: 600px) {
  :root {
    --tile-width: 38px;
    --tile-height: 38px;
    --level-height: 6px;
    --hover-lift: 4px;
    --select-lift: 15px;
    --board-rotation: 15deg;
  }

  .board {
    gap: 8px;
    margin-top: 60px;
    /* Space for fixed header elements */
    margin-bottom: 20px;
  }

  .game-modal {
    width: 92%;
  }

  .modal-top h1 {
    font-size: 1.8rem;
  }

  .modal-bottom p {
    font-size: 0.95rem;
  }
}

/* Small Mobile - 480px */
@media (max-width: 480px) {
  :root {
    --tile-width: 36px;
    --tile-height: 36px;
    --level-height: 6px;
    --hover-lift: 4px;
    --select-lift: 12px;
    --perspective: 800px;
  }

  .board {
    margin-top: 50px;
    gap: 4px;
  }

  .shuffle-overlay {
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
  }
}

/* Landscape / Small Height - Aggressive scaling for limited vertical space */
@media (max-height: 600px) {
  .board {
    margin-top: 50px;
    margin-bottom: 10px;
  }
}

/* Very Small Height (iPhone landscape, etc.) */
@media (max-height: 450px) {
  .board {
    margin-top: 45px;
    margin-bottom: 5px;
    gap: 4px;
  }

  .game-header {
    padding: 8px 16px;
  }

  .game-title {
    font-size: 1.2rem;
  }

  .button-auto-finish {
    bottom: 15px;
    height: 36px;
    font-size: 0.8rem;
  }
}

/* Reduce animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {

  .tile,
  .tile::before,
  .tile::after {
    transition: none;
  }

  .tile.match-success,
  .tile.match-failure,
  .tile.shuffling-out,
  .tile.shuffling-in {
    animation: none;
  }
}

/* ============================================
   New Modals Styles
   ============================================ */

/* Leaderboard Specifics */
.leaderboard-modal {
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.leaderboard-content {
  overflow-y: auto;
  flex: 1;
  padding: 0 0 1.5rem;
  /* Reset padding for list */
}

.leaderboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.leaderboard-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #eee;
  font-size: 1rem;
  color: #333;
}

.leaderboard-list li:last-child {
  border-bottom: none;
}

.leaderboard-list li.current-user {
  background-color: #e6f0ff;
  font-weight: bold;
  color: #061B43;
}

.leaderboard-list .rank {
  font-weight: 800;
  width: 40px;
  color: #888;
}

.leaderboard-list .current-user .rank {
  color: #061B43;
}

.leaderboard-list .name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
}

.leaderboard-list .level {
  font-weight: 600;
  color: #22AA66;
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #333;
  z-index: 10;
  transition: background 0.2s;
}

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

/* Inputs */
.modal-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-main);
  margin-bottom: 8px;
  outline: none;
  transition: border-color 0.2s;
}

.modal-input:focus {
  border-color: #061B43;
}

.error-text {
  color: #EE4433;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  margin-top: -4px;
}

/* Separator */
.separator {
  height: 1px;
  background-color: #eee;
  margin: 1.5rem 0;
  width: 100%;
}

/* User Code Section */
.user-code-section {
  text-align: center;
}

.user-code-section h3 {
  font-size: 1.1rem;
  color: #061B43;
  margin-bottom: 0.5rem;
}

.falc-text {
  font-size: 0.9rem !important;
  color: #666;
  margin-bottom: 1rem !important;
  line-height: 1.4;
}

.user-code-display {
  padding: 0.8rem;
  background: #f8f9fa;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border: 1px dashed #ccc;
  margin-bottom: 0.5rem;
}

.user-code-display strong {
  color: #061B43;
  font-family: monospace;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.copy-btn {
  background: none;
  border: none;
  color: #5588EE;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  transition: transform 0.1s;
}

.copy-btn:active {
  transform: scale(0.9);
}

/* Text Button */
.modal-text-btn {
  background: none;
  border: none;
  color: #888;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 1rem;
  font-family: var(--font-main);
}

.modal-text-btn:hover {
  color: #555;
}

/* Loading Spinner */
.loading-spinner {
  padding: 2rem;
  color: #888;
  font-style: italic;
  text-align: center;
}

/* Modal Headers Colors */
.falc-top {
  background: linear-gradient(135deg, #11998e, #38ef7d);
}

.falc-top .modal-icon-circle {
  color: #11998e;
}

.user-top {
  background: linear-gradient(135deg, #5588EE, #77ccff);
}

.user-top .modal-icon-circle {
  color: #5588EE;
}

.leaderboard-top {
  background: linear-gradient(135deg, #FF9900, #ffcc33);
}

.leaderboard-top .modal-icon-circle {
  color: #FF9900;
}

.recover-top {
  background: linear-gradient(135deg, #8E44AD, #9B59B6);
}

.recover-top .modal-icon-circle {
  color: #8E44AD;
}

/* Profile Specifics */
.profile-name {
  font-size: 1.8rem;
  color: #061B43;
  margin-bottom: 0.2rem;
  font-weight: 800;
}

.profile-level {
  font-size: 1.1rem;
  color: #22AA66;
  font-weight: 600;
  margin-bottom: 2rem;
}

.secondary-btn {
  background-color: #e0e0e0;
  color: #333;
  font-size: 0.85rem;
  padding: 10px 18px;
}

.secondary-btn:hover {
  background-color: #d0d0d0;
  color: #000;
  transform: translateY(-2px);
}

/* ============================================
   Toast Notification
   ============================================ */
.toast-container {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #22AA66;
  /* Green success color matching theme */
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10000000;
  /* Very high z-index to be above modals */
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 1rem;
  pointer-events: none;
  /* Let clicks pass through */
}

.toast-container i {
  font-size: 1.4rem;
}

.toast-fade-enter-active,
.toast-fade-leave-active {
  transition: all 0.3s ease;
}

.toast-fade-enter-from,
.toast-fade-leave-to {
  opacity: 0;
  transform: translate(-50%, -20px);
}

/* ============================================
   Profile Header Styles
   ============================================ */
.profile-name-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 5px;
}

.edit-name-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #FFFFFF;
  font-size: 1.4rem;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-name-icon-btn:hover {
  background-color: rgba(85, 136, 238, 0.1);
  transform: scale(1.1);
}

.profile-level {
  font-size: 1.1rem;
  color: #22AA66;
  font-weight: 600;
  margin-bottom: 2rem;
}