/* ================================
   🧩 GOOGLE FONT IMPORT
================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ================================
   🎨 ROOT VARIABLEN
================================ */
:root {
  --bg: #0e0e12;
  --card: #16161c;
  --primary: #7b5eff;
  --primary-light: #a78bfa;
  --text: #f1f1f5;
  --text-dim: #a0a0aa;
  --accent: #60a5fa;
  --shadow-dark: 8px 8px 16px #0a0a0d;
  --shadow-light: -8px -8px 16px #1c1c24;
}

/* ================================
   🌐 GLOBAL STYLES
================================ */
* {
  box-sizing: border-box;

  /* 🚫 NIEMALS MARKIERBAR – AUF ALLEN GERÄTEN */
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* ================================
   🧭 LAYOUT
================================ */
.main {
  display: flex;
  gap: 160px;
  align-items: flex-start;
  /* Platz für die Utility-Buttons oben rechts (Quest/Save/Load etc.) */
  margin-top: 70px;
  margin-bottom: 80px;
}

/* ================================
   💎 LINKER BEREICH (Gem)
================================ */
.left {
  text-align: center;
  font-size: 26px;
  font-weight: 600;

  /* ⭐ FIX AGAINST UI JUMPING */
  width: 320px;      /* feste Breite */
  flex-shrink: 0;    /* darf niemals kleiner oder größer werden */
}

.left p {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}


.pink-text {
  color: var(--primary);
  font-size: 42px;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(123, 94, 255, 0.7);
}

.gem-img-container {
  position: relative;
  overflow: visible;
  z-index: 2;
}

.gem-image {
  margin-top: 40px;
  width: 260px;
  transition: all 0.2s ease;
  filter: drop-shadow(0 0 15px rgba(123, 94, 255, 0.3));
}

.gem-image:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 25px rgba(123, 94, 255, 0.6));
  cursor: pointer;
}

.gem-image:active {
  transform: scale(0.98);
}

/* ================================
   🧱 RECHTER BEREICH (Menü)
================================ */
.right {
  background: var(--card);
  border-radius: 24px;
  box-shadow: 0 0 25px rgba(123, 94, 255, 0.25);
  padding: 30px;
  width: 850px;
  max-height: 600px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ================================
   🧭 NAVIGATION (Reiter)
================================ */
.right-navbar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  position: relative;
}

.right-navbar::after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 3px;
  width: 0;
  left: 0;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.right-navbar.active-upgrade::after {
  width: 33.33%;
  left: 0;
}

.right-navbar.active-skills::after {
  width: 33.33%;
  left: 33.33%;
}

.right-navbar.active-artifacts::after {
  width: 33.33%;
  left: 66.66%;
}

/* Buttons */
.right-navbar > div {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  background: var(--bg);
  border-radius: 12px;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  box-shadow: inset 2px 2px 6px #0a0a0d, inset -2px -2px 6px #1f1f27;
  transition: all 0.2s ease;
}

.right-navbar > div:hover {
  background: var(--primary);
  color: white;
  box-shadow: inset 2px 2px 8px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
  cursor: pointer;
}

.right-navbar > div.active {
  background: var(--primary);
  color: white;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

/* ================================
   📜 UPGRADES-CONTAINER
================================ */
#upgrades-container,
#artifacts-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 10px;
  box-sizing: border-box;
}

#upgrades-container::-webkit-scrollbar {
  width: 8px;
}

#upgrades-container::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 8px;
}

#upgrades-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* ================================
   🔺 UPGRADE-KARTEN
================================ */
.upgrade {
  background: var(--bg);
  border-radius: 16px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  box-shadow: var(--shadow-dark), var(--shadow-light);
  transition: all 0.2s ease;
  position: relative;
}

.upgrade-img {
  width: 60px;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.2));
}

.mid-section h4 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.cost-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
}

.gem-img {
  width: 22px;
  height: 22px;
}

.right-section {
  font-weight: 600;
  color: var(--accent);
}

.next-level-info {
  right: -170px;
  width: 150px;
  background: rgba(50, 50, 65, 0.95);
  padding: 10px;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 0 15px rgba(123, 94, 255, 0.4);
  display: none;
}

.upgrade:hover .next-level-info {
  display: block;
  background: rgba(50, 50, 65, 0.95);
}

/* ===========================================
   💎 Einheitlicher blauer Glow für ALLE Items
=========================================== */
.upgrade {
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.4);
  transition: all 0.25s ease;
}

.upgrade:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.7);
}

/* ================================
   📊 STATISTIKEN
================================ */
.texts {
  display: flex;
  justify-content: space-around;
  font-size: 20px;
  font-weight: 600;
}

.statistics.under-card {
  position: relative;
  margin-top: 25px;
  width: 260px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-dark), var(--shadow-light);
  padding: 12px 20px;
  text-align: center;
  transition: all 0.2s ease;
}

.statistics.under-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(123, 94, 255, 0.4);
}

/* ✅ EPC/EPS oben im rechten Panel */
.statistics.top-stats {
  width: 100%;
  background: var(--bg);
  border-radius: 14px;
  padding: 10px 14px;
  margin: 0 0 14px 0;
  box-shadow: inset 2px 2px 6px #0a0a0d, inset -2px -2px 6px #1f1f27;
}

.statistics.top-stats .texts {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
}

.statistics.top-stats .pink-text {
  font-size: 18px;
}

.statistics.under-card .texts {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.statistics.under-card .pink-text {
  font-size: 24px;
}

/* ================================
   🔘 BUTTONS & RELIC-ANZEIGE
================================ */
.util-buttons {
  position: fixed;
  top: 15px;
  right: 15px;
  display: flex;
  gap: 12px;
  z-index: 1001;
}

.util-button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-dark), var(--shadow-light);
}

.util-button:hover {
  transform: scale(1.05);
  background: var(--primary-light);
  cursor: pointer;
}

/* ================================
   💎 TOP-BAR (Relic + LTC Anzeige)
================================ */
.top-bar {
  position: static;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--card);
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(123, 94, 255, 0.35);
}

/* 💎 Relic/LTC im rechten Panel: mittig über den Tabs */
.top-bar-in-panel {
  width: fit-content;
  margin: 0 auto 12px auto;
  justify-content: center;
  max-width: 92%;
}


.top-bar img {
  width: 28px;
  height: 28px;
}

#relic-container, #ltc-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

#relic, #ltc {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-light);
}

/* ================================
   ✨ ANIMATIONEN (+1 etc.)
================================ */
.fade-up {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-light);
  text-shadow: 0 0 10px rgba(123, 94, 255, 0.7);
  animation: fade-up 1s ease-out forwards;
  pointer-events: none;
  z-index: 10;
}

@keyframes fade-up {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, -70px); opacity: 0; }
}

/* ================================
   🔄 SCROLLBAR DESIGN
================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

::-webkit-scrollbar-track {
  background: #1c1c24;
}

/* ================================
   💬 PRESTIGE POPUP & NOTICE
================================ */
.prestige-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.prestige-popup.show {
  display: flex !important;
  pointer-events: all;
}

.prestige-popup-content {
  background: var(--card);
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  color: var(--text);
  box-shadow: 0 0 25px rgba(123, 94, 255, 0.5);
}

.prestige-popup-content h2 {
  margin-bottom: 10px;
  color: var(--primary);
}

.popup-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.popup-buttons button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.popup-buttons button:hover {
  background: var(--primary-light);
}

/* ================================
   ⚡ PRESTIGE-HINWEIS
================================ */
.prestige-notice {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(123, 94, 255, 0.6);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.prestige-notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

.prestige-notice.hidden {
  display: none;
}

/* ================================
   🧩 UTILITIES
================================ */
.hidden {
  display: none !important;
  /* pointer-events: none;  ❌ entfernen! */
}

#skills-nav-button.locked {
  opacity: 0.4;
  pointer-events: auto;
  cursor: not-allowed;
}

/* ================================
   🚫 SKILL-NOTICE
================================ */
.skill-notice {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: #ff3b3b;
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(255, 59, 59, 0.6);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.skill-notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

.skill-notice.hidden {
  display: none;
}

/* 🔥 PowerUp Glow Effekt */
@keyframes powerup-glow {
  0% { box-shadow: 0 0 0px rgba(255, 215, 0, 0.0); transform: scale(1); }
  30% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.8); transform: scale(1.05); }
  70% { box-shadow: 0 0 40px rgba(255, 215, 0, 1); transform: scale(1.02); }
  100% { box-shadow: 0 0 0px rgba(255, 215, 0, 0.0); transform: scale(1); }
}

.powerup-activated {
  animation: powerup-glow 1.2s ease-out;
  border-color: gold !important;
}

/* 💫 Preis blinkt kurz golden */
.price-updated {
  animation: blinkPrice 0.8s ease-in-out;
}

@keyframes blinkPrice {
  0% { color: #fff; text-shadow: none; }
  25% { color: gold; text-shadow: 0 0 10px gold; }
  50% { color: #fff; text-shadow: none; }
  75% { color: gold; text-shadow: 0 0 8px gold; }
  100% { color: #fff; text-shadow: none; }
}

/* 🟦 BOOSTS */
.type-boost {
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.4);
}

.type-boost:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.7);
}

.boost-active {
  border-color: limegreen !important;
  box-shadow: 0 0 18px rgba(50, 205, 50, 0.7);
  opacity: 0.95;
  position: relative;
  animation: pulse 2s infinite ease-in-out;
}

.boost-timer {
  position: absolute;
  top: 8px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #00ff88;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 14px;
  letter-spacing: 0.5px;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

/* ================================
   🌟 PRESTIGE RESET ANIMATION
================================ */

.prestige-reset-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(160,100,255,0.8), rgba(0,0,0,0.9));
  z-index: 5000;
  pointer-events: none;
  animation: prestigeFlash 1.6s ease-out forwards;
}

@keyframes prestigeFlash {
  0%   { opacity: 0; transform: scale(1); }
  10%  { opacity: 1; transform: scale(1.05); }
  40%  { opacity: 1; transform: scale(1.1); }
  70%  { opacity: 0.7; transform: scale(1.0); }
  100% { opacity: 0; transform: scale(1); }
}

/* Zahlen fliegen nach oben */
@keyframes prestigeNumberFly {
  0%   { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -120px) scale(1.4); }
}

.prestige-number-fly {
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translateX(-50%);
  color: var(--primary-light);
  font-size: 40px;
  font-weight: 900;
  text-shadow: 0 0 25px var(--primary);
  animation: prestigeNumberFly 1.4s ease-out forwards;
  z-index: 5100;
}

/* =======================================
   ✨ PRESTIGE PARTICLE EXPLOSION
======================================= */
.prestige-particle {
  position: fixed;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, gold, orange);
  border-radius: 50%;
  pointer-events: none;
  z-index: 6000;
  box-shadow: 0 0 10px gold;
  animation: particleFly 1.2s ease-out forwards;
}

@keyframes particleFly {
  0%   { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.2); }
}

/* =======================================
   💰 RELIC RAIN
======================================= */
.relic-rain {
  position: fixed;
  font-size: 26px;
  color: gold;
  text-shadow: 0 0 12px gold;
  font-weight: 900;
  pointer-events: none;
  z-index: 6000;
  animation: relicFall 2.2s linear forwards;
}

@keyframes relicFall {
  0%   { transform: translateY(-50px) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

/* =======================================
   💠 RELIC FLY TO COUNTER
======================================= */
.relic-fly {
  position: fixed;
  width: 26px;
  height: 26px;
  pointer-events: none;
  z-index: 6000;
  font-size: 26px;
  color: gold;
  text-shadow: 0 0 12px gold;
  transform: translate(-50%, -50%);
  animation: relicFlyAnim 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes relicFlyAnim {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  80%  { opacity: 1; transform: translate(-50%, -50%) scale(0.7); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.1); }
}

/* Fix: große Eurozahlen verhindern Layout-Verschiebung */
.gem-cost {
  display: inline-block;
  min-width: 200px;       /* genug Platz für große Zahlen */
  text-align: center;
  font-family: 'Inter', monospace;
  letter-spacing: 1px;
}

#epc, #eps {
  display: inline-block;
  min-width: 100px;
  text-align: right;
  font-family: 'Inter', monospace;
}

/* 🌟 Euro-Symbol Glow Effekt */
.euro-symbol {
  margin-left: 6px;
  font-size: 1.2em;
  color: #ff66ff;                /* pink */
  text-shadow: 
    0 0 6px #ff66ff,
    0 0 12px #ff33ff,
    0 0 18px #ff00ff;
  font-weight: bold;
  pointer-events: none;
}

/* 🌟 Pulsierender Glow bei Geldanstieg */
.gem-glow-animate {
  animation: gemPulse 0.25s ease-out;
}

@keyframes gemPulse {
  0%   { text-shadow: 0 0 4px #ff99ff, 0 0 10px #ff33ff; transform: scale(1); }
  50%  { text-shadow: 0 0 14px #ff00ff, 0 0 18px #ff00ff; transform: scale(1.07); }
  100% { text-shadow: 0 0 6px #ff66ff, 0 0 12px #ff33ff; transform: scale(1); }
}

.save-load-notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  padding: 12px 25px;
  border-radius: 12px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  opacity: 0;
  z-index: 5000;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.save-load-notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

/* ============================================
   ✨ Prestige Progress Bar – Glitzer + Shine
============================================ */
#prestige-progress-container {
  position: relative;
  width: 100%;
  height: 20px;
  background: #2d2d2d;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #444;
  margin-top: 15px;
}

/* Hauptbalken (bewegter Farbverlauf) */
#prestige-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    #ff00c8,
    #ff54ff,
    #b800ff,
    #ff54ff,
    #ff00c8
  );
  background-size: 300% 100%;
  animation: prestigeBarMove 4s linear infinite;
  box-shadow: 0 0 15px #ff46ff;
  transition: width 0.4s ease-out;
}

/* Hintergrundanimation */
@keyframes prestigeBarMove {
  0%   { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}

/* ⭐ Zusätzlich: Glitzer-Overlay auf dem Balken */
#prestige-progress-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150px;
  width: 120px;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,0.8) 50%,
    transparent 100%
  );
  opacity: 0.7;
  filter: blur(5px);
  animation: prestigeShine 2.8s ease-in-out infinite;
}

@keyframes prestigeShine {
  0%   { transform: translateX(0); opacity: 0; }
  20%  { opacity: 0.8; }
  50%  { transform: translateX(350px); opacity: 0; }
  100% { transform: translateX(350px); opacity: 0; }
}

/* Glitzer-Punkte */
.prestige-glitter {
  position: absolute;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 10px white;
  pointer-events: none;
  animation: glitterAnim 1.2s ease-out forwards;
}

@keyframes glitterAnim {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0) translateY(-15px); }
}

/* =======================================
   ⚡ SCHÖNE ANIMIERTE UTILITY–LEISTE
======================================= */

.fancy-bar {
  position: fixed;
  top: 15px;
  right: 15px;

  display: flex;
  gap: 14px;

  background: rgba(20, 20, 30, 0.85);
  padding: 12px 18px;
  border-radius: 16px;

  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);

  box-shadow: 0 0 25px rgba(123, 94, 255, 0.25);
  animation: barSlideIn 0.7s ease forwards;
  opacity: 0;
}

@keyframes barSlideIn {
  0% { 
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
  }
  100% { 
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.fancy-bar .util-button {
  background: linear-gradient(135deg, #6f46ff, #a78bfa);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 600;

  box-shadow: 0 0 12px rgba(123, 94, 255, 0.6);
  transition: all 0.25s ease;
}

/* Hover */
.fancy-bar .util-button:hover {
  cursor: pointer;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 20px rgba(166, 129, 255, 0.8);
  filter: brightness(1.1);
}

/* Active click */
.fancy-bar .util-button:active {
  transform: scale(0.95);
  box-shadow: 0 0 10px rgba(166, 129, 255, 0.4);
}

/* Gamble bekommt eine andere Farbe */
#gamble-button {
  background: linear-gradient(135deg, #ff3b9b, #ff7ac4);
  box-shadow: 0 0 15px rgba(255, 59, 155, 0.6);
}

#gamble-button:hover {
  box-shadow: 0 0 22px rgba(255, 59, 155, 1);
}

/* Prestige = goldener Look */
.prestige-button {
  background: linear-gradient(135deg, gold, orange);
  box-shadow: 0 0 15px rgba(255, 180, 0, 0.7);
}

.prestige-button:hover {
  box-shadow: 0 0 22px rgba(255, 180, 0, 1);
}

/* Save & Load = blau */
.util-button:nth-last-child(2),
.util-button:last-child {
  background: linear-gradient(135deg, #3ba7ff, #4fb3ff);
  box-shadow: 0 0 15px rgba(70, 160, 255, 0.7);
}

.util-button:nth-last-child(2):hover,
.util-button:last-child:hover {
  box-shadow: 0 0 22px rgba(70, 160, 255, 1);
}

/* === Fullscreen Layout für Gamble-Popup === */
.gamble-popup-content {
  width: 100vw;
  height: 100vh;
  border-radius: 0;               /* keine runden Ecken mehr */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 20px 30px;
}

/* Titel + Spiel-Buttons oben */
.gamble-game-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
}

/* Der Bereich, in dem das Iframe sitzt: füllt die Mitte */
#gamble-game-container {
  flex: 1;                /* nimmt den ganzen restlichen Platz */
  margin-top: 20px;
  min-height: 0;
}

/* Iframe füllt den Container exakt aus, ohne zu groß zu werden */
#gamble-game-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

/* Schließen-Button unten */
.gamble-popup-content .popup-buttons {
  margin-top: 12px;
}

/* ===========================================
   🌟 GLOBALER POPUP STIL MIT FADE-IN / OUT
========================================== */

.popup {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;

  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.35s ease;
  z-index: 3000;
}

/* Wenn Popup aktiv ist */
.popup.show {
  opacity: 1;
  pointer-events: all;
}

/* Popup-Box Animation */
.popup-box {
  background: var(--card);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(123, 94, 255, 0.4);

  transform: scale(0.85);
  opacity: 0;
  transition: all 0.35s ease;
}

/* Wenn Popup aktiv ist → skalieren */
.popup.show .popup-box {
  transform: scale(1);
  opacity: 1;
}

/* =========================
   MOBILE / TABLET RESPONSIVE
========================= */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  touch-action: manipulation; /* weniger “Doppeltipp zoom” */
}

img, canvas, iframe {
  max-width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  /* Hauptcontainer breiter machen */
  .container, .wrapper, .main, .app, .game-root {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px !important;
  }

  /* Buttons/Input größer klickbar */
  button, input, select {
    min-height: 44px;
    font-size: 16px; /* iOS verhindert Zoom bei Fokus */
  }
}

/* =========================================================
   MOBILE OVERRIDES – Desktop bleibt unverändert
   Greift nur, wenn Bildschirm schmal ist (Handy/Tablet)
========================================================= */
@media (max-width: 980px) {
  html, body {
    overflow-x: hidden;
  }

  /* allgemein: alles darf schrumpfen */
  * { max-width: 100%; }

  /* größere Touch-Ziele */
  button, input, select {
    min-height: 44px;
    font-size: 16px; /* iOS verhindert Zoom beim Tippen */
  }

  /* Container/Wrapper: volle Breite */
  .container, .wrapper, .main, .app, .game-root {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px !important;
  }

  /* falls du irgendwo Flex-Layouts hast */
  .row, .top-row, .header-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* iframes (Market/Gamble/Quest) */
  iframe {
    width: 100% !important;
    height: 78vh !important;
    border-radius: 14px;
  }
}

/* sehr kleine Handys */
@media (max-width: 420px) {
  iframe { height: 72vh !important; }
}

/* =========================================================
   ✅ HEADER-BARS sollen exakt wie Tabs aussehen (Höhe + Font)
   Tabs: padding 12px 0, font-size 15px
========================================================= */

/* gemeinsame "Tab-Höhe" */
:root{
  --tab-h: 44px;      /* gleiche Klick-Höhe */
  --tab-fs: 15px;     /* gleiche Schriftgröße wie Tabs */
}

/* RELIC / LTC BAR (wie Tab-Button) */
.top-bar.top-bar-in-panel{
  background: var(--bg);
  border-radius: 12px;
  box-shadow: inset 2px 2px 6px #0a0a0d, inset -2px -2px 6px #1f1f27;

  min-height: var(--tab-h);
  padding: 0 14px;            /* keine Extra-Höhe durch Padding */
  margin: 0 auto 10px auto;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.top-bar.top-bar-in-panel img{
  width: 20px;
  height: 20px;
}

.top-bar.top-bar-in-panel #relic-container,
.top-bar.top-bar-in-panel #ltc-container{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--tab-fs);
  font-weight: 600;
  color: var(--text);
}

.top-bar.top-bar-in-panel #relic,
.top-bar.top-bar-in-panel #ltc{
  font-size: var(--tab-fs);
  font-weight: 600;
  color: var(--text); /* wie Tabs (nicht größer/glow) */
}

/* EPC / EPS BAR (wie Tab-Button) */
.statistics.top-stats{
  background: var(--bg);
  border-radius: 12px;
  box-shadow: inset 2px 2px 6px #0a0a0d, inset -2px -2px 6px #1f1f27;

  min-height: var(--tab-h);
  padding: 0 14px;
  margin: 0 0 12px 0;

  display: flex;
  align-items: center;
}

/* Layout: links EPC, rechts EPS (einzeilig, zentriert in der Höhe) */
.statistics.top-stats .texts{
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;

  font-size: var(--tab-fs);
  font-weight: 600;
  color: var(--text);
}

/* Werte exakt gleiche Größe wie Labels */
.statistics.top-stats #epc,
.statistics.top-stats #eps{
  font-size: var(--tab-fs) !important;
  font-weight: 600 !important;
  color: var(--primary-light) !important;
  text-shadow: none !important;
}

/* falls in deinem HTML die Werte noch class="pink-text" haben → neutralisieren */
.statistics.top-stats .pink-text{
  font-size: var(--tab-fs) !important;
  font-weight: 600 !important;
  text-shadow: none !important;
}

/* =========================================
   🎨 EPC / EPS – Werte wieder pink (nur Zahlen)
========================================= */

/* Label bleibt normal */
.statistics.top-stats span.label,
.statistics.top-stats .label {
  color: var(--text);
  font-weight: 600;
}

/* Werte wie Tabs, aber pink */
.statistics.top-stats #epc,
.statistics.top-stats #eps{
  font-size: var(--tab-fs) !important;
  font-weight: 700 !important;              
  text-shadow: 0 0 8px rgba(123, 94, 255, 0.75) !important;
}

/* =====================================================
   📱 MOBILE LAYOUT (nur Handy/Tablet)
   Desktop bleibt unverändert
===================================================== */

@media (max-width: 900px) {
  /* Seite scrollbar machen (statt 100vh grid) */
  body {
    height: auto;
    overflow-y: auto;
    display: block;
    padding: 18px 12px 40px 12px;
  }

  /* Hauptlayout untereinander */
  .main {
    flex-direction: column;
    gap: 18px;
    margin-top: 18px;
    margin-bottom: 24px;
    align-items: center;
  }

  .left {
    width: 100%;
    max-width: 420px;
    font-size: 22px;
  }

  .pink-text {
    font-size: 34px;
  }

  .gem-image {
    width: 200px;
    margin-top: 18px;
  }

  .right {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    max-height: none;
  }

  .right-navbar > div {
    font-size: 14px;
    padding: 10px 0;
  }

  /* Tooltip rechts nicht aus dem Screen schieben */
  .next-level-info {
    position: static;
    width: 100%;
    margin-top: 8px;
  }
}

/* =====================================================
   📱 MOBILE: Utility Buttons als ⋮ Menü (oben rechts)
   - Desktop: bleibt wie bisher (fancy-bar)
   - Mobile: zeigt nur ⋮ + Dropdown
===================================================== */

.util-menu-toggle { display: none; }
.util-menu-panel { display: none; }

@media (max-width: 900px) {
  /* Desktop-Leiste auf Mobile ausblenden */
  .util-buttons,
  .fancy-bar {
    display: none !important;
  }

  /* ⋮ Toggle */
  .util-menu-toggle {
    display: flex;
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 6000;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #6f46ff, #a78bfa);
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    box-shadow: 0 0 18px rgba(123, 94, 255, 0.6);
    cursor: pointer;
  }

  /* Dropdown Panel */
  .util-menu-panel {
    position: fixed;
    top: 66px;
    right: 14px;
    width: 220px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(20, 20, 30, 0.92);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 0 28px rgba(123, 94, 255, 0.35);
    backdrop-filter: blur(10px);
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 6001;
  }

  .util-menu-panel.open {
    display: flex;
  }

  .util-menu-panel .util-button {
    width: 100%;
    min-height: 46px;
    font-size: 15px;
    border-radius: 12px;
  }

  .util-menu-panel a { text-decoration: none; }
}

/* ================================
   📱 MOBILE: ... Menü statt Button-Leiste
================================ */
.util-menu-toggle { display: none; }

@media (max-width: 900px) {
  /* Container oben rechts */
  .util-buttons{
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 4000;
  }

  /* ⋮ Button */
  .util-menu-toggle{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #7b5cff, #5b8cff);
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    box-shadow: 0 0 18px rgba(123,94,255,0.6);
    cursor: pointer;
  }

  /* Dropdown Panel */
  .util-menu-panel{
    position: absolute;
    top: 52px;      /* direkt unter ⋮ */
    right: 0;

    width: 220px;
    padding: 12px;
    border-radius: 16px;

    display: none;
    flex-direction: column;
    gap: 10px;

    background: rgba(8, 12, 28, 0.96);
    border: 1px solid rgba(123,94,255,0.35);
    box-shadow: 0 0 30px rgba(123,94,255,0.35);
  }

  /* geöffnet */
  .util-buttons.menu-open .util-menu-panel{
    display: flex;
  }

  /* Buttons im Dropdown */
  .util-menu-panel .util-button{
    width: 100%;
    min-height: 44px;
    font-size: 16px;
    border-radius: 12px;
  }
}

