* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #93c9d5 0%, #c9b4e8 25%, #f79ab5 50%, #ffd98d 75%, #ffe0fa 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  overflow: hidden;
  font-family: 'Courier New', 'Consolas', monospace;
  color: #fff3ec;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

h1, h2, h3, .nav-brand {
  font-family: 'Press Start 2P', 'Courier New', monospace;
}

.carousel {
  display: flex;
  /* Transition handled by JavaScript for better control */
  height: 100vh;
  width: 100%;
  will-change: transform;
}

.carousel-slide {
  position: relative;
  min-width: 100vw;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  overflow: visible;
  pointer-events: none !important;  /* CRITICAL: Prevent slide from blocking clicks to children */
}

/* Disable interaction with cloned slides to prevent duplicate event handlers */
.carousel-clone {
  pointer-events: none !important;
}

.carousel-clone * {
  pointer-events: none !important;
}

/* SVG Container */
.tent-svg {
  position: absolute;
  height: 90vh;
  width: auto;
  pointer-events: none;
  top: 42%;  /* Moved up from 50% to clear buttons below */
  left: 50%;
  transform: translate(-50%, -50%);
  overflow: visible;
  max-width: none;
}

/* Image styles - now targeting SVG groups */
.tent,
.sparkles,
.charm,
.flag,
.wheel {
  pointer-events: none;
}

/* Clickable elements - CRITICAL FIX: Must override parent pointer-events: none */
.balloon,
.gems,
#play_balloon,
#play_gems,
g#play_balloon,
g#play_gems,
[id="play_balloon"],
[id="play_gems"],
.clickable {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 200 !important;
  opacity: 1 !important;
  position: relative !important;
}

/* CRITICAL FIX: Children must also be clickable, NOT none! */
.balloon *,
.gems *,
#play_balloon *,
#play_gems *,
g#play_balloon *,
g#play_gems *,
.clickable * {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* CRITICAL: Ensure SVG elements are clickable AND preserve their colors */
#play_balloon,
#play_balloon *,
#play_gems,
#play_gems *,
g#play_balloon,
g#play_balloon *,
g#play_gems,
g#play_gems * {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 250 !important;  /* Ensure gems/balloon appear above tent */
  /* DO NOT set fill property - let inline SVG styles handle colors */
}

/* Arrow groups in tent SVGs */
.arrow-left,
.arrow-right,
g.arrow-left,
g.arrow-right,
#arrow_left,
#arrow_right {
  pointer-events: auto !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, filter 0.2s ease;
  transform-origin: center center;
  position: relative;
  z-index: 50 !important;
}

.arrow-left:hover,
.arrow-right:hover,
g.arrow-left:hover,
g.arrow-right:hover,
#arrow_left:hover,
#arrow_right:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 10px rgba(199, 153, 232, 0.5));
}

.clickable {
  pointer-events: auto;
  cursor: pointer; /* optional, shows a hand icon */
}

/* Animation: Float - for sparkles and charm only */
.sparkles,
.charm,
#gem_charm,  /* Gem shop charm */
#gem_sparkles,
#gem_parkles,  /* Typo in HTML, but animate it anyway */
#gacha_sparkles,
#play_sparkles,
#wheel_sparkles {
  animation: float 2.5s ease-in-out infinite !important;
}

/* Flag waving animation */
.flag,
#play_flag {
  animation: flagWave 1.5s ease-in-out infinite !important;
  transform-origin: left center;
}

/* Balloon floats only on hover */
.balloon:hover,
#play_balloon:hover,
g#play_balloon:hover {
  animation: float 2s ease-in-out infinite !important;
}

/* Gems bounce on hover - apply to parent and ALL descendants at all levels */
.gems:hover,
.gems:hover *,
#play_gems:hover,
#play_gems:hover *,
#play_gems:hover > *,
#play_gems:hover g,
#play_gems:hover g *,
g#play_gems:hover,
g#play_gems:hover *,
g#play_gems:hover > *,
g#play_gems:hover g,
g#play_gems:hover g * {
  animation: gemBounce 1s ease-in-out infinite !important;
  animation-fill-mode: both !important;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes gemBounce {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes flagWave {
  0%, 100% {
    transform: translateX(0px) scaleX(1);
  }
  50% {
    transform: translateX(1.5px) scaleX(0.99);
  }
}

/* Animation: Sway (for balloon) - up and down on hover */
.sway {
  transform-origin: bottom center;
  transition: animation 0.3s;
  cursor: pointer;
  z-index: 10;
  pointer-events: auto !important;
}

.sway:hover {
  animation: balloonFloat 2s ease-in-out infinite;
}

@keyframes balloonFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Animation: Wave (for flag) */
.wave {
  animation: wave 2s ease-in-out infinite;
  transform-origin: left center;
}

@keyframes wave {
  0%, 100% {
    transform: skewX(0deg);
  }
  25% {
    transform: skewX(2deg);
  }
  75% {
    transform: skewX(-2deg);
  }
}

/* Wheel (hover spin, speed up on click) */
.wheel {
  z-index: 10;
  cursor: pointer;
  pointer-events: auto !important;
  max-height: 30vh;
  max-width: 30vw;
  transform-origin: 50% 50%;
  transform-box: fill-box;
}

.wheel.spin {
  animation: spin 2s linear infinite;
}

.wheel.fast {
  animation-duration: 0.5s !important;
}

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

/* Layering */
.tent {
  z-index: 2;
  pointer-events: none;
}
.sparkles {
  z-index: 15;
  pointer-events: none;
}
.charm,
.flag {
  z-index: 3;
  pointer-events: none;
}
.balloon,
.gems {
  z-index: 100;
}
.wheel {
  z-index: 10;
}

/* Top Navigation Bar */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: linear-gradient(180deg, #d4c4f0 0%, #c9b4e8 100%);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 2rem;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(91, 76, 98, 0.3);
  border-bottom: none;
  border-radius: 0 0 20px 20px;
}

.nav-brand {
  font-size: 1.2rem;
  font-weight: bold;
  color: #5b4c62;
  text-shadow: 2px 2px 0 #f79ab5;
  letter-spacing: 1px;
  justify-self: start;
}

.nav-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  justify-self: center;
}

.user-stats {
  justify-self: end;
}

.nav-link {
  background: linear-gradient(180deg, #fff9f5 0%, #fff3ec 100%);
  border: none;
  color: #5b4c62;
  font-size: 1rem;
  font-weight: bold;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(91, 76, 98, 0.2);
  font-family: 'Courier New', monospace;
  border-radius: 20px;
}

.nav-link:hover {
  background: linear-gradient(180deg, #ffe8f7 0%, #ffe0fa 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 154, 181, 0.3);
}

.nav-link.active {
  background: linear-gradient(180deg, #ffa8c5 0%, #f79ab5 100%);
  color: #fff3ec;
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(247, 154, 181, 0.4), inset 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.user-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 1.1rem;
  align-items: center;
}

.stat-item {
  font-weight: bold;
  color: #5b4c62;
  background: linear-gradient(180deg, #ffe5a8 0%, #ffd98d 100%);
  padding: 0.5rem 1rem;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 217, 141, 0.3);
  border-radius: 25px;
}

/* Remove background from userDisplay since it contains the login button */
#userDisplay {
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.user-btn {
  background: #ffd98d !important;
  background-image: none !important;
  background-clip: padding-box !important;
  border: 3px solid #5b4c62 !important;
  color: #5b4c62 !important;
  font-size: 1rem;
  font-weight: bold;
  padding: 0.6rem 1rem; /* Slightly more padding to make button bigger than stat-items */
  cursor: pointer !important;
  pointer-events: auto !important;
  box-shadow: 0 4px 15px rgba(255, 217, 141, 0.3) !important; /* Match stat-item shadow */
  font-family: 'Courier New', monospace;
  transition: all 0.3s ease;
  border-radius: 25px;
  outline: none !important;
  box-sizing: border-box !important;
  z-index: 1001;
  position: relative;
  display: inline-block;
  -webkit-background-clip: padding-box !important;
  margin: 0; /* Remove any default margins */
  line-height: normal; /* Prevent line-height from affecting size */
}

.user-btn:hover {
  background: #ffebb8 !important;
  background-image: none !important;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(91, 76, 98, 0.2) !important;
}

.music-btn {
  background: linear-gradient(180deg, #c9b4e8 0%, #b39fd3 100%);
  border: none;
  color: #fff3ec;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(201, 180, 232, 0.3);
  font-family: 'Courier New', monospace;
  font-weight: bold;
  border-radius: 20px;
  font-size: 1.2rem;
  margin-right: 1rem;
}

.music-btn:hover {
  background: linear-gradient(180deg, #d9c9f5 0%, #c9b4e8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 180, 232, 0.4);
}

.music-btn.muted {
  opacity: 0.5;
  background: linear-gradient(180deg, #999 0%, #777 100%);
}

.music-control-container {
  position: relative;
  display: inline-block;
}

.music-popup {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: linear-gradient(135deg, #fff9f5 0%, #fff3ec 100%);
  padding: 1rem;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(91, 76, 98, 0.3);
  min-width: 320px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.music-control-container:hover .music-popup {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}


/* Views */
.view {
  display: none;
  padding-top: 80px;
  height: 100vh;
  overflow-y: auto;
}

.view.active {
  display: block;
}

#mainView {
  overflow: hidden;
  position: relative;
}

#galleryView,
#profileView {
  overflow-y: auto;
  overflow-x: hidden;
}

/* Navigation buttons for carousel */
.nav-btn {
  position: absolute;
  bottom: 8%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 5;
  transition: all 0.3s;
  width: auto;
  height: 25%;
  max-height: 280px;
  min-height: 150px;
  image-rendering: pixelated;
  pointer-events: auto;
}

.nav-btn img {
  height: 100%;
  width: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5));
}

.nav-btn:hover {
  transform: scale(1.05);
}

.nav-btn:hover img {
  filter: drop-shadow(0 6px 12px rgba(199, 153, 232, 0.6));
}

#prevBtn {
  left: 2%;
}

#nextBtn {
  right: 2%;
}

/* Tent Info Sections - removed top section, only bottom remains */

.tent-info-bottom {
  position: absolute;
  bottom: 14%;
  left: 50%;
  transform: translateX(-50%);
  background: transparent;
  padding: 0;
  border: none;
  text-align: center;
  z-index: 15;
  width: 75%;
  max-width: 500px;
  pointer-events: auto;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.5rem;
}

.action-btn {
  background: #e889a9;
  border: none;
  color: #fff3ec;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.8rem 2rem;
  cursor: pointer;
  margin-top: 1rem;
  pointer-events: auto !important;  /* Override parent pointer-events: none */
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(232, 137, 169, 0.4), inset 0 -2px 10px rgba(0, 0, 0, 0.1);
  font-family: 'Press Start 2P', 'Courier New', monospace;
  text-transform: uppercase;
  line-height: 1.4;
  width: 100%;
  border-radius: 30px;
}

.action-btn:hover:not(:disabled) {
  background: #f79ab5;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(232, 137, 169, 0.5), inset 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.action-btn:active:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(232, 137, 169, 0.4), inset 0 2px 10px rgba(0, 0, 0, 0.15);
}

.action-btn:disabled {
  background: #a8e8ff;
  color: #5b4c62;
  cursor: pointer;
  opacity: 1;
  box-shadow: 0 4px 15px rgba(168, 232, 255, 0.3);
  pointer-events: auto;
}

.cooldown-text {
  font-size: 0.85rem;
  color: #ffffff;
  margin: 0;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  min-height: 1.2rem;
}

/* Gallery View */
.gallery-container {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  background: transparent;
}

.gallery-header {
  margin-bottom: 2rem;
}

.gallery-header h1 {
  margin: 0 0 1rem 0;
  font-size: 2rem;
  color: #5b4c62;
  text-shadow: 3px 3px 0 #ffd98d;
  line-height: 1.5;
}

.gallery-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.gallery-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.gallery-sort-row {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(91, 76, 98, 0.1);
}

.sort-control label {
  color: #5b4c62;
  font-weight: bold;
  font-size: 0.9rem;
  white-space: nowrap;
}

.styled-select {
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  border: 2px solid #5dd4de;
  background: #fff3ec;
  color: #5b4c62;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 15px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%235dd4de' d='M0 0l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 10px;
  min-width: 140px;
}

.styled-select:hover {
  border-color: #4ebfcc;
  box-shadow: 0 2px 8px rgba(93, 212, 222, 0.3);
}

.styled-select:focus {
  outline: none;
  border-color: #4ebfcc;
  box-shadow: 0 0 0 3px rgba(93, 212, 222, 0.2);
}

.styled-select option {
  background: #fff3ec;
  color: #5b4c62;
  padding: 0.5rem;
}

.filter-btn {
  background: linear-gradient(180deg, #5dd4de 0%, #4ebfcc 100%);
  border: none;
  color: #fff3ec;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(78, 191, 204, 0.3);
  font-family: 'Courier New', monospace;
  font-weight: bold;
  border-radius: 20px;
}

.filter-btn:hover {
  background: linear-gradient(180deg, #6ddeea 0%, #5dd4de 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(78, 191, 204, 0.4);
}

.filter-btn.active {
  background: linear-gradient(180deg, #d9c9f5 0%, #c9b4e8 100%);
  color: #fff3ec;
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(201, 180, 232, 0.5), inset 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.card-item {
  background: linear-gradient(135deg, #fff9f5 0%, #fff3ec 100%);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  box-shadow: 0 6px 20px rgba(91, 76, 98, 0.2);
  border-radius: 20px;
}

.card-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(91, 76, 98, 0.3);
}

.card-item.common {
  background: linear-gradient(135deg, #d8e5b3 100%, #ade9ff 100%);
}

.card-item.rare {
  background: linear-gradient(135deg, #a8e8ff 100%, #8fd7ea 100%);
}

.card-item.epic {
  background: linear-gradient(135deg, #d9c9f5 100%, #c9b4e8 100%);
}

.card-item.legendary {
  background: linear-gradient(135deg, #ffe5a8 100%, #ffd98d 100%);
  box-shadow: 0 8px 25px rgba(255, 217, 141, 0.5), 0 0 30px rgba(255, 217, 141, 0.3);
}

.card-placeholder {
  width: 100%;
  aspect-ratio: 3.6715/5.159;  /* Real card dimensions: 3.6715" x 5.159" */
  background: linear-gradient(135deg, #fff9f5 0%, #fff3ec 100%);
  border: none;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border-radius: 4.85%;  /* 0.1779" radius / 3.6715" width = 4.85% */
  box-shadow: inset 0 2px 10px rgba(91, 76, 98, 0.1);
}

.card-name {
  font-weight: bold;
  margin: 0.5rem 0 0.1rem 0;
  font-size: 1rem;
  color: #5b4c62;
}

.card-era {
  font-size: 0.9rem;
  color: #5b4c62;
  margin: 0.2rem 0 2.5rem 0;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(201, 180, 232, 0.3) 0%, rgba(147, 201, 213, 0.3) 100%);
  padding: 0.3rem 0.6rem;
  border-radius: 10px;
  display: inline-block;
}

.card-rarity {
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: bold;
  color: #5b4c62;
}

.card-count {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: linear-gradient(135deg, #6b5c72 0%, #5b4c62 100%);
  color: #ffd98d;
  padding: 0.35rem 0.7rem;
  border: none;
  font-size: 0.85rem;
  font-weight: bold;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(91, 76, 98, 0.3);
}

.duplicate-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: linear-gradient(135deg, #ffa8c5 0%, #f79ab5 100%);
  color: #fff3ec;
  padding: 0.35rem 0.7rem;
  border: none;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(247, 154, 181, 0.3);
}

.convert-gem-btn {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: linear-gradient(135deg, #fff3ec 100%, #fff3ec 100%);
  border: none;
  color: #fff3ec;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 217, 141, 0.4);
  z-index: 10;
  border-radius: 20px;
}

.convert-gem-btn:hover {
  background: linear-gradient(135deg, #ffd98d 0%, #f7cd84 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 217, 141, 0.5);
}

/* Profile View */
.profile-container {
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
  background: transparent;
}

.profile-container h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #5b4c62;
  text-shadow: 3px 3px 0 #ffd98d;
  line-height: 1.5;
}

.profile-section {
  background: linear-gradient(135deg, #fff9f5 0%, #fff3ec 100%);
  padding: 2rem;
  margin-bottom: 2rem;
  border: none;
  box-shadow: 0 6px 20px rgba(91, 76, 98, 0.2);
  border-radius: 25px;
}

.profile-section h2 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #5b4c62;
  text-shadow: 2px 2px 0 #f79ab5;
  line-height: 1.6;
}

.profile-info p {
  margin: 0.75rem 0;
  font-size: 1.1rem;
  color: #5b4c62;
}

/* Character Creator */
.character-creator {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.character-preview {
  flex: 0 0 250px;
}

.character-display {
  width: 250px;
  height: 350px;
  background: linear-gradient(180deg, #c9b4e8 0%, #b39fd3 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(91, 76, 98, 0.3);
  border: 4px solid #fff3ec;
}

.character-options {
  flex: 1;
  min-width: 300px;
}

.option-group {
  margin-bottom: 1.5rem;
}

.option-group h3 {
  font-size: 1rem;
  color: #5b4c62;
  margin-bottom: 0.75rem;
  font-weight: bold;
}

.color-options,
.style-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.color-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid #5b4c62;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(91, 76, 98, 0.2);
}

.color-btn:hover,
.color-btn.active {
  transform: scale(1.1);
  border-width: 4px;
  box-shadow: 0 4px 12px rgba(91, 76, 98, 0.4);
}

.style-btn {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(180deg, #5dd4de 0%, #4ebfcc 100%);
  border: none;
  border-radius: 15px;
  color: #fff3ec;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(78, 191, 204, 0.3);
}

.style-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(78, 191, 204, 0.4);
}

.style-btn.active {
  background: linear-gradient(180deg, #f79ab5 0%, #f08fa9 100%);
  box-shadow: 0 4px 12px rgba(247, 154, 181, 0.4);
}

.friends-list {
  display: grid;
  gap: 1rem;
}

.placeholder-text {
  color: #5b4c62;
  font-style: italic;
  opacity: 0.7;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(91, 76, 98, 0.85);
  backdrop-filter: blur(5px);
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

#packAnimationModal.modal {
  background-color: rgba(91, 76, 98, 0.95);
  backdrop-filter: blur(10px);
}

.modal-content {
  background: linear-gradient(135deg, #fff9f5 0%, #fff3ec 100%);
  padding: 2.5rem;
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  border: none;
  box-shadow: 0 10px 40px rgba(91, 76, 98, 0.4);
  border-radius: 30px;
}

#packAnimationModal .modal-content {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  max-width: 100%;
  max-height: 100%;
}

#cardModal .modal-content {
  background: rgba(255, 255, 255, 0.90);
}

.card-modal-rarity {
  font-size: 1.2rem;
  font-weight: bold;
  text-align: left;
  margin-top: auto !important;
  margin-bottom: 1rem !important;
}

/* Custom Scrollbar Styling */
.modal-content::-webkit-scrollbar {
  width: 12px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(201, 180, 232, 0.2);
  border-radius: 10px;
  margin: 10px 0;
}

.modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d9c9f5 0%, #c9b4e8 100%);
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #e9d9ff 0%, #d9c9f5 100%);
}

/* Firefox */
.modal-content {
  scrollbar-width: thin;
  scrollbar-color: #c9b4e8 rgba(201, 180, 232, 0.2);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  color: #5b4c62;
  cursor: pointer;
  transition: color 0.1s;
  font-weight: bold;
}

.close-modal:hover {
  color: #f79ab5;
}

.modal-content h2 {
  margin-top: 0;
  font-size: 1.5rem;
  color: #5b4c62;
  text-shadow: 3px 3px 0 #ffd98d;
  line-height: 1.6;
}

/* Shop Items */
.shop-items {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.shop-item {
  background: linear-gradient(135deg, #ffeaff 0%, #ffe0fa 100%);
  padding: 2.5rem;
  text-align: center;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(255, 224, 250, 0.4);
  border-radius: 25px;
  flex: 0 1 280px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
}

.shop-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 224, 250, 0.5);
}

.shop-item h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #5b4c62;
  text-shadow: 2px 2px 0 #f79ab5;
  line-height: 1.6;
}

.pack-description {
  color: #5b4c62;
  margin-top: auto;
  margin-bottom: 1rem;
}

.pack-image {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
  image-rendering: pixelated;
}

.pack-cost {
  font-size: 1.3rem;
  font-weight: bold;
  color: #5b4c62;
  background: linear-gradient(135deg, #ffe5a8 0%, #ffd98d 100%);
  padding: 0.9rem 2rem;
  border: none;
  margin: 0 auto;
  display: block;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(255, 217, 141, 0.4);
  width: fit-content;
}

.pack-cost.clickable {
  cursor: pointer;
  transition: all 0.3s ease;
}

.pack-cost.clickable:hover {
  background: linear-gradient(135deg, #ffd98d 0%, #f7cd84 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 217, 141, 0.5);
}

.pack-cost.clickable:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 217, 141, 0.4);
}

.buy-btn {
  background: linear-gradient(180deg, #ffa8c5 0%, #f79ab5 100%);
  border: none;
  color: #fff3ec;
  padding: 0.9rem 2.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(247, 154, 181, 0.4);
  font-family: 'Courier New', monospace;
  border-radius: 30px;
}

.buy-btn:hover {
  background: linear-gradient(180deg, #ff98ba 0%, #e889a9 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(247, 154, 181, 0.5);
}

.buy-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(247, 154, 181, 0.4);
}

/* Pack Opening Animation */
.pack-opening-image {
  max-width: 700px;
  max-height: 85vh;
  width: auto;
  height: auto;
  image-rendering: pixelated;
  animation: packPop 1.5s ease-out forwards;
  filter: drop-shadow(0 15px 40px rgba(255, 217, 141, 0.9));
  z-index: 3000;
  display: block;
  margin: 0 auto;
  overflow: visible;
}

@keyframes packPop {
  0% {
    transform: scale(0.3) rotate(-15deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.15) rotate(8deg);
    opacity: 1;
  }
  80% {
    transform: scale(0.9) rotate(-3deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Pack Opening */
.pack-opening {
  min-width: 600px;
  background: linear-gradient(135deg, #c0f0ff 0%, #a8e8ff 100%);
}

.pack-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.pack-card {
  background: linear-gradient(135deg, #fff9f5 0%, #fff3ec 100%);
  padding: 0.5rem;
  border: none;
  text-align: center;
  animation: cardReveal 0.5s ease-out;
  box-shadow: 0 6px 20px rgba(91, 76, 98, 0.25);
  border-radius: 20px;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: scale(0.8) rotateY(180deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
  }
}

/* Card flip animation removed - back images no longer used */

.pack-card-placeholder {
  width: 100%;
  max-width: 280px;  /* Limit width to maintain proper aspect ratio */
  aspect-ratio: 3.6715 / 5.159;  /* Real card dimensions: 3.6715" x 5.159" = 0.711 */
  background: linear-gradient(135deg, #ffeaff 0%, #ffe0fa 100%);
  border: none;
  margin: 0 auto 0.8rem auto;  /* Center the card with bottom margin */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  border-radius: 4.85%;  /* 0.1779" radius / 3.6715" width = 4.85% */
  box-shadow: inset 0 2px 10px rgba(91, 76, 98, 0.15);
}

.pack-card {
  padding: 0.5rem;  /* Consistent padding around cards */
}

.close-pack-btn {
  width: 100%;
}

/* Card Detail */
.card-detail {
  min-width: 400px;
  background: #c9b4e8;
}

/* Groups View */
.groups-container {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  background: transparent;
}

.groups-container h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #5b4c62;
  text-shadow: 3px 3px 0 #ffd98d;
  line-height: 1.5;
}

.groups-grid {
  display: grid;
  gap: 2rem;
}

.group-section {
  background: linear-gradient(135deg, #fff9f5 0%, #fff3ec 100%);
  padding: 2rem;
  border-radius: 25px;
  box-shadow: 0 6px 20px rgba(91, 76, 98, 0.2);
}

.group-section h2 {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  color: #5b4c62;
  text-shadow: 2px 2px 0 #f79ab5;
  line-height: 1.6;
}

.eras-container {
  display: grid;
  gap: 1.5rem;
}

.era-section {
  background: linear-gradient(135deg, #ffeaff 0%, #ffe0fa 100%);
  padding: 1.5rem;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(255, 224, 250, 0.4);
}

.era-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
  color: #5b4c62;
  line-height: 1.6;
}

.era-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.era-card {
  background: linear-gradient(135deg, #fff9f5 0%, #fff3ec 100%);
  padding: 1rem;
  border-radius: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(91, 76, 98, 0.15);
}

.era-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(91, 76, 98, 0.25);
}

.era-card-placeholder {
  width: 100%;
  aspect-ratio: 3.6715/5.159;  /* Real card dimensions: 3.6715" x 5.159" */
  background: linear-gradient(135deg, #ffeaff 0%, #ffe0fa 100%);
  border-radius: 4.85%;  /* 0.1779" radius / 3.6715" width = 4.85% */
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: inset 0 2px 10px rgba(91, 76, 98, 0.1);
}

.era-card-name {
  font-size: 0.9rem;
  color: #5b4c62;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.era-card-rarity {
  font-size: 0.75rem;
  font-weight: bold;
}

.era-complete-btn {
  background: linear-gradient(180deg, #ffd98d 0%, #f7cd84 100%);
  border: none;
  color: #5b4c62;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(247, 205, 132, 0.3);
  font-family: 'Courier New', monospace;
  font-weight: bold;
  border-radius: 15px;
  font-size: 0.9rem;
}

.era-complete-btn:hover {
  background: linear-gradient(180deg, #ffe0a0 0%, #ffd98d 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 205, 132, 0.5);
}

/* Friends View */
.friends-container {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  background: transparent;
}

.friends-container h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #5b4c62;
  text-shadow: 3px 3px 0 #ffd98d;
  line-height: 1.5;
}

.friends-section {
  background: linear-gradient(135deg, #fff9f5 0%, #fff3ec 100%);
  padding: 2rem;
  margin-bottom: 2rem;
  border: none;
  box-shadow: 0 6px 20px rgba(91, 76, 98, 0.2);
  border-radius: 25px;
}

.friends-section h2 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #5b4c62;
  text-shadow: 2px 2px 0 #f79ab5;
  line-height: 1.6;
}

/* Match styling for trading section */
.trading-section h2 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #5b4c62;
  text-shadow: 2px 2px 0 #f79ab5;
  line-height: 1.6;
}

.friend-search {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.search-input,
.form-input {
  flex: 1;
  padding: 0.9rem 1.2rem;
  border: none;
  background: linear-gradient(135deg, #fff9f5 0%, #fff3ec 100%);
  color: #5b4c62;
  font-size: 1rem;
  font-family: 'Courier New', monospace;
  border-radius: 20px;
  box-shadow: inset 0 2px 10px rgba(91, 76, 98, 0.1);
}

.search-input:focus,
.form-input:focus {
  outline: none;
  background: linear-gradient(135deg, #ffeaff 0%, #ffe0fa 100%);
  box-shadow: inset 0 2px 10px rgba(91, 76, 98, 0.15), 0 0 0 3px rgba(201, 180, 232, 0.3);
}

.search-results,
.friends-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.friend-card,
.search-result-card {
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.friend-card:hover,
.search-result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 224, 250, 0.4);
}

.friend-info {
  flex: 1;
}

.friend-name {
  font-weight: bold;
  color: #5b4c62;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.friend-status {
  font-size: 0.85rem;
  color: #5b4c62;
  opacity: 0.7;
}

.friend-actions {
  display: flex;
  gap: 0.5rem;
}

.friend-btn {
  background: linear-gradient(180deg, #aad9e6 0%, #93c9d5 100%);
  border: none;
  color: #fff3ec;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  transition: all 0.3s ease;
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(147, 201, 213, 0.3);
}

.friend-btn:hover {
  background: linear-gradient(180deg, #c0f0ff 0%, #a8e8ff 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(168, 232, 255, 0.4);
}

.friend-btn.danger {
  background: linear-gradient(180deg, #ffa8c5 0%, #f79ab5 100%);
  color: #fff3ec;
  box-shadow: 0 4px 12px rgba(247, 154, 181, 0.3);
}

.friend-btn.danger:hover {
  background: linear-gradient(180deg, #ff98ba 0%, #e889a9 100%);
  box-shadow: 0 6px 18px rgba(247, 154, 181, 0.4);
}

/* Custom Alert Modal */
.custom-alert-modal {
  max-width: 500px;
  background: linear-gradient(135deg, #fff9f5 0%, #fff3ec 100%);
  text-align: center;
  padding: 3rem 2.5rem;
}

.custom-alert-modal h2 {
  margin-bottom: 1.5rem;
  color: #5b4c62;
  font-size: 1.5rem;
}

.custom-alert-modal p {
  color: #5b4c62;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.alert-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.alert-buttons .action-btn {
  width: auto;
  min-width: 120px;
}

.alert-cancel-btn {
  background: linear-gradient(180deg, #aad9e6 0%, #93c9d5 100%) !important;
}

.alert-cancel-btn:hover {
  background: linear-gradient(180deg, #c0f0ff 0%, #a8e8ff 100%) !important;
}

/* Login/Signup Modals */
.login-modal {
  max-width: 400px;
  background: linear-gradient(135deg, #d9c9f5 0%, #c9b4e8 100%);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.login-form .form-input {
  margin-bottom: 0.5rem;
}

.form-link {
  text-align: center;
  color: #5b4c62;
  font-size: 0.9rem;
}

.link-text {
  color: #f79ab5;
  cursor: pointer;
  text-decoration: underline;
  font-weight: bold;
}

.link-text:hover {
  color: #e889a9;
}

/* Chat Modal */
.chat-modal {
  min-width: 500px;
  max-width: 600px;
  background: #a8e8ff;
}

.chat-messages {
  height: 400px;
  overflow-y: auto;
  background: #fff3ec;
  border: 3px solid #5b4c62;
  padding: 1rem;
  margin: 1rem 0;
}

.chat-message {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 2px solid #5b4c62;
  background: #ffe0fa;
}

.chat-message.own {
  background: #c9b4e8;
  margin-left: 2rem;
}

.chat-sender {
  font-weight: bold;
  color: #5b4c62;
  margin-bottom: 0.25rem;
}

.chat-text {
  color: #5b4c62;
}

.chat-input-area {
  display: flex;
  gap: 0.5rem;
}

/* Trade Modal */
.trade-modal {
  min-width: 500px;
  background: #d4c5ea;
}

.trade-card-info {
  padding: 0.5rem;
  margin: 0.5rem 0;
  text-align: center;
}

.trade-friends-list {
  display: grid;
  background: #fff3ec;
  border: 3px solid #5b4c62;
  border-radius: 20px;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
}

/* Balloon Game Modal */
.balloon-game-modal {
  min-width: 700px;
  max-width: 900px;
  background: #ffe0fa;
  padding: 2rem;
}

.balloon-game-content {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
}

.game-main {
  flex: 1;
}

.game-sidebar {
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Gem Catching Game Modal */
.gem-catch-game-modal {
  min-width: 700px;
  max-width: 900px;
  background: #ffe0fa;  /* Soft pink to match balloon game modal */
  padding: 2rem;
}

.gem-catch-container {
  position: relative;
  width: 100%;
  height: 500px;
  /* Use same animated gradient as main website */
  background: linear-gradient(135deg, #93c9d5 0%, #c9b4e8 25%, #f79ab5 50%, #ffd98d 75%, #ffe0fa 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.2);
}

.gem-catch-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.game-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.game-stat {
  background: linear-gradient(135deg, #fff9f5 0%, #fff3ec 100%);
  border: none;
  padding: 1rem 1.25rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(91, 76, 98, 0.2);
  border-radius: 20px;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: #5b4c62;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  color: #f79ab5;
  font-weight: bold;
  font-family: 'Press Start 2P', monospace;
  line-height: 1.4;
}

.balloon-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  background: linear-gradient(135deg, #d9c9f5 0%, #c9b4e8 100%);
  border: none;
  padding: 12px;
  aspect-ratio: 1;
  width: 100%;
  max-width: 500px;
  border-radius: 20px;
  box-shadow: inset 0 4px 15px rgba(91, 76, 98, 0.2);
}

.balloon-cell {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.2s;
  user-select: none;
  position: relative;
  padding: 8px;
}

.balloon-cell:hover {
  transform: scale(1.05);
  z-index: 10;
}

.balloon-cell.selected {
  background: #ffd98d;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(247, 154, 181, 0.8);
  z-index: 5;
}

.balloon-cell.matched {
  animation: balloonPop 0.5s ease-out;
}

@keyframes balloonPop {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

.game-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.game-controls .action-btn {
  width: 100%;
}

.game-result {
  background: linear-gradient(135deg, #fff9f5 0%, #fff3ec 100%);
  border: none;
  padding: 2rem;
  margin-top: 1rem;
  text-align: center;
  box-shadow: 0 6px 20px rgba(91, 76, 98, 0.25);
  border-radius: 25px;
}

.game-result h3 {
  margin: 0 0 0.5rem 0;
  color: #5b4c62;
  font-size: 1.2rem;
  line-height: 1.6;
}

.game-result p {
  margin: 0.5rem 0;
  color: #5b4c62;
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .top-nav {
    padding: 0 1rem;
  }
  
  .nav-brand {
    font-size: 1.2rem;
  }
  
  .nav-links {
    gap: 0.5rem;
  }
  
  .nav-link {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .user-stats {
    font-size: 0.9rem;
    gap: 1rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .pack-opening {
    min-width: 90%;
  }
  
  .tent-interaction {
    min-width: 250px;
    padding: 1.5rem;
  }
  
  .nav-btn {
    height: 18%;
    max-height: 180px;
    min-height: 120px;
    bottom: 5%;
  }
  
  #prevBtn {
    left: 1%;
  }
  
  #nextBtn {
    right: 1%;
  }
  
  .tent-interaction {
    max-width: 280px;
    right: 5%;
  }
  
  .balloon-game-modal {
    min-width: 90%;
    max-width: 95%;
  }
  
  .balloon-grid {
    max-width: 90vw;
  }
  
  .balloon-cell {
    font-size: 1.2rem;
  }
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  color: #8b6db8;
  border: none;
  border-radius: 50%;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(91, 76, 98, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-bottom: 2px;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: rgba(255, 255, 255, 1);
  color: #5b4c62;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(91, 76, 98, 0.4);
}

/* ========================================
   RESPONSIVE DESIGN - VIEWPORT SCALING
   ======================================== */

/* Base root font size for rem scaling */
html {
  font-size: 16px; /* Base size for larger screens */
}

/* Scale down for smaller viewports */
@media (max-width: 1600px) {
  html {
    font-size: 15px;
  }

  .tent-svg {
    height: 85vh;
  }

  .top-nav {
    height: 65px;
  }
}

@media (max-width: 1400px) {
  html {
    font-size: 14px;
  }

  .tent-svg {
    height: 80vh;
  }

  .top-nav {
    height: 60px;
  }

  .tent-info-bottom {
    bottom: 12%;
  }
}

@media (max-width: 1200px) {
  html {
    font-size: 13px;
  }

  .tent-svg {
    height: 75vh;
  }

  .top-nav {
    height: 55px;
  }

  .nav-links {
    gap: 0.5rem;
  }

  .tent-info-bottom {
    bottom: 11%;
  }
}

@media (max-width: 1024px) {
  html {
    font-size: 12px;
  }

  .tent-svg {
    height: 70vh;
  }

  .top-nav {
    height: 50px;
    padding: 0.5rem 1rem;
  }

  .nav-links {
    gap: 0.3rem;
  }

  .stat-item {
    font-size: 0.8rem;
  }

  .tent-info-bottom {
    bottom: 10%;
  }
}

@media (max-width: 900px) {
  html {
    font-size: 11px;
  }

  .tent-svg {
    height: 65vh;
  }

  .top-nav {
    flex-direction: column;
    height: auto;
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
  }

  .user-stats {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 10px;
  }

  .tent-svg {
    height: 60vh;
  }

  .tent-info-bottom {
    bottom: 7%;
  }
}
