@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0c;
  --bg-glass: rgba(255, 255, 255, 0.02);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-active: rgba(255, 255, 255, 0.25);

  --color-text-main: #ffffff;
  --color-text-muted: #77777c;

  /* Monochromatic Accent Palette */
  --color-white: #ffffff;
  --color-light-grey: #e0e0e6;
  --color-mid-grey: #8a8a93;
  --color-dark-grey: #2e2e33;
  --color-gold: #ffffff;

  /* Ball 3D Gradients */
  /* Main Ball: Glossy White Marble */
  --gradient-main-ball: radial-gradient(circle at 35% 35%, #ffffff 0%, #f0f0f5 30%, #cccccc 75%, #aaaaaf 100%);
  --color-main-ball-text: #000000;

  /* Thunderball: Glossy Obsidian/Midnight Black */
  --gradient-tball: radial-gradient(circle at 35% 35%, #55555a 0%, #2c2c30 25%, #0d0d10 75%, #000000 100%);
  --color-tball-text: #ffffff;

  --shadow-neon-main: 0 0 15px rgba(255, 255, 255, 0.4);
  --shadow-neon-tball: 0 0 15px rgba(255, 255, 255, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.1);
  --shadow-match-glow: 0 0 20px 3px rgba(255, 255, 255, 0.8);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at 50% 50%, #121214 0%, #000000 100%);
  color: var(--color-text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 10px;
  overflow-x: hidden;
}

.app-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Header Section */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.logo-container {
  display: flex;
  flex-direction: column;
}

h1.logo-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 40%, #888888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

h1.logo-title span {
  background: none;
  -webkit-text-fill-color: initial;
  color: transparent;
  -webkit-text-stroke: 1px #ffffff;
}

.logo-subtitle {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  letter-spacing: 1.5px;
}

/* Wallet widget */
.wallet-widget {
  display: flex;
  align-items: center;
  gap: 15px;
}

.wallet-balance {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 22px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-white);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.wallet-balance.pulse-green {
  animation: pulse-white-glow 0.8s ease-out;
}

.wallet-balance.pulse-red {
  animation: pulse-grey-glow 0.8s ease-out;
}

/* Main Layout Grid */
.main-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* Panels (Glassmorphism) */
.glass-panel {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.panel-title span.count {
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-text-muted);
}

/* Number Pickers Grid */
.number-selector-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 8px;
}

.pick-btn {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  color: var(--color-text-main);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pick-btn:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Selected state for main balls: White sphere with Black text */
.pick-btn.main-selected {
  background: var(--gradient-main-ball);
  border-color: var(--color-white);
  box-shadow: var(--shadow-neon-main);
  transform: scale(1.05) translateY(-2px);
  color: var(--color-main-ball-text);
  text-shadow: none;
}

/* Selected state for Thunderball: Black sphere with White text */
.pick-btn.tball-selected {
  background: var(--gradient-tball);
  border-color: var(--color-white);
  box-shadow: var(--shadow-neon-tball);
  transform: scale(1.05) translateY(-2px);
  color: var(--color-tball-text);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Control actions underneath selectors */
.selector-actions {
  display: flex;
  gap: 12px;
}

.btn-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--color-text-main);
  padding: 12px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glass-active);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Play Console styling */
.play-console {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Ticket Summary Display */
.ticket-summary {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-summary-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 1px;
}

.ticket-balls-row {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  min-height: 52px;
}

/* Standard Ball styling in ticket and draws */
.ball {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.ball.main {
  background: var(--gradient-main-ball);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--color-main-ball-text);
}

.ball.thunderball {
  background: var(--gradient-tball);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-tball-text);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.ball-placeholder {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.005);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

/* Play button: High Contrast Solid White */
.btn-primary {
  width: 100%;
  background: var(--color-white);
  border: 1px solid var(--color-white);
  color: #000000;
  padding: 16px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
  background: #f0f0f5;
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--border-glass);
  box-shadow: none;
  cursor: not-allowed;
}

/* Draw Sequence Area */
.draw-area {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  align-items: center;
}

.draw-title {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  align-self: flex-start;
}

.draw-balls-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
  flex-wrap: wrap;
}

.draw-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 4px;
}

/* Animations for drawn balls */
.ball.animate-draw {
  animation: roll-and-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.ball.matched {
  box-shadow: var(--shadow-match-glow), 0 4px 12px rgba(0, 0, 0, 0.5);
  border-color: var(--color-white);
  position: relative;
}

.ball.matched::after {
  content: '✓';
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-white);
  color: #000000;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Results panel */
.results-panel {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.3s;
  min-height: 90px;
  justify-content: center;
}

.results-panel.has-result {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.results-panel.has-win {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: panel-glow 1.5s infinite alternate;
}

.result-status {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-text-muted);
}

.result-prize {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-prize.win {
  color: var(--color-white);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.result-match-desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Bottom Stats Dashboard */
.stats-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

.stat-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 1px;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 700;
}

.stat-value.green {
  color: var(--color-white);
}

.stat-value.red {
  color: var(--color-mid-grey);
}

.stat-value.gold {
  color: var(--color-white);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  padding-bottom: 2px;
  width: max-content;
}

/* History Log Section */
.history-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.history-container {
  max-height: 280px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.3);
}

/* Custom Scrollbar for history log */
.history-container::-webkit-scrollbar {
  width: 6px;
}

.history-container::-webkit-scrollbar-track {
  background: transparent;
}

.history-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.history-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.history-table th {
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1;
}

.history-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  vertical-align: middle;
}

.history-table tr:hover {
  background: rgba(255, 255, 255, 0.005);
}

.history-balls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.history-ball {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-ball.main {
  background: var(--gradient-main-ball);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--color-main-ball-text);
}

.history-ball.thunderball {
  background: var(--gradient-tball);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-tball-text);
}

.history-ball.match {
  box-shadow: 0 0 6px 1.5px rgba(255, 255, 255, 0.8);
  border-color: var(--color-white);
}

.history-prize {
  font-weight: 600;
}

.history-prize.win {
  color: var(--color-white);
}

/* Animations */
@keyframes roll-and-pop {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }

  70% {
    transform: scale(1.12) rotate(10deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes pulse-white-glow {
  0% {
    box-shadow: 0 0 0px rgba(255, 255, 255, 0);
    border-color: rgba(255, 255, 255, 0.15);
  }

  30% {
    box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.4);
    border-color: var(--color-white);
  }

  100% {
    box-shadow: 0 0 0px rgba(255, 255, 255, 0);
    border-color: rgba(255, 255, 255, 0.15);
  }
}

@keyframes pulse-grey-glow {
  0% {
    box-shadow: 0 0 0px rgba(255, 255, 255, 0);
    border-color: rgba(255, 255, 255, 0.15);
  }

  30% {
    box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.15);
    border-color: var(--color-mid-grey);
  }

  100% {
    box-shadow: 0 0 0px rgba(255, 255, 255, 0);
    border-color: rgba(255, 255, 255, 0.15);
  }
}

@keyframes panel-glow {
  0% {
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.01), 0 0 5px rgba(255, 255, 255, 0.02);
  }

  100% {
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05), 0 0 12px rgba(255, 255, 255, 0.08);
  }
}

/* Empty placeholder row in history table */
.no-history {
  color: var(--color-text-muted);
  text-align: center;
  padding: 40px !important;
  font-style: italic;
}

/* ========================================== */
/* Navigation Tabs & Navigation Header        */
/* ========================================== */
.nav-tabs {
  display: flex;
  gap: 12px;
}

.nav-tab {
  padding: 10px 20px;
  border-radius: 10px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.01);
}

.nav-tab:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.05);
}

@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .nav-tabs {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }
}

/* ========================================== */
/* ESP Card Component & Layout Styles         */
/* ========================================== */
.card-container {
  perspective: 1000px;
  width: 200px;
  height: 290px;
  margin: 10px auto 20px;
}

.esp-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.esp-card.is-flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 24px;
  border: 2px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  transition: border-color 0.3s, box-shadow 0.3s;
}

/* Card Back (Faced down, visible initially) */
.card-back-side {
  background: radial-gradient(circle at 50% 50%, #171720 0%, #060609 100%);
  color: var(--color-white);
  z-index: 2;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.03);
}

.card-back-side::before {
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 12px;
  right: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  pointer-events: none;
}

.card-back-side .aura-glow {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 70%);
  position: absolute;
  animation: aura-breathe 3s infinite ease-in-out;
  pointer-events: none;
}

.card-back-side .card-icon {
  font-size: 3.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 40%, #55555e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6));
  user-select: none;
}

/* Card Front (Faced up, reveals symbol) */
.card-front-side {
  background: radial-gradient(circle at 50% 50%, #13131a 0%, #030305 100%);
  transform: rotateY(180deg);
  z-index: 1;
}

.card-front-side::before {
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 12px;
  right: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  pointer-events: none;
}

.esp-symbol {
  font-size: 5.5rem;
  font-weight: 800;
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}

.symbol-name {
  margin-top: 18px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-weight: 600;
}

/* Zener Cards Theme Customizations */
/* 1: Circle (Cyan) */
.esp-card[data-symbol="1"] .card-front-side {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 35px rgba(0, 229, 255, 0.18);
}

.esp-card[data-symbol="1"] .esp-symbol {
  background: linear-gradient(135deg, #a2f8ff 0%, #00e5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.esp-card[data-symbol="1"] .symbol-name {
  color: #00e5ff;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}

/* 2: Cross (Purple) */
.esp-card[data-symbol="2"] .card-front-side {
  border-color: rgba(213, 0, 249, 0.35);
  box-shadow: 0 0 35px rgba(213, 0, 249, 0.18);
}

.esp-card[data-symbol="2"] .esp-symbol {
  background: linear-gradient(135deg, #f4b0ff 0%, #d500f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.esp-card[data-symbol="2"] .symbol-name {
  color: #d500f9;
  text-shadow: 0 0 8px rgba(213, 0, 249, 0.3);
}

/* 3: Waves (Green) */
.esp-card[data-symbol="3"] .card-front-side {
  border-color: rgba(0, 230, 118, 0.35);
  box-shadow: 0 0 35px rgba(0, 230, 118, 0.18);
}

.esp-card[data-symbol="3"] .esp-symbol {
  background: linear-gradient(135deg, #b9ffd0 0%, #00e676 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.esp-card[data-symbol="3"] .symbol-name {
  color: #00e676;
  text-shadow: 0 0 8px rgba(0, 230, 118, 0.3);
}

/* 4: Square (Orange) */
.esp-card[data-symbol="4"] .card-front-side {
  border-color: rgba(255, 109, 0, 0.35);
  box-shadow: 0 0 35px rgba(255, 109, 0, 0.18);
}

.esp-card[data-symbol="4"] .esp-symbol {
  background: linear-gradient(135deg, #ffd0b0 0%, #ff6d00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.esp-card[data-symbol="4"] .symbol-name {
  color: #ff6d00;
  text-shadow: 0 0 8px rgba(255, 109, 0, 0.3);
}

/* 5: Star (Gold/Yellow) */
.esp-card[data-symbol="5"] .card-front-side {
  border-color: rgba(255, 215, 0, 0.35);
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.18);
}

.esp-card[data-symbol="5"] .esp-symbol {
  background: linear-gradient(135deg, #fff39a 0%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.esp-card[data-symbol="5"] .symbol-name {
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

/* Choices Buttons Grid */
.esp-choices-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.esp-choice-btn {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  color: var(--color-text-main);
  padding: 18px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: inherit;
}

.esp-choice-btn:hover:not(:disabled) {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-active);
  transform: translateY(-4px);
}

.esp-choice-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.esp-choice-btn .choice-number {
  font-size: 1.6rem;
  font-weight: 800;
}

.esp-choice-btn .choice-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
}

/* Hover-glow matching parent symbol configurations */
.esp-choice-btn[data-num="1"]:hover:not(:disabled) {
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.2);
  border-color: rgba(0, 229, 255, 0.5);
  color: #00e5ff;
}

.esp-choice-btn[data-num="2"]:hover:not(:disabled) {
  box-shadow: 0 4px 15px rgba(213, 0, 249, 0.2);
  border-color: rgba(213, 0, 249, 0.5);
  color: #d500f9;
}

.esp-choice-btn[data-num="3"]:hover:not(:disabled) {
  box-shadow: 0 4px 15px rgba(0, 230, 118, 0.2);
  border-color: rgba(0, 230, 118, 0.5);
  color: #00e676;
}

.esp-choice-btn[data-num="4"]:hover:not(:disabled) {
  box-shadow: 0 4px 15px rgba(255, 109, 0, 0.2);
  border-color: rgba(255, 109, 0, 0.5);
  color: #ff6d00;
}

.esp-choice-btn[data-num="5"]:hover:not(:disabled) {
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.5);
  color: #ffd700;
}

/* Selected state styling */
.esp-choice-btn.selected {
  transform: translateY(-4px);
}

.esp-choice-btn.selected[data-num="1"] {
  border-color: #00e5ff;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.06);
  color: #00e5ff;
}

.esp-choice-btn.selected[data-num="2"] {
  border-color: #d500f9;
  box-shadow: 0 0 15px rgba(213, 0, 249, 0.35);
  background: rgba(213, 0, 249, 0.06);
  color: #d500f9;
}

.esp-choice-btn.selected[data-num="3"] {
  border-color: #00e676;
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.35);
  background: rgba(0, 230, 118, 0.06);
  color: #00e676;
}

.esp-choice-btn.selected[data-num="4"] {
  border-color: #ff6d00;
  box-shadow: 0 0 15px rgba(255, 109, 0, 0.35);
  background: rgba(255, 109, 0, 0.06);
  color: #ff6d00;
}

.esp-choice-btn.selected[data-num="5"] {
  border-color: #ffd700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.35);
  background: rgba(255, 215, 0, 0.06);
  color: #ffd700;
}

/* ESP Results & Info Panels */
.results-panel.has-esp-hit {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: panel-glow 1.5s infinite alternate;
}

.results-panel.has-esp-miss {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.result-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.result-badge.hit {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

.result-badge.miss {
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-text-muted);
}

.esp-status-card {
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(255, 255, 255, 0.005);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.esp-status-title {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.esp-status-rating {
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-white);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.esp-status-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* History Ball configurations for ESP symbols */
.history-ball.esp-symbol-preview {
  border-radius: 6px;
  width: auto;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  font-weight: 800;
}

.history-ball.esp-symbol-preview[data-sym="1"] {
  background: rgba(0, 229, 255, 0.1);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.history-ball.esp-symbol-preview[data-sym="2"] {
  background: rgba(213, 0, 249, 0.1);
  color: #d500f9;
  border: 1px solid rgba(213, 0, 249, 0.2);
}

.history-ball.esp-symbol-preview[data-sym="3"] {
  background: rgba(0, 230, 118, 0.1);
  color: #00e676;
  border: 1px solid rgba(0, 230, 118, 0.2);
}

.history-ball.esp-symbol-preview[data-sym="4"] {
  background: rgba(255, 109, 0, 0.1);
  color: #ff6d00;
  border: 1px solid rgba(255, 109, 0, 0.2);
}

.history-ball.esp-symbol-preview[data-sym="5"] {
  background: rgba(255, 215, 0, 0.1);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.history-ball.esp-symbol-preview.outcome-hit {
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
  border-color: #ffffff;
}

/* Animations */
@keyframes aura-breathe {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.9;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.1));
  }
}

/* ========================================== */
/* ESP Numbers Game Theme Customizations      */
/* ========================================== */

/* ESP Numbers target card configuration */
.esp-card.number-card .card-front-side {
  border-color: rgba(213, 0, 249, 0.35);
  box-shadow: 0 0 35px rgba(213, 0, 249, 0.18);
}

.esp-card.number-card .esp-symbol {
  font-size: 4.8rem;
  font-weight: 800;
  font-family: 'Outfit', monospace, sans-serif;
  background: linear-gradient(135deg, #f4b0ff 0%, #d500f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.esp-card.number-card .symbol-name {
  color: #d500f9;
  text-shadow: 0 0 8px rgba(213, 0, 249, 0.3);
}

/* Number pick button selected state (purple glow) */
.pick-btn.number-selected {
  background: radial-gradient(circle at 35% 35%, #f4b0ff 0%, #ab47bc 75%, #4a148c 100%);
  border-color: #f4b0ff;
  box-shadow: 0 0 15px rgba(213, 0, 249, 0.4);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* History ball preview for number guesses */
.history-ball.number-preview {
  border-radius: 6px;
  width: auto;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  font-weight: 800;
  background: rgba(213, 0, 249, 0.1);
  color: #d500f9;
  border: 1px solid rgba(213, 0, 249, 0.2);
}

.history-ball.number-preview.outcome-hit {
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
  border-color: #ffffff;
  background: rgba(213, 0, 249, 0.2);
}

/* ========================================== */
/* Cosmic Ads Placement System                */
/* ========================================== */
.cosmic-ad-container {
  margin-top: 15px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.005);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.cosmic-ad-container.ad-banner-active {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.015);
}

.ad-sponsored {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 6px;
}

.ad-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ad-text-block {
  flex: 1;
}

.ad-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.5px;
}

.ad-desc {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

.ad-action-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--color-white);
  padding: 6px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.ad-action-btn:hover {
  background: var(--color-white);
  color: #000000;
  transform: translateY(-1px);
}




/* ========================================== */
/* Leaderboard Extensions                    */
/* ========================================== */
.leaderboard-player-row {
  border-left: 3px solid;
  animation: border-glow-pulse 2s infinite alternate;
}

@keyframes border-glow-pulse {
  0% {
    box-shadow: inset 5px 0 10px rgba(255, 255, 255, 0.02);
  }

  100% {
    box-shadow: inset 8px 0 15px rgba(255, 255, 255, 0.06);
  }
}

/* ========================================== */
/* Home Page Academy Styles                   */
/* ========================================== */
.academy-intro h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 40%, #888888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ========================================== */
/* Psychic Evolution Log & Charts             */
/* ========================================== */
.evolution-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .evolution-layout {
    grid-template-columns: 1fr;
  }
}

.timeline-day-row {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s, transform 0.2s;
}

.timeline-day-row:hover {
  background: rgba(255, 255, 255, 0.03);
  transform: translateX(2px);
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-white);
}

.timeline-metrics {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  text-align: right;
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.metric-item span {
  color: var(--color-text-muted);
}

.metric-item strong {
  color: var(--color-light-grey);
}

.trend-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  min-width: 50px;
  text-align: center;
  display: inline-block;
}

.trend-tag.up {
  background: rgba(0, 230, 118, 0.15);
  color: #00e676;
}

.trend-tag.down {
  background: rgba(255, 23, 68, 0.15);
  color: #ff1744;
}

.trend-tag.neutral {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-muted);
}

.trend-tag.initial {
  background: rgba(255, 215, 0, 0.1);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

/* ========================================== */
/* Auth Portal & Profile Views               */
/* ========================================== */

/* Single centered auth page layout */
.auth-page-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.auth-panel {
  width: 100%;
  max-width: 540px;
}

/* Auth tabs */
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-top: -10px;
}

.auth-tabs .btn-secondary {
  flex: 1;
  padding: 10px;
  font-size: 0.82rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.01);
}

.auth-tabs .btn-secondary.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--color-white);
}

/* Form layout */
#signup-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 6px;
}

/* Form group */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 1px;
  font-weight: 600;
}

.form-hint {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  opacity: 0.7;
  line-height: 1.3;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group select {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 13px 16px;
  color: var(--color-white);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  width: 100%;
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--border-glass-active);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.form-group select {
  background: #0d0d10;
  cursor: pointer;
  appearance: auto;
}

/* 🔮 Custom overhaul for the Flatpickr calendar panel wrapper */
.flatpickr-calendar.theme-dark {
  background: #121214 !important;
  border: 1px solid #222 !important;
  border-radius: 8px !important;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.1) !important;
}

/* Style the scrolling dropdown select elements (Month/Year) */
.flatpickr-monthDropdown-months,
.numInput.cur-year {
  background: #1a1a1e !important;
  color: #ffffff !important;
  border: 1px solid #333 !important;
  border-radius: 4px;
  padding: 2px 4px;
  cursor: pointer;
}

/* Style the selected day highlight active ring */
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
}

/* Two-column row */
.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 500px) {
  .form-group-row {
    grid-template-columns: 1fr;
  }
}

/* Password input with toggle */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  padding-right: 48px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 13px 48px 13px 16px;
  color: var(--color-white);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  width: 100%;
  outline: none;
}

.password-input-wrapper input:focus {
  border-color: var(--border-glass-active);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.password-input-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.password-toggle-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  padding: 0;
  outline: none;
  transition: color 0.2s;
}

.password-toggle-btn:hover {
  color: var(--color-white);
}

/* Password strength meter */
.password-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.strength-bar-track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.strength-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s;
}

.strength-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 50px;
  text-align: right;
}

/* Color dots row */
.color-dots-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.color-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.color-dot:hover {
  transform: scale(1.15);
}

.color-dot.active {
  border-color: var(--color-white);
  transform: scale(1.15);
}

/* Legal checkboxes section */
.legal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.008);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.checkbox-row input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--color-white);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-row strong {
  color: var(--color-white);
}

.legal-link {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s;
}

.legal-link:hover {
  opacity: 0.75;
}

/* Form error message */
.form-error-msg {
  color: #ff1744;
  font-size: 0.85rem;
  line-height: 1.4;
  display: none;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 23, 68, 0.06);
  border: 1px solid rgba(255, 23, 68, 0.15);
}

.form-error-msg.shake {
  animation: shake-error 0.4s ease-out;
}

@keyframes shake-error {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

/* Forgot password link */
.forgot-password-row {
  display: flex;
  justify-content: center;
  margin-top: -4px;
}

.forgot-link {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
  padding: 4px 0;
}

.forgot-link:hover {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Active profile card */
.active-profile-card {
  text-align: center;
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.01) 0%, rgba(255, 255, 255, 0.002) 100%);
  position: relative;
  overflow: hidden;
  transition: border-color 0.5s, box-shadow 0.5s;
}

.active-profile-card h2 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.active-email-text {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 4px;
  opacity: 0.7;
}

.active-meta-text {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.profile-avatar-container {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-white);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.5s, box-shadow 0.5s, transform 0.3s;
}

.profile-avatar-container:hover {
  transform: scale(1.05);
}

.profile-avatar-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* --- Rated Card & Modal Styles (restored) --- */
.zener-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(0, 0, 0, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}

.zener-modal-content {
  background: rgba(12, 12, 18, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 0;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.zener-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.zener-modal-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.zener-modal-body {
  padding: 24px;
}

.zener-result-score {
  text-align: center;
  margin-bottom: 20px;
}

.zener-score-label {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.zener-score-value {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-white);
}

.zener-score-sub {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.zener-result-details {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.zener-detail-item {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.detail-label {
  display: block;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.detail-value {
  font-weight: 600;
  color: var(--color-white);
}

.zener-ranking-status {
  font-size: 0.8rem;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-text-muted);
}

/* Score Share Popup (the rated card) */
.score-share-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}

.score-share-card {
  background: rgba(12, 12, 18, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 28px 28px 24px;
  max-width: 660px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
}

.score-share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.score-share-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-white);
}

.score-share-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-canvas-wrapper {
  margin: 12px 0;
}

.score-canvas-wrapper canvas {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: block;
}

.score-canvas-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 6px;
}

.score-share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.score-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-white);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.score-socials-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
  margin: 12px 0 8px;
}

.score-socials {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.score-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-white);
  font-size: 0.8rem;
  text-decoration: none;
}

.score-social-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.score-share-toast {
  text-align: center;
  font-size: 0.8rem;
  margin-top: 12px;
  opacity: 0;
  transition: opacity 0.3s;
}
  opacity: 0.15;
  filter: blur(8px);
}

#avatar-emoji {
  font-size: 2.2rem;
  z-index: 1;
}


/* ========================================== */
/* Auth Modals (Terms / Privacy)              */
/* ========================================== */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.auth-modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.auth-modal-content {
  background: #0e0e12;
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  max-width: 560px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  animation: modal-slide-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-slide-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-glass);
}

.auth-modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.auth-modal-close {
  background: none;
  border: 1px solid var(--border-glass);
  color: var(--color-text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-white);
  border-color: var(--border-glass-active);
}

.auth-modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--color-text-muted);
}

.auth-modal-body h3 {
  color: var(--color-white);
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.auth-modal-body h3:first-of-type {
  margin-top: 12px;
}

.auth-modal-body p {
  margin-bottom: 8px;
}

.auth-modal-body strong {
  color: var(--color-light-grey);
}

/* Custom scrollbar for modal */
.auth-modal-body::-webkit-scrollbar {
  width: 5px;
}

.auth-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.auth-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}


/* ========================================== */
/* Toast Notification System                  */
/* ========================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 14px;
  background: rgba(12, 12, 16, 0.92);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  font-size: 0.88rem;
  color: var(--color-white);
  pointer-events: all;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s;
  max-width: 380px;
}

.toast-visible {
  transform: translateX(0);
  opacity: 1;
}

.toast-exit {
  transform: translateX(120%);
  opacity: 0;
}

.toast-success {
  border-color: rgba(0, 230, 118, 0.25);
}

.toast-error {
  border-color: rgba(255, 23, 68, 0.25);
}

.toast-info {
  border-color: rgba(0, 229, 255, 0.25);
}

.toast-warning {
  border-color: rgba(255, 145, 0, 0.25);
}

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast-message {
  line-height: 1.4;
}

/* Evolution chart header */
.evolution-chart-card {
  background: rgba(255, 255, 255, 0.005);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  position: relative;
}

.evolution-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 500px) {
  .toast-container {
    top: auto;
    bottom: 24px;
    right: 12px;
    left: 12px;
  }

  .toast {
    max-width: 100%;
  }
}

/* ========================================== */
/* How to Play Section Styles                 */
/* ========================================== */
.how-to-play-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  line-height: 1.6;
  color: var(--color-light-grey);
  font-size: 0.95rem;
}

.how-to-play-content h2 {
  color: var(--color-white);
  font-size: 1.3rem;
  font-weight: 700;
}

.how-to-play-content p strong {
  color: var(--color-white);
}

.how-to-play-steps {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.005);
  border: 1px dashed rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
}

.how-to-play-steps h3 {
  color: var(--color-white);
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.how-to-play-steps ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.how-to-play-steps li {
  font-size: 0.9rem;
  color: var(--color-light-grey);
}

.how-to-play-steps li strong {
  color: var(--color-white);
}