/* ═══════════════════ HEXCLASH PREMIUM HUB STYLES ═══════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Nunito:wght@400;700;900&display=swap');

:root {
  --clr-gold: #fbbf24;
  --clr-gold-light: #fde68a;
  --clr-gold-dark: #b45309;
  --clr-bg-dark: #1e1b4b;
  --clr-bg-glass: rgba(15, 23, 42, 0.7);
  --clr-green: #10b981;
  --clr-green-bright: #34d399;
  --font-title: 'Cinzel', serif;
  --font-main: 'Nunito', sans-serif;
}

body, html {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: var(--font-main);
  /* Fallback background on body — ensures no black shows anywhere */
  background-color: #000;
}

/* Base Hub Screen */
#hub-screen {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  /* background-image removed so the video behind it can be seen. Fallback is on body. */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden; /* Prevent video overflow */
}

#hub-bg-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0; /* Changed from -1 to 0 so it doesn't go behind the body */
  pointer-events: none;
  opacity: 1; /* Fully opaque so nothing bleeds through */
}

/* Glassmorphism Panel Base */
.glass-panel {
  background: var(--clr-bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid var(--clr-gold-dark);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5), inset 0 0 10px rgba(251,191,36,0.2);
  border-radius: 12px;
  color: #fff;
}

/* Top Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 15px 20px;
  z-index: 10;
}

/* User Profile (Top Left) */
.user-profile {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 20px;
}
.user-avatar {
  width: 60px; height: 60px;
  background: url('mascot.png') center/cover;
  border-radius: 50%;
  border: 3px solid var(--clr-gold);
  box-shadow: 0 0 15px var(--clr-gold-dark);
}
.user-info {
  display: flex; flex-direction: column;
}
.user-name {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  text-shadow: 1px 1px 3px #000;
}
.user-level {
  font-size: 0.9rem;
  color: var(--clr-gold);
  font-weight: bold;
}
.xp-bar-bg {
  width: 120px; height: 8px;
  background: #000;
  border-radius: 4px;
  margin-top: 4px;
  border: 1px solid var(--clr-gold-dark);
}
.xp-bar-fill {
  width: 45%; height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: 4px;
}

/* Resources (Top Right) */
.resources-bar {
  display: flex;
  gap: 15px;
}
.res-item {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--clr-gold-dark);
  border-radius: 20px;
  padding: 5px 15px 5px 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.res-icon {
  font-size: 1.5rem;
  background: radial-gradient(circle, var(--clr-gold-light), var(--clr-gold-dark));
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; justify-content: center; align-items: center;
  box-shadow: 0 0 5px var(--clr-gold);
}
.res-val {
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
  text-shadow: 1px 1px 2px #000;
}
.res-add {
  background: var(--clr-green);
  color: #fff; border: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 5px var(--clr-green-bright);
}

/* Side Menus */
.side-menu-right {
  position: absolute;
  right: 20px; top: 120px;
  display: flex; flex-direction: column; gap: 20px;
}
.bottom-icons-group {
  display: flex; flex-direction: column; gap: 20px;
}
.side-menu-left {
  position: absolute;
  left: 20px; top: 120px;
  display: flex; flex-direction: column; gap: 15px;
}

.icon-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(30,27,75,0.9), rgba(0,0,0,0.9));
  border: 2px solid var(--clr-gold-dark);
  border-radius: 12px;
  width: 80px; height: 85px;
  color: #fff; cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
  position: relative;
}
.icon-btn:hover {
  transform: scale(1.05);
  border-color: var(--clr-gold);
  box-shadow: 0 0 15px rgba(251,191,36,0.5);
}
.icon-btn-img {
  font-size: 2.2rem;
  margin-bottom: 5px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.icon-btn-text {
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
}
.badge {
  position: absolute; top: -8px; right: -8px;
  background: #ef4444; color: #fff;
  border-radius: 50%; width: 24px; height: 24px;
  display: flex; justify-content: center; align-items: center;
  font-size: 0.8rem; font-weight: bold;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Colony Chest (Left side) */
.colony-chest {
  width: 140px; padding: 10px;
  text-align: center;
}
.chest-img {
  font-size: 4rem; margin-bottom: 5px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}
.chest-title {
  font-family: var(--font-title);
  color: var(--clr-gold);
  font-size: 0.9rem;
}

/* Bottom Area */
.bottom-area {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 20px;
  /* Removed dark gradient — bg image now fills full screen */
}

.bottom-icons {
  display: flex; gap: 15px;
}

/* Play Button (Center) */
.play-btn-wrapper.center-screen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.play-btn {
  background: linear-gradient(180deg, var(--clr-gold), var(--clr-gold-dark));
  border: 3px solid var(--clr-gold-light);
  border-radius: 40px;
  padding: 15px 60px;
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  box-shadow: 0 10px 25px rgba(180, 83, 9, 0.8), inset 0 5px 15px rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.1s;
}
.play-btn:active {
  transform: translateY(4px);
  box-shadow: 0 5px 10px rgba(180, 83, 9, 0.8);
}
.play-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 15px 35px rgba(180, 83, 9, 1);
}

/* ═══════════════════ MODALS (OVERLAYS) ═══════════════════ */
.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;
  padding: 20px 20px 40px 20px; /* Top Right Bottom Left */
  box-sizing: border-box;
  z-index: 1000;
  transition: opacity 0.3s;
}
.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.modal-card {
  background: linear-gradient(135deg, #1e1b4b, #0f172a);
  border: 3px solid var(--clr-gold);
  border-radius: 16px;
  padding: 30px;
  box-sizing: border-box; /* CRITICAL */
  box-shadow: 0 10px 40px rgba(0,0,0,0.8), inset 0 0 20px rgba(251,191,36,0.1);
  color: #fff;
  position: relative;
  width: 100%;
  max-width: 800px;
  height: auto;
  max-height: calc(100vh - 80px); /* Strictly force 80px total vertical gap */
  display: flex;
  flex-direction: column;
}
.modal-close {
  position: absolute;
  top: 15px; right: 20px;
  background: none; border: none;
  color: var(--clr-gold);
  font-size: 2rem; cursor: pointer;
}
.modal-title {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--clr-gold);
  text-align: center;
  margin-top: 0; margin-bottom: 25px;
  text-shadow: 0 2px 4px #000;
}

/* Auth Modals (Login / Create) */
.auth-input {
  width: 100%;
  padding: 12px 15px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--clr-gold-dark);
  border-radius: 8px;
  color: #fff;
  font-size: 1.1rem;
  box-sizing: border-box;
}
.auth-input:focus {
  outline: none;
  border-color: var(--clr-gold);
  box-shadow: 0 0 10px rgba(251,191,36,0.3);
}
.btn-google {
  width: 100%;
  background: #fff;
  color: #333;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.btn-google:hover {
  background: #f1f5f9;
}

/* Cards for Mode/Diff/Characters */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  overflow-y: auto;
  padding-right: 5px;
  min-height: 0;
  flex-shrink: 1;
}
.select-card {
  background: rgba(0,0,0,0.5);
  border: 2px solid var(--clr-gold-dark);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.select-card:hover, .select-card.selected {
  transform: translateY(-5px);
  border-color: var(--clr-gold);
  background: rgba(251,191,36,0.1);
  box-shadow: 0 5px 15px rgba(251,191,36,0.3);
}
.card-icon {
  font-size: 3rem; margin-bottom: 10px;
}
.card-name {
  font-weight: 900; font-size: 1.2rem;
  margin-bottom: 5px;
}
.card-desc {
  font-size: 0.85rem; color: #cbd5e1;
}

/* Tasks UI */
.task-list {
  display: flex; flex-direction: column; gap: 15px;
  max-height: 400px; overflow-y: auto; padding-right: 10px;
}
.task-item {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--clr-gold-dark);
  border-radius: 8px; padding: 15px;
}
.task-info {
  display: flex; flex-direction: column; gap: 5px;
}
.task-title {
  font-weight: bold; color: #fff;
  font-size: 1.1rem;
}
.task-progress {
  font-size: 0.8rem; color: var(--clr-gold);
}
.btn-claim {
  background: var(--clr-green);
  color: #fff; border: 2px solid var(--clr-green-bright);
  padding: 8px 20px; border-radius: 20px;
  font-weight: bold; cursor: pointer;
}
.btn-claim:disabled {
  background: #64748b; border-color: #475569;
  color: #cbd5e1; cursor: not-allowed;
}

/* Toast */
#toast {
  position: fixed;
  bottom: 30px; left: 50%; 
  transform: translate(-50%, 150%);
  opacity: 0;
  pointer-events: none;
  background: #1e293b; color: #fff;
  border: 2px solid var(--clr-gold);
  padding: 12px 24px; border-radius: 30px;
  font-weight: bold; font-family: var(--font-title);
  box-shadow: 0 4px 15px rgba(0,0,0,0.8);
  transition: transform 0.4s, opacity 0.4s;
  z-index: 2000;
  text-align: center;
}
#toast.show { 
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

/* Queen Selection Cards */
.queen-card {
  background: rgba(0,0,0,0.6);
  border: 2px solid var(--clr-gold-dark);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: block;
  position: relative;
  height: 0;
  padding-bottom: 100%; /* Perfect square, fixes aspect ratio bug */
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.queen-card:hover, .queen-card.selected {
  transform: translateY(-5px);
  border-color: var(--clr-gold);
  box-shadow: 0 8px 25px rgba(251,191,36,0.4);
}
.queen-card.selected {
  background: rgba(251,191,36,0.15);
}
.queen-img-wrapper {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.queen-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.queen-card:hover .queen-img {
  transform: scale(1.1);
}
.queen-element-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5rem;
  background: rgba(0,0,0,0.7);
  border: 1px solid var(--clr-gold);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 10px rgba(251,191,36,0.5);
}
.queen-info-sm {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 30px 5px 10px 5px; /* More top padding for gradient fade */
  text-align: center;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 60%, transparent 100%);
  pointer-events: none; /* Let clicks pass through */
  z-index: 2;
}
.queen-name {
  color: #fff;
  font-family: var(--font-title);
  font-size: clamp(0.9rem, 4vw, 1.1rem);
  font-weight: bold;
  margin-bottom: 2px;
  text-shadow: 1px 1px 3px #000, 0 0 5px #000;
}
.queen-class {
  color: var(--clr-gold-light);
  font-size: clamp(0.7rem, 3vw, 0.85rem);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px #000;
}

/* Campaign Map */
/* ═══════════════════ CAMPAIGN NODE PNG BANNER ═══════════════════ */

.camp-node {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  z-index: 10; cursor: pointer; transition: transform 0.2s;
  
  background-image: url('totem_gray.png') !important;
  background-size: contain !important;
  background-position: center bottom !important;
  background-repeat: no-repeat !important;
  width: min(10.5vw, 56px) !important;
  height: min(15vw, 80px) !important;
}
.camp-node:hover {
  z-index: 20;
  filter: drop-shadow(0 0 8px rgba(255,220,80,0.9));
  transform: translate(-50%, -100%) scale(1.1);
}

.camp-node::before { display: none !important; }
.camp-icon { display: none !important; }
.camp-cloth, .camp-cloth::after, .camp-wings, .camp-wings::after, .camp-pole {
    display: none !important;
}

/* Stars ABOVE the totem */
.camp-stars {
    display: flex !important;
    position: absolute !important;
    top: 8px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: min(1.2vw, 10px) !important;
    white-space: nowrap !important;
    z-index: 15 !important;
    opacity: 1 !important;
    visibility: visible !important;
    
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
    text-shadow: 0 1px 3px #000;
}

/* Active / current node = blue totem */

/* Completed nodes = blue totem (cleared) */
.camp-node.completed {
    background-image: url('totem_blue.png') !important;
    filter: brightness(0.75) !important;
}
/* Boss nodes = purple totem */
.camp-node.boss {
    background-image: url('totem_purple.png') !important;
    width: min(13vw, 70px) !important;
    height: min(19vw, 100px) !important;
}
/* Active boss node */
.camp-node.boss.active {
    background-image: url('totem_purple.png') !important;
    filter: brightness(1.2) !important;
}

/* Environment Animations */
.camp-anim { position: absolute; z-index: 4; pointer-events: none; }

@keyframes treeSway { 0% { transform: rotate(-5deg); } 100% { transform: rotate(5deg); } }
@keyframes sandStorm { 0% { transform: translateX(0) scale(1); opacity:0; } 20% { opacity:0.6; } 80% { opacity:0.6; } 100% { transform: translateX(-15vw) scale(1.5); opacity:0; } }
@keyframes toxicFog { 0% { transform: scale(1) translateY(0); opacity: 0.3; } 100% { transform: scale(1.2) translateY(-1vw); opacity: 0.6; } }
@keyframes toxicBubble { 0% { transform: scale(0) translateY(0); opacity: 0; } 20% { transform: scale(1) translateY(-0.5vw); opacity: 1; } 100% { transform: scale(1.5) translateY(-3vw); opacity: 0; } }
@keyframes lavaSpit { 0% { transform: scale(0) translateY(0); opacity: 0; } 20% { transform: scale(1) translateY(-1vw); opacity: 1; } 80% { transform: scale(1.2) translateY(-2.5vw); opacity: 1; } 100% { transform: scale(0.5) translateY(-3vw); opacity: 0; } }
@keyframes magicSparkle { 0% { transform: scale(0.5) rotate(0deg); opacity: 0; } 50% { transform: scale(1.2) rotate(180deg); opacity: 1; } 100% { transform: scale(0.5) rotate(360deg); opacity: 0; } }
@keyframes snowFall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(10vw) rotate(360deg); opacity: 0; } }
@keyframes volcanoSmoke { 0% { transform: scale(1) translateY(0); opacity: 0.8; } 100% { transform: scale(3) translateY(-10vw); opacity: 0; } }

/* Map container */
#unified-map-container {
  position: relative; margin: auto;
  box-shadow: 0 0 30px #000; border: 4px solid var(--clr-gold-dark); border-radius: 15px;
  overflow: hidden; background: #000;
  width: min(95vw, calc(90vh * 16/9)); height: min(90vh, calc(95vw * 9/16));
}
@media (max-aspect-ratio: 1/1) {
  #unified-map-container {
    width: min(90vw, calc(90vh * 9/16)); height: min(90vh, calc(90vw * 16/9));
    max-width: none; max-height: none;
    border: 4px solid var(--clr-gold-dark); border-radius: 15px;
    margin: auto;
  }
  
  /* Mobile banner sizes (increased 30% from original mobile sizes) */
  .camp-node {
    width: min(14vw, 83px) !important;
    height: min(21vw, 117px) !important;
  }
  .camp-node.boss {
    width: min(18vw, 104px) !important;
    height: min(26vw, 146px) !important;
  }
  .camp-stars {
    font-size: min(3.5vw, 13px) !important;
    top: 8px !important;
  }
}
@keyframes questPulse { 0% { box-shadow: 0 0 5px #fbbf24; } 50% { box-shadow: 0 0 20px #fbbf24; } 100% { box-shadow: 0 0 5px #fbbf24; } }


@media (max-width: 768px) {
  .modal-overlay { padding: 40px 10px; box-sizing: border-box; align-items: center; overflow-y: auto; }
  .modal-card { width: 100% !important; max-height: none !important; margin: auto; overflow-y: visible; padding: 20px 10px; }
  .task-list { max-height: none !important; overflow-y: visible !important; }
  .top-bar { align-items: flex-start; }
  .resources-bar { transform: none !important; flex-wrap: wrap; justify-content: flex-end; max-width: 60%; gap: 5px; }
  .res-item { padding: 2px 6px 2px 2px; }
  .res-icon { width: 20px; height: 20px; font-size: 0.9rem; }
  .res-val { font-size: 0.8rem; }
  .res-add { display: none; }
}




@media (max-width: 768px) {
  .task-list { max-height: 70vh !important; overflow-y: auto !important; }
  .modal-card { max-height: 90vh !important; overflow-y: auto !important; }
}



/* ═══════════════════ CAMPAIGN POPUP REDESIGN ═══════════════════ */
.camp-popup-container {
  position: absolute;
  width: min(85vw, 420px);
  background: url('hive_bg.jpg') center/cover no-repeat;
  border: 4px solid #451a03;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.9), inset 0 0 30px rgba(0,0,0,0.8);
  text-align: center;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  margin-top: -30px;
  z-index: 100;
  overflow: hidden;
}

.camp-popup-container::before {
  content: '';
  position: absolute;
  top:0; left:0; right:0; bottom:0;
  background: rgba(30, 20, 10, 0.85); /* Darken bg image */
  z-index: 0;
}

.camp-popup-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: #7f1d1d;
  border: 2px solid #fca5a5;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  transition: all 0.2s;
}
.camp-popup-close:hover {
  background: #dc2626; transform: scale(1.1);
}

.camp-popup-header {
  position: relative;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(120, 53, 15, 0.9), rgba(69, 26, 3, 0.9));
  padding: 15px 10px;
  border-bottom: 2px solid #b45309;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

#camp-popup-ep {
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: #fcd34d;
  font-weight: 900;
  letter-spacing: 2px;
}

#camp-popup-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: #fff;
  text-shadow: 0 2px 4px #000, 0 0 10px rgba(251,191,36,0.5);
  margin-top: 5px;
}

.camp-popup-body {
  position: relative;
  z-index: 1;
  padding: 20px;
}

#camp-popup-desc {
  font-size: 0.95rem;
  color: #e2e8f0;
  line-height: 1.4;
  margin-bottom: 20px;
  font-style: italic;
  text-shadow: 1px 1px 2px #000;
}

#camp-popup-boss {
  background: rgba(127, 29, 29, 0.2);
  border: 2px solid #991b1b;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: left;
}
.boss-title {
  color: #fca5a5;
  font-weight: 900;
  font-size: 1.1rem;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 5px;
  text-transform: uppercase;
}
#camp-popup-boss-desc {
  color: #fecaca;
  font-size: 0.85rem;
}

.diff-selector {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

.diff-btn {
  flex: 1;
  background: rgba(0,0,0,0.6);
  border: 2px solid #475569;
  border-radius: 10px;
  padding: 10px 5px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.diff-btn:hover {
  background: rgba(51,65,85,0.8);
  transform: translateY(-2px);
}

.diff-btn.selected {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.9), rgba(120, 53, 15, 0.9));
  border-color: #fcd34d;
  box-shadow: 0 0 15px rgba(251,191,36,0.4), inset 0 0 10px rgba(251,191,36,0.2);
  transform: translateY(-4px);
}

.diff-icon {
  font-size: 1.8rem;
  margin-bottom: 5px;
  filter: drop-shadow(0 2px 2px #000);
}

.diff-text {
  font-size: 0.8rem;
  font-weight: 900;
  color: #94a3b8;
}
.diff-btn.selected .diff-text {
  color: #fff;
  text-shadow: 0 1px 3px #000;
}

.camp-popup-footer {
  position: relative;
  z-index: 1;
  padding: 0 20px 25px 20px;
}

#btn-camp-node-play {
  width: 100%;
  background: linear-gradient(to bottom, #a855f7, #7e22ce);
  border: 3px solid #d8b4fe;
  border-radius: 12px;
  padding: 15px;
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(126, 34, 206, 0.6), inset 0 -4px 10px rgba(0,0,0,0.3);
  text-shadow: 0 3px 5px rgba(0,0,0,0.5);
  transition: all 0.1s;
}

#btn-camp-node-play:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 4px 10px rgba(126, 34, 206, 0.6), inset 0 -2px 5px rgba(0,0,0,0.3);
}

#btn-camp-node-play:hover:not(:disabled) {
  filter: brightness(1.2);
  box-shadow: 0 10px 25px rgba(168, 85, 247, 0.8);
}

#btn-camp-node-play:disabled {
  background: #475569;
  border-color: #64748b;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
  text-shadow: none;
}



/* ═══════════════════ MOBILE SIZES ═══════════════════ */
@media (max-aspect-ratio: 1/1) {
  .camp-node {
    width: min(14vw, 83px) !important;
    height: min(21vw, 117px) !important;
  }
  .camp-pole {
    width: min(0.9vw, 6px);
  }
  .camp-wings {
    width: min(14vw, 80px);
    height: min(1.2vw, 7px);
  }
  .camp-wings::before {
    width: min(4vw, 16px);
    height: min(4vw, 16px);
    top: -9px;
  }
  .camp-cloth {
    width: min(11.5vw, 68px);
    height: min(16vw, 92px);
    top: 17%;
  }
  .camp-icon {
    font-size: min(4vw, 18px);
  }
  .camp-node.boss .camp-cloth {
    width: min(13vw, 76px);
    height: min(18.5vw, 106px);
  }
  .camp-node.boss .camp-wings {
    width: min(16vw, 92px);
  }
  .camp-node.boss .camp-icon {
    font-size: min(5vw, 22px);
  }
  .camp-stars {
    font-size: min(3.5vw, 13px) !important;
    top: 8px !important;
  }
}
/* Keep icon hidden - totem image handles visuals */
.camp-icon { display: none !important; }

/* Hide old CSS-based totem shapes */
.camp-cloth, .camp-cloth::after, .camp-wings, .camp-wings::after, .camp-pole {
    display: none !important;
}

/* Stars ABOVE the totem - must remain visible */
.camp-stars {
    display: block !important;
    position: absolute !important;
    top: 8px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: min(1.2vw, 10px) !important;
    white-space: nowrap !important;
    z-index: 10 !important;
    opacity: 1 !important;
    visibility: visible !important;
    
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

/* Locked nodes = gray totem (default) */
.camp-node {
    background-image: url('totem_gray.png') !important;
    background-size: contain !important;
    background-position: center bottom !important;
    background-repeat: no-repeat !important;
    width: min(10.5vw, 56px) !important;
    height: min(15vw, 80px) !important;
}

/* Completed nodes = blue totem */
.camp-node.completed {
    background-image: url('totem_blue.png') !important;
    filter: brightness(0.8) !important;
}

/* Active / current node = yellow totem */
.camp-node.current-step {
    background-image: url('totem_yellow.png') !important;
    animation: totemPulse 2s infinite;
}

/* Boss nodes = purple totem (Overrides everything) */
.camp-node.boss {
    background-image: url('totem_purple.png') !important;
    width: min(13vw, 70px) !important;
    height: min(19vw, 100px) !important;
    filter: none !important;
}
.camp-node.boss.completed {
    filter: brightness(0.8) !important;
}
.camp-node.boss.current-step {
    animation: bossTotemPulse 2s infinite;
}

@media (max-aspect-ratio: 1/1) {
  .camp-node {
    width: min(14vw, 83px) !important;
    height: min(21vw, 117px) !important;
  }
  .camp-node.boss {
    width: min(18vw, 104px) !important;
    height: min(26vw, 146px) !important;
  }
  .camp-stars {
    font-size: min(3.5vw, 13px) !important;
    top: 8px !important;
  }
}
/* Visual feedback for clicked/selected node */
.camp-node.active {
    filter: brightness(1.3) drop-shadow(0 0 10px #fff) !important;
    transform: translate(-50%, -100%) scale(1.1) !important;
}

@keyframes totemPulse {
    0% { filter: brightness(1) drop-shadow(0 0 5px #facc15); transform: translate(-50%, -100%) scale(1); }
    50% { filter: brightness(1.3) drop-shadow(0 0 20px #facc15); transform: translate(-50%, -100%) scale(1.08); }
    100% { filter: brightness(1) drop-shadow(0 0 5px #facc15); transform: translate(-50%, -100%) scale(1); }
}
@keyframes bossTotemPulse {
    0% { filter: brightness(1) drop-shadow(0 0 5px #c084fc); transform: translate(-50%, -100%) scale(1); }
    50% { filter: brightness(1.3) drop-shadow(0 0 20px #c084fc); transform: translate(-50%, -100%) scale(1.08); }
    100% { filter: brightness(1) drop-shadow(0 0 5px #c084fc); transform: translate(-50%, -100%) scale(1); }
}

.hidden { display: none !important; }

.camp-modal-card {
  max-width: 700px;
  width: 100%;
  padding: 0;
  border: 4px solid #5a3c28;
  border-radius: 15px;
  background: linear-gradient(to bottom, #3b2a1a, #1a1005);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
}

.camp-modal-header {
  background: #291a10;
  padding: 15px 40px;
  text-align: center;
  border-bottom: 2px solid #5a3c28;
  border-radius: 11px 11px 0 0;
}

.camp-modal-title-text {
  margin: 0;
  font-family: var(--font-title);
  color: #f59e0b;
  font-size: clamp(1.2rem, 5vw, 1.8rem);
  text-shadow: 2px 2px 0px #000;
  line-height: 1.2;
}

.camp-modal-body {
  display: flex;
  flex-wrap: wrap;
  padding: 20px;
  gap: 20px;
  overflow-y: auto;
}

.camp-modal-img-container {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.camp-modal-content-container {
  flex: 2;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .camp-modal-card {
    max-height: calc(100vh - 80px); /* 40px top/bottom padding constraint */
    margin: 40px 10px;
    width: calc(100% - 20px);
  }
  .camp-modal-body {
    padding: 15px;
  }
  .camp-modal-img-container {
    gap: 10px;
  }
  .camp-img-box {
    max-height: 25vh; /* Shrink image on small screens */
  }
}

@media (max-width: 768px) {
  .user-profile {
    gap: 8px !important;
    padding: 5px 10px !important;
  }
  .user-avatar {
    width: 45px !important;
    height: 45px !important;
  }
  .user-name {
    font-size: 1rem !important;
  }
  .colony-chest {
    width: 90px !important;
    padding: 10px 5px !important; /* Reduced to remove unnecessary empty space */
    margin-top: 0px !important; /* Gap handled by parent */
    box-sizing: border-box !important;
  }
  .chest-title {
    font-size: 0.65rem !important;
    margin-bottom: 5px !important; /* Reduced */
    line-height: 1.1 !important;
  }
  .hide-on-mobile {
    display: none !important;
  }
  .show-on-mobile {
    display: inline !important;
  }
  .colony-chest .chest-img {
    font-size: 3.6rem !important; /* Reduced by 20% */
    margin-bottom: 5px !important; /* Reduced */
  }
  .colony-chest div {
    font-size: 0.48rem !important;
  }
  .play-btn {
    font-size: 1.8rem !important;
    padding: 12px 40px !important;
  }
}

@media (max-width: 768px) {
  .bottom-area {
    position: absolute !important;
    bottom: 10px !important;
    left: 10px !important;
    padding: 0 !important;
    background: none !important;
    width: auto !important;
    z-index: 50;
  }
  .bottom-icons {
    flex-direction: row !important;
    gap: 10px !important;
  }
}

@media (max-width: 768px) {
  .side-menu-left .icon-btn:not(#btn-campaign),
  .side-menu-right .icon-btn {
    width: 45px !important;
    height: 48px !important;
    padding: 3px !important;
  }
  .side-menu-left .icon-btn:not(#btn-campaign) .icon-btn-img,
  .side-menu-right .icon-btn .icon-btn-img {
    font-size: 1.2rem !important;
    margin-bottom: 1px !important;
  }
  .side-menu-left .icon-btn:not(#btn-campaign) .icon-btn-text,
  .side-menu-right .icon-btn .icon-btn-text {
    font-size: 0.45rem !important;
  }
  
  #btn-others {
    width: 28px !important;
    height: 30px !important;
    padding: 2px !important;
    left: 20px !important;
    right: auto !important;
  }
  #btn-others .icon-btn-img {
    font-size: 0.8rem !important;
    margin-bottom: 0px !important;
  }
  #btn-others .icon-btn-text {
    font-size: 0.35rem !important;
  }
}

@media (max-width: 768px) {
  .play-btn-wrapper.center-screen {
    top: auto !important;
    bottom: 110px !important;
    transform: translateX(-50%) !important;
  }
}

@media (max-width: 768px) {
  .bottom-icons-group {
    position: fixed;
    bottom: 20px;
    left: 20px;
    flex-direction: row-reverse !important;
    gap: 15px !important;
  }
}
@media (max-width: 768px) {
  .resources-bar {
    position: absolute !important;
    top: 95px !important; /* Restored gap to profile */
    left: 20px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .res-item {
    width: 90px !important;
    padding: 3px 6px 3px 3px !important;
    gap: 4px !important;
    box-sizing: border-box !important;
    justify-content: flex-start !important;
  }
  .res-icon {
    width: 24px !important;
    height: 24px !important;
    font-size: 1.1rem !important;
  }
  .res-val {
    font-size: 0.75rem !important;
  }
  .res-add {
    display: none !important; /* Hide '+' button on mobile to save space if it exists */
  }
  .side-menu-left {
    top: 215px !important; /* Adjusted to keep equal gap below resources */
    gap: 8px !important;
  }
}
