* {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden
}

:root {
  --bg: #120824;
  --surface: #1e0f3d;
  --surface2: #281550;
  --surface3: #341c66;
  --gold: #ffe000;
  --gold2: #ffec4d;
  --gold3: #fff8a0;
  --crimson: #ff2244;
  --crimson2: #ff4466;
  --crimson3: #ff7799;
  --text: #ffffff;
  --muted: #d4ccff;
  --muted2: #ede8ff;
  --border: rgba(255, 224, 0, 0.40);
  --border2: rgba(255, 224, 0, 0.70);
  --green: #00ff88;
  --green2: #44ffaa;
  --green3: #aaffdd;
  --blue: #44aaff;
  --blue2: #88ccff;
  --orange: #ff8800;
  --orange2: #ffaa33;
  --orange3: #ffcc77;
  --purple: #cc44ff;
  --purple2: #dd88ff;
  --purple3: #eeccff;
  --teal: #00eedd;
  --teal2: #44ffee;
  --shadow-gold: 0 0 40px rgba(255, 224, 0, .45);
  --shadow-deep: 0 8px 40px rgba(0, 0, 0, .80);
  --glow-gold: 0 0 32px rgba(255, 224, 0, .80);
  --glow-crimson: 0 0 32px rgba(255, 34, 68, .75)
}

body {
  font-size: 17px;
  font-weight: 500
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .12em
}

.input-label {
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .18em
}

.input-field {
  font-size: 1.02rem;
  font-weight: 500
}

.btn {
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .1em
}

.btn-gold {
  font-size: .95rem;
  font-weight: 800
}

.btn-hero {
  font-size: 1.15rem;
  font-weight: 900
}

.option-btn {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: .04em
}

.question-text {
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.55
}

.question-number {
  font-size: .88rem;
  font-weight: 700
}

.category-badge {
  font-size: .82rem;
  font-weight: 700
}

.timer-display {
  font-size: 1.6rem;
  font-weight: 900
}

.top-bar-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .1em
}

.top-stat {
  font-size: .82rem;
  font-weight: 600
}

.top-stat-val {
  font-size: 1.08rem;
  font-weight: 800
}

.game-title {
  font-size: clamp(3.2rem, 11vw, 6.5rem);
  font-weight: 900
}

.game-subtitle {
  font-size: clamp(.95rem, 2.2vw, 1.15rem);
  font-weight: 700
}

.title-subtitle {
  font-size: clamp(1.05rem, 3vw, 1.5rem);
  font-weight: 700
}

.title-badge {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .4em
}

.title-tagline {
  font-size: clamp(.78rem, 2vw, .95rem);
  font-weight: 600
}

.siege-label {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em
}

.hp-label {
  font-size: .82rem;
  font-weight: 700
}

.result-banner {
  font-size: 1rem;
  font-weight: 700
}

.damage-text {
  font-size: .98rem;
  font-weight: 800
}

.vs-badge {
  font-size: 1.8rem;
  font-weight: 900
}

.enemy-name {
  font-size: .95rem;
  font-weight: 700
}

.enemy-level {
  font-size: .8rem;
  font-weight: 600
}

.diff-easy,
.diff-medium,
.diff-hard,
.diff-epic,
.diff-legendary {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em
}

.kingdom-header {
  font-size: .92rem;
  font-weight: 700
}

.mission-label {
  font-size: .82rem;
  font-weight: 700
}

.mission-reward {
  font-size: .75rem;
  font-weight: 600
}

.ranking-table th {
  font-size: .85rem;
  font-weight: 800
}

.ranking-table td {
  font-size: .85rem;
  font-weight: 600
}

.rank-score {
  font-size: 1rem;
  font-weight: 800
}

.rank-castle-name {
  font-size: .88rem;
  font-weight: 700
}

.rank-player-name {
  font-size: .75rem;
  font-weight: 600
}

.profile-hero-name {
  font-size: 1.5rem;
  font-weight: 900
}

.profile-hero-title {
  font-size: .92rem;
  font-weight: 700
}

.profile-hero-castle {
  font-size: .85rem;
  font-weight: 600
}

.profile-stat-val {
  font-size: 1.5rem;
  font-weight: 900
}

.profile-stat-label {
  font-size: .72rem;
  font-weight: 700
}

.theme-btn-label {
  font-size: .78rem;
  font-weight: 700
}

.modal-title {
  font-size: 1.6rem;
  font-weight: 900
}

.modal-body {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7
}

.notif {
  font-size: .9rem;
  font-weight: 700
}

.upg-tree-name {
  font-size: .88rem;
  font-weight: 800
}

.upg-next-name {
  font-size: .82rem;
  font-weight: 700
}

.upg-next-desc {
  font-size: .82rem;
  font-weight: 500
}

.upg-cost {
  font-size: .82rem;
  font-weight: 700
}

.upg-level-badge {
  font-size: .78rem;
  font-weight: 800
}

.upgrades-summary {
  font-size: .82rem;
  font-weight: 600
}

.upgrades-summary strong {
  font-size: .88rem;
  font-weight: 900
}

.friend-name {
  font-size: .9rem;
  font-weight: 700
}

.friend-sub {
  font-size: .78rem;
  font-weight: 600
}

.mp-player-name {
  font-size: .82rem;
  font-weight: 700
}

.mp-score {
  font-size: .95rem;
  font-weight: 800
}

.mm-idle-title {
  font-size: 1.15rem;
  font-weight: 900
}

.mm-idle-desc {
  font-size: .88rem;
  font-weight: 500
}

.mm-searching-title {
  font-size: 1.1rem;
  font-weight: 900
}

.mm-result-title {
  font-size: 1.7rem;
  font-weight: 900
}

.mm-find-btn {
  font-size: 1.08rem;
  font-weight: 800
}

.ad-card-label {
  font-size: .92rem;
  font-weight: 800
}

.ad-card-desc {
  font-size: .78rem;
  font-weight: 500
}

.streak-count {
  font-size: 1.6rem;
  font-weight: 900
}

.streak-label {
  font-size: .72rem;
  font-weight: 700
}

.streak-bonus {
  font-size: .72rem;
  font-weight: 700
}

.scroll-btn {
  font-size: .78rem;
  font-weight: 700
}

.terms-section p {
  font-size: .98rem;
  font-weight: 500
}

.terms-section-title {
  font-size: 1.02rem;
  font-weight: 900
}

::-webkit-scrollbar {
  width: 6px
}

::-webkit-scrollbar-track {
  background: var(--bg)
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 3px
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Oswald', 'Cinzel', Georgia, sans-serif;
  background-image: radial-gradient(ellipse 80% 60% at 10% 30%, rgba(204, 68, 255, .25) 0%, transparent 55%), radial-gradient(ellipse 70% 70% at 90% 15%, rgba(68, 170, 255, .22) 0%, transparent 55%), radial-gradient(ellipse 60% 50% at 50% 90%, rgba(255, 136, 0, .18) 0%, transparent 50%), radial-gradient(ellipse 40% 40% at 50% 50%, rgba(255, 224, 0, .06) 0%, transparent 60%);
  position: relative;
  overflow-x: hidden
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
  opacity: .6;
  mix-blend-mode: overlay
}

.screen {
  display: none;
  padding: 20px;
  position: relative;
  z-index: 1;
  overflow-x: hidden
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 44px;
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px;
  padding-bottom: 20px;
  z-index: 1
}

.particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none
}

.ember {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 180, 60, .9), rgba(200, 80, 20, .3));
  animation: rise var(--t, 8s) ease-in infinite;
  animation-delay: var(--d, 0s);
  box-shadow: 0 0 6px rgba(255, 160, 40, .6)
}

@keyframes rise {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: .8
  }

  50% {
    transform: translateY(-50vh) translateX(var(--dx, 20px)) scale(.7);
    opacity: .5
  }

  100% {
    transform: translateY(-110vh) translateX(calc(var(--dx, 20px)*2)) scale(.2);
    opacity: 0
  }
}

@keyframes castle-float {

  0%,
  100% {
    transform: translateY(0) rotate(0)
  }

  50% {
    transform: translateY(-8px) rotate(.5deg)
  }
}

@keyframes damage-pop {
  0% {
    transform: scale(.3) rotate(-10deg);
    opacity: 0
  }

  60% {
    transform: scale(1.25) rotate(2deg)
  }

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

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(200, 168, 75, .3)
  }

  50% {
    box-shadow: 0 0 25px rgba(200, 168, 75, .6), 0 0 50px rgba(200, 168, 75, .2)
  }
}

@keyframes pulse-urgent {

  0%,
  100% {
    color: var(--crimson2);
    text-shadow: none
  }

  50% {
    color: var(--crimson3);
    text-shadow: 0 0 15px rgba(224, 48, 48, .8)
  }
}

@keyframes modal-in {
  0% {
    transform: scale(.85) translateY(20px);
    opacity: 0
  }

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

@keyframes notif-in {
  from {
    transform: translateX(120%);
    opacity: 0
  }

  to {
    transform: translateX(0);
    opacity: 1
  }
}

@keyframes notif-out {
  from {
    opacity: 1;
    transform: translateX(0)
  }

  to {
    opacity: 0;
    transform: translateX(120%)
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center
  }

  100% {
    background-position: 200% center
  }
}

@keyframes loading {
  0% {
    content: '.'
  }

  33% {
    content: '..'
  }

  66% {
    content: '...'
  }
}

@keyframes border-pulse {

  0%,
  100% {
    border-color: rgba(200, 168, 75, .2)
  }

  50% {
    border-color: rgba(200, 168, 75, .5)
  }
}

@keyframes hp-shimmer {
  0% {
    background-position: -300% center
  }

  100% {
    background-position: 300% center
  }
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(12px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.screen.active {
  animation: screen-in .4s ease-out
}

.ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  width: 100%;
  color: var(--gold);
  font-size: .7rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  font-family: 'Cinzel', serif
}

.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent)
}

.game-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: clamp(2.8rem, 9vw, 5.5rem);
  font-weight: 900;
  text-align: center;
  background: linear-gradient(180deg, #fff176 0%, #ffd700 35%, #ffcc00 65%, #ff8800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .9));
  line-height: 1.1;
  margin-bottom: 6px;
  position: relative;
  text-transform: uppercase;
  letter-spacing: .05em
}

.game-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 241, 118, .6), transparent 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: blur(10px);
  z-index: -1
}

.game-subtitle {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(.85rem, 2vw, 1.1rem);
  color: #ffd700;
  letter-spacing: .5em;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-align: center;
  font-weight: 600
}

.card {
  background: linear-gradient(145deg, var(--surface2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: 3px;
  position: relative;
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, .03)
}

.card::before,
.card::after {
  content: '✦';
  position: absolute;
  font-size: .6rem;
  color: var(--gold);
  opacity: .5;
  line-height: 1
}

.card::before {
  top: 8px;
  left: 10px
}

.card::after {
  bottom: 8px;
  right: 10px
}

.panel {
  padding: 20px;
  background: linear-gradient(160deg, rgba(34, 24, 72, .95), rgba(26, 18, 53, .98));
  border: 1px solid rgba(255, 215, 0, .25);
  border-radius: 4px;
  position: relative;
  box-shadow: var(--shadow-deep), 0 0 0 1px rgba(255, 255, 255, .04)
}

.panel::before,
.panel::after {
  content: '✦';
  position: absolute;
  font-size: .55rem;
  color: var(--gold);
  opacity: .4;
  line-height: 1
}

.panel::before {
  top: 8px;
  left: 10px
}

.panel::after {
  bottom: 8px;
  right: 10px
}

.panel-title {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  color: var(--gold2);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px
}

.panel-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent)
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 400px;
  margin-bottom: 22px
}

.input-label {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  color: var(--gold);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: -6px
}

.input-hint {
  font-size: .7rem;
  color: var(--muted);
  font-family: 'Cinzel', serif;
  margin-top: -8px;
  font-style: italic
}

.input-field {
  background: rgba(0, 0, 0, .4);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 13px 18px;
  color: var(--text);
  font-family: serif;
  font-size: 1rem;
  width: 100%;
  outline: none;
  transition: all .3s;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .4)
}

.input-field:focus {
  border-color: var(--gold);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .4), 0 0 0 2px rgba(200, 168, 75, .12), 0 0 15px rgba(200, 168, 75, .08)
}

.input-field::placeholder {
  color: rgba(138, 122, 96, .5)
}

.btn {
  background: linear-gradient(180deg, #6e1515 0%, #9a1c1c 40%, #6e1515 100%);
  border: 1px solid rgba(176, 32, 32, .6);
  border-top-color: rgba(220, 60, 60, .4);
  color: var(--text);
  font-family: 'Cinzel', serif;
  font-size: .88rem;
  letter-spacing: .15em;
  padding: 13px 30px;
  border-radius: 2px;
  cursor: pointer;
  transition: all .2s;
  text-transform: uppercase;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .05);
  font-weight: 600
}

.btn:hover {
  background: linear-gradient(180deg, #9a1c1c 0%, #c02828 40%, #9a1c1c 100%);
  border-color: rgba(224, 48, 48, .6);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, .6), 0 0 20px rgba(176, 32, 32, .3), inset 0 1px 0 rgba(255, 255, 255, .08)
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5)
}

.btn:disabled {
  opacity: .35;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none
}

.btn-gold {
  background: linear-gradient(180deg, #7a5c10 0%, #b08020 40%, #7a5c10 100%);
  border-color: rgba(200, 168, 75, .5);
  border-top-color: rgba(242, 208, 107, .4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 233, 160, .1)
}

.btn-gold:hover {
  background: linear-gradient(180deg, #b08020 0%, #d4a030 40%, #b08020 100%);
  border-color: rgba(242, 208, 107, .7);
  box-shadow: 0 6px 25px rgba(0, 0, 0, .6), 0 0 20px rgba(200, 168, 75, .35), inset 0 1px 0 rgba(255, 233, 160, .15)
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted2)
}

.btn-ghost:hover {
  background: rgba(200, 168, 75, .06);
  border-color: var(--border2);
  color: var(--text);
  box-shadow: none
}

.btn-sm {
  padding: 8px 16px;
  font-size: .75rem;
  letter-spacing: .1em
}

.btn-lg {
  padding: 16px 44px;
  font-size: 1rem;
  letter-spacing: .2em
}

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 14px 0;
  opacity: .4
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1020px;
  margin-bottom: 18px;
  padding: 12px 22px;
  background: linear-gradient(90deg, rgba(12, 11, 20, .95), rgba(16, 14, 26, .95));
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: var(--shadow-deep), 0 0 0 1px rgba(255, 255, 255, .02);
  flex-wrap: wrap;
  gap: 10px
}

.top-bar-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1rem;
  color: var(--gold2);
  letter-spacing: .05em;
  white-space: nowrap
}

.top-bar-stats {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap
}

.top-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .82rem;
  font-family: 'Cinzel', serif;
  white-space: nowrap
}

.top-stat-val {
  color: var(--gold2);
  font-weight: 600;
  font-size: .9rem
}

.map-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 18px;
  width: 100%;
  max-width: 1020px
}

.castle-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin: 10px 0;
  min-height: 110px;
  position: relative
}

.castle-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 15px;
  background: radial-gradient(ellipse, rgba(200, 168, 75, .2) 0%, transparent 70%);
  border-radius: 50%
}

.castle-art {
  font-size: clamp(65px, 10vw, 88px);
  filter: drop-shadow(0 0 20px rgba(200, 168, 75, .45)) drop-shadow(0 4px 8px rgba(0, 0, 0, .6));
  animation: castle-float 4.5s ease-in-out infinite;
  line-height: 1;
  position: relative;
  z-index: 1
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 10px 0
}

.stat-item {
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(200, 168, 75, .1);
  border-radius: 2px;
  padding: 9px 11px;
  position: relative;
  overflow: hidden
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 168, 75, .2), transparent)
}

.stat-label {
  font-size: .6rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-family: 'Cinzel', serif;
  margin-bottom: 2px
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold2);
  font-family: 'Cinzel', serif;
  line-height: 1
}

.hp-bar-wrap {
  margin: 9px 0
}

.hp-label {
  display: flex;
  justify-content: space-between;
  font-size: .65rem;
  color: var(--muted2);
  margin-bottom: 5px;
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: .12em
}

.hp-bar {
  height: 10px;
  background: rgba(0, 0, 0, .5);
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(200, 168, 75, .12);
  position: relative
}

.hp-fill {
  height: 100%;
  border-radius: 1px;
  background: linear-gradient(90deg, #1e6040, #30d070);
  background-size: 200% 100%;
  animation: hp-shimmer 3s linear infinite;
  transition: width .6s ease;
  position: relative
}

.hp-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: rgba(255, 255, 255, .1);
  border-radius: 1px
}

.hp-fill.low {
  background: linear-gradient(90deg, #6a1010, #e03030);
  background-size: 200% 100%;
  animation: hp-shimmer 1.5s linear infinite
}

.hp-fill.mid {
  background: linear-gradient(90deg, #6a4010, #e08020);
  background-size: 200% 100%;
  animation: hp-shimmer 2s linear infinite
}

.xp-bar {
  height: 6px;
  background: rgba(0, 0, 0, .5);
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(100, 100, 200, .2);
  margin-top: 4px
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #2a3a90, #6090f0);
  border-radius: 1px;
  transition: width .6s ease
}

.enemy-list {
  display: flex;
  flex-direction: column;
  gap: 10px
}

.enemy-card {
  background: linear-gradient(135deg, rgba(28, 25, 41, .95), rgba(16, 14, 26, .95));
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all .25s;
  position: relative;
  overflow: hidden
}

.enemy-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--crimson2), transparent);
  opacity: 0;
  transition: opacity .25s
}

.enemy-card:hover {
  border-color: rgba(176, 32, 32, .5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .5), 0 0 15px rgba(176, 32, 32, .15);
  transform: translateX(4px)
}

.enemy-card:hover::before {
  opacity: 1
}

.enemy-card.defeated {
  opacity: .35;
  cursor: not-allowed;
  transform: none !important;
  filter: grayscale(.5)
}

.enemy-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6))
}

.enemy-info {
  flex: 1
}

.enemy-name {
  font-family: 'Cinzel', serif;
  font-size: .88rem;
  color: var(--text);
  margin-bottom: 3px
}

.enemy-level {
  font-size: .72rem;
  color: var(--muted)
}

.difficulty-badge {
  font-family: 'Cinzel', serif;
  font-size: .62rem;
  padding: 4px 9px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600
}

.diff-easy {
  background: rgba(30, 92, 56, .35);
  color: #50e080;
  border: 1px solid rgba(80, 224, 128, .25)
}

.diff-medium {
  background: rgba(120, 80, 10, .35);
  color: #f0b030;
  border: 1px solid rgba(240, 176, 48, .25)
}

.diff-hard {
  background: rgba(110, 18, 18, .35);
  color: #e84040;
  border: 1px solid rgba(232, 64, 64, .25)
}

.diff-epic {
  background: rgba(60, 0, 100, .35);
  color: #c070ff;
  border: 1px solid rgba(192, 112, 255, .25)
}

.diff-legendary {
  background: rgba(160, 130, 20, .15);
  color: var(--gold3);
  border: 1px solid rgba(242, 208, 107, .4);
  box-shadow: 0 0 10px rgba(200, 168, 75, .1)
}

.battle-layout {
  width: 100%;
  max-width: 820px
}

.battle-castles {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 15px;
  align-items: center;
  margin-bottom: 16px
}

.battle-castle {
  padding: 16px;
  text-align: center;
  background: linear-gradient(160deg, var(--surface2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: var(--shadow-deep);
  position: relative;
  overflow: hidden
}

.battle-castle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(200, 168, 75, .04), transparent 60%);
  pointer-events: none
}

.battle-castle.player-castle {
  border-color: rgba(50, 200, 100, .2);
  box-shadow: var(--shadow-deep), 0 0 20px rgba(50, 200, 100, .06)
}

.battle-castle.enemy-castle {
  border-color: rgba(176, 32, 32, .25);
  box-shadow: var(--shadow-deep), 0 0 20px rgba(176, 32, 32, .08)
}

.vs-badge {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.6rem;
  color: var(--gold2);
  text-align: center;
  filter: drop-shadow(0 0 12px rgba(200, 168, 75, .6));
  animation: pulse-glow 2s ease-in-out infinite
}

.castle-name {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: 6px
}

.question-card {
  background: linear-gradient(160deg, var(--surface2) 0%, rgba(10, 9, 18, .98) 100%);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 24px 26px;
  margin-bottom: 14px;
  position: relative;
  box-shadow: var(--shadow-deep)
}

.question-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .4
}

.question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px
}

.question-number {
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: .15em
}

.timer-display {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: var(--gold2);
  font-weight: 700;
  min-width: 40px;
  text-align: center;
  background: rgba(200, 168, 75, .08);
  border: 1px solid rgba(200, 168, 75, .2);
  padding: 4px 12px;
  border-radius: 2px
}

.timer-display.urgent {
  animation: pulse-urgent .6s ease-in-out infinite
}

.question-text {
  font-size: 1.12rem;
  line-height: 1.65;
  margin-bottom: 20px;
  color: var(--text);
  min-height: 60px;
  display: flex;
  align-items: center;
  font-style: italic
}

.loading-dots::after {
  content: '';
  animation: loading 1.5s ease-in-out infinite
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.option-btn {
  background: linear-gradient(145deg, rgba(28, 25, 41, .9), rgba(16, 14, 26, .9));
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 13px 16px;
  color: var(--text);
  font-family: serif;
  font-size: .95rem;
  cursor: pointer;
  text-align: left;
  transition: all .2s;
  line-height: 1.45;
  position: relative;
  overflow: hidden
}

.option-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity .2s
}

.option-btn:hover:not(:disabled) {
  border-color: rgba(200, 168, 75, .4);
  background: linear-gradient(145deg, rgba(40, 35, 60, .9), rgba(25, 22, 38, .9));
  box-shadow: 0 2px 15px rgba(0, 0, 0, .4), 0 0 10px rgba(200, 168, 75, .08);
  transform: translateY(-1px)
}

.option-btn:hover:not(:disabled)::before {
  opacity: 1
}

.option-btn.correct {
  border-color: rgba(80, 224, 128, .6);
  background: linear-gradient(145deg, rgba(20, 80, 45, .7), rgba(10, 50, 28, .7));
  color: var(--green3);
  box-shadow: 0 0 20px rgba(80, 224, 128, .15) !important
}

.option-btn.wrong {
  border-color: rgba(224, 48, 48, .6);
  background: linear-gradient(145deg, rgba(80, 15, 15, .7), rgba(50, 8, 8, .7));
  color: #f06060;
  box-shadow: 0 0 20px rgba(224, 48, 48, .15) !important
}

.option-btn:disabled {
  cursor: not-allowed
}

.result-banner {
  text-align: center;
  padding: 14px 18px;
  border-radius: 2px;
  margin-top: 14px;
  font-family: 'Cinzel', serif;
  letter-spacing: .05em
}

.result-banner.correct-ans {
  background: linear-gradient(135deg, rgba(20, 70, 38, .8), rgba(10, 45, 22, .8));
  border: 1px solid rgba(80, 224, 128, .3);
  color: var(--green3);
  box-shadow: 0 0 20px rgba(80, 224, 128, .08)
}

.result-banner.wrong-ans {
  background: linear-gradient(135deg, rgba(80, 15, 15, .8), rgba(50, 8, 8, .8));
  border: 1px solid rgba(224, 48, 48, .3);
  color: #f06060;
  box-shadow: 0 0 20px rgba(224, 48, 48, .08)
}

.damage-text {
  font-size: 1.5rem;
  font-weight: 700;
  animation: damage-pop .45s ease-out;
  margin-top: 6px;
  letter-spacing: .05em
}

.explanation-box {
  margin-top: 12px;
  padding: 13px 16px;
  background: rgba(0, 0, 0, .35);
  border-left: 2px solid var(--gold);
  font-size: .88rem;
  color: var(--muted2);
  line-height: 1.65;
  font-style: italic
}

.explanation-box::before {
  content: '💡 ';
  filter: grayscale(0)
}

.battle-progress {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0
}

.progress-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .62rem;
  transition: all .3s;
  font-family: 'Cinzel', serif
}

.progress-dot.current {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(200, 168, 75, .5), 0 0 25px rgba(200, 168, 75, .2);
  animation: pulse-glow 1.5s ease-in-out infinite
}

.progress-dot.player-won {
  background: rgba(30, 90, 50, .5);
  border-color: var(--green3);
  color: var(--green3);
  box-shadow: 0 0 8px rgba(80, 224, 128, .2)
}

.progress-dot.enemy-won {
  background: rgba(80, 15, 15, .5);
  border-color: #e84040;
  color: #e84040;
  box-shadow: 0 0 8px rgba(232, 64, 64, .2)
}

.progress-dot.tie {
  background: rgba(200, 168, 75, .1);
  border-color: var(--gold)
}

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .12em;
  background: rgba(200, 168, 75, .08);
  border: 1px solid rgba(200, 168, 75, .25);
  color: var(--gold)
}

.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 920px;
  margin-bottom: 20px
}

.upgrade-card {
  background: linear-gradient(160deg, var(--surface2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 22px;
  text-align: center;
  transition: all .25s;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-deep)
}

.upgrade-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 168, 75, .3), transparent)
}

.upgrade-card:hover {
  border-color: rgba(200, 168, 75, .4);
  box-shadow: var(--shadow-deep), 0 0 25px rgba(200, 168, 75, .1)
}

.upgrade-icon {
  font-size: 2.6rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5))
}

.upgrade-name {
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  color: var(--gold2);
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: 8px;
  font-weight: 600
}

.upgrade-desc {
  font-size: .85rem;
  color: var(--muted2);
  margin-bottom: 12px;
  line-height: 1.55;
  font-style: italic
}

.upgrade-cost {
  font-family: 'Cinzel', serif;
  font-size: .88rem;
  color: var(--gold2);
  margin-bottom: 13px;
  letter-spacing: .05em
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px
}

.overlay.active {
  display: flex
}

.modal {
  background: linear-gradient(160deg, var(--surface2) 0%, var(--surface) 50%, rgba(8, 6, 14, .98) 100%);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 40px 36px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  animation: modal-in .35s cubic-bezier(.2, .8, .3, 1);
  position: relative;
  box-shadow: var(--shadow-deep), 0 0 60px rgba(200, 168, 75, .08)
}

.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .6
}

.modal::after {
  content: '✦';
  position: absolute;
  bottom: 14px;
  right: 16px;
  font-size: .55rem;
  color: var(--gold);
  opacity: .35
}

.modal-icon {
  font-size: 4.5rem;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 20px rgba(200, 168, 75, .3))
}

.modal-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.9rem;
  margin-bottom: 10px;
  letter-spacing: .02em
}

.modal-title.victory {
  background: linear-gradient(180deg, var(--gold3), var(--gold2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 15px rgba(200, 168, 75, .4))
}

.modal-title.defeat {
  color: var(--crimson3)
}

.modal-body {
  font-size: 1.05rem;
  color: var(--muted2);
  line-height: 1.75;
  margin-bottom: 28px;
  font-style: italic
}

.notif {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 99998;
  max-width: 320px;
  background: linear-gradient(135deg, var(--surface2), var(--surface));
  border: 1px solid var(--border2);
  border-radius: 3px;
  padding: 13px 22px;
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  color: var(--gold2);
  letter-spacing: .08em;
  animation: notif-in .3s ease-out, notif-out .4s ease-in 2.6s forwards;
  pointer-events: none;
  box-shadow: var(--shadow-deep), 0 0 20px rgba(200, 168, 75, .1)
}

.notif::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent)
}

.ranking-table {
  width: 100%;
  max-width: 720px;
  border-collapse: collapse;
  margin-bottom: 20px
}

.ranking-table thead tr {
  background: rgba(0, 0, 0, .4);
  border-bottom: 2px solid rgba(200, 168, 75, .2)
}

.ranking-table th {
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .18em;
  padding: 12px 16px;
  text-align: left
}

.ranking-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(200, 168, 75, .06);
  font-size: .9rem;
  vertical-align: middle;
  transition: background .2s
}

.ranking-table tbody tr:hover td {
  background: rgba(200, 168, 75, .04)
}

.rank-pos {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem
}

.rank-1 {
  color: var(--gold3);
  text-shadow: 0 0 12px rgba(255, 233, 160, .6)
}

.rank-2 {
  color: #d4d4d4
}

.rank-3 {
  color: #d4935a
}

.rank-other {
  color: var(--muted2)
}

.rank-castle {
  display: flex;
  align-items: center;
  gap: 12px
}

.rank-castle-art {
  font-size: 1.7rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5))
}

.rank-castle-name {
  font-family: 'Cinzel', serif;
  font-size: .88rem;
  color: var(--text)
}

.rank-player-name {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 2px
}

.rank-badge {
  font-family: 'Cinzel', serif;
  font-size: .62rem;
  padding: 3px 9px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: .1em
}

.rank-score {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  color: var(--gold2);
  font-size: 1rem;
  letter-spacing: .05em
}

.rank-loading,
.rank-empty {
  text-align: center;
  padding: 45px;
  color: var(--muted);
  font-family: 'Cinzel', serif;
  font-size: .88rem;
  letter-spacing: .12em;
  font-style: italic
}

.rank-you td {
  background: rgba(200, 168, 75, .05)
}

.rank-you .rank-castle-name::after {
  content: ' ◀ tú';
  color: var(--gold);
  font-size: .65rem
}

@media(max-width:650px) {
  .map-layout {
    grid-template-columns: 1fr
  }

  .options-grid {
    grid-template-columns: 1fr
  }

  .battle-castles {
    grid-template-columns: 1fr;
    gap: 10px
  }

  .vs-badge {
    display: none
  }

  .screen.active {
    justify-content: flex-start;
    padding-top: 15px
  }

  .ranking-table th:nth-child(4),
  .ranking-table td:nth-child(4) {
    display: none
  }

  .top-bar {
    padding: 10px 15px
  }

  .btn-lg {
    padding: 14px 32px
  }
}

.field-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px
}

.field-wrap .input-field {
  transition: border-color .3s, box-shadow .3s
}

.field-wrap.has-error .input-field {
  border-color: #e84040 !important;
  box-shadow: 0 0 0 2px rgba(232, 64, 64, .12), inset 0 2px 8px rgba(0, 0, 0, .4)
}

.field-wrap.has-success .input-field {
  border-color: rgba(80, 224, 128, .4) !important
}

.field-error-msg {
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  color: #e84040;
  letter-spacing: .05em;
  min-height: 1rem
}

.pw-wrap {
  position: relative
}

.pw-wrap .input-field {
  padding-right: 48px
}

.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--muted2);
  transition: color .2s;
  padding: 4px
}

.pw-toggle:hover {
  color: var(--gold2)
}

.btn-google {
  background: linear-gradient(180deg, #2a2a2a, #1a1a1a);
  border: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  letter-spacing: .1em;
  color: var(--text);
  padding: 12px 24px;
  border-radius: 2px;
  cursor: pointer;
  width: 100%;
  transition: all .2s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .4)
}

.btn-google:hover {
  background: linear-gradient(180deg, #3a3a3a, #2a2a2a);
  border-color: rgba(255, 255, 255, .2);
  transform: translateY(-1px)
}

.btn-google img {
  width: 18px;
  height: 18px
}

.auth-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--muted);
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase
}

.auth-sep::before,
.auth-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border)
}

.auth-error {
  display: none;
  color: #e84040;
  font-size: .8rem;
  font-family: 'Cinzel', serif;
  margin-bottom: 12px;
  text-align: center;
  padding: 10px 14px;
  background: rgba(232, 64, 64, .08);
  border-radius: 2px;
  border: 1px solid rgba(232, 64, 64, .25);
  line-height: 1.5
}

.btn {
  overflow: hidden
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  width: 4px;
  height: 4px;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, .25);
  animation: ripple .6s ease-out forwards;
  pointer-events: none
}

@keyframes ripple {
  to {
    width: 300px;
    height: 300px;
    opacity: 0
  }
}

.elem-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Cinzel', serif;
  font-size: .62rem;
  padding: 2px 9px;
  border-radius: 20px;
  border: 1px solid;
  letter-spacing: .08em;
  vertical-align: middle;
  margin-left: 6px;
  text-transform: uppercase
}

.weakness-label {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: var(--gold3);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 5px 0 2px;
  animation: damage-pop .4s ease-out
}

.result-banner.elemental-hit {
  border-color: rgba(200, 168, 75, .45) !important;
  box-shadow: 0 0 30px rgba(200, 168, 75, .2), 0 0 60px rgba(200, 168, 75, .08) !important
}

@keyframes elem-flash {
  0% {
    box-shadow: var(--shadow-deep), 0 0 0px var(--flash-color, rgba(255, 255, 255, .4)), 0 0 20px rgba(176, 32, 32, .08)
  }

  40% {
    box-shadow: var(--shadow-deep), 0 0 50px var(--flash-color, rgba(255, 255, 255, .4)), 0 0 90px var(--flash-color, rgba(255, 255, 255, .2))
  }

  100% {
    box-shadow: var(--shadow-deep), 0 0 0px var(--flash-color, rgba(255, 255, 255, .4)), 0 0 20px rgba(176, 32, 32, .08)
  }
}

.enemy-castle.elemental-flash {
  animation: elem-flash .6s ease-out
}

.enemy-weakness {
  font-family: 'Cinzel', serif;
  font-size: .6rem;
  color: var(--gold);
  opacity: .75;
  margin-top: 3px;
  display: block;
  letter-spacing: .05em
}

.level-btn-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4)
}

#enemyList>div {
  animation: screen-in .3s ease-out both
}

#enemyList>div:nth-child(2) {
  animation-delay: .05s
}

#enemyList>div:nth-child(3) {
  animation-delay: .10s
}

#enemyList>div:nth-child(4) {
  animation-delay: .15s
}

#enemyList>div:nth-child(5) {
  animation-delay: .20s
}

#enemyList>div:nth-child(6) {
  animation-delay: .25s
}

#enemyList>div:nth-child(7) {
  animation-delay: .30s
}

#enemyList>div:nth-child(8) {
  animation-delay: .35s
}

#enemyList>div:nth-child(9) {
  animation-delay: .40s
}

#enemyList>div:nth-child(10) {
  animation-delay: .45s
}

:root {
  --screen-pad: 16px;
  --panel-pad: 16px;
  --btn-h: 44px;
  --input-h: 48px;
  --font-base: 16px
}

.screen.active {
  box-sizing: border-box
}

@media (max-width:480px) {
  :root {
    --screen-pad: 10px;
    --panel-pad: 12px;
    --btn-h: 48px;
    --font-base: 15px
  }

  .screen.active {
    padding: 10px 8px;
    padding-top: 14px
  }

  body {
    font-size: var(--font-base)
  }

  .top-bar {
    padding: 8px 10px !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    position: sticky;
    top: 0;
    z-index: 50
  }

  .top-bar-title {
    font-size: .88rem !important;
    flex: 1
  }

  .top-stat {
    font-size: .72rem !important
  }

  .top-stat-val {
    font-size: .95rem !important
  }

  .top-bar .btn-sm {
    padding: 6px 10px !important;
    font-size: .68rem !important;
    min-height: 34px !important
  }

  .panel {
    padding: var(--panel-pad) !important;
    border-radius: 4px !important
  }

  .panel-title {
    font-size: .88rem !important;
    margin-bottom: 10px !important
  }

  .btn {
    min-height: var(--btn-h) !important;
    font-size: .82rem !important;
    padding: 10px 16px !important
  }

  .btn-sm {
    min-height: 38px !important;
    padding: 7px 12px !important;
    font-size: .72rem !important
  }

  .btn-lg {
    min-height: 52px !important;
    font-size: .92rem !important;
    width: 100% !important
  }

  .btn-hero {
    min-height: 56px !important;
    font-size: 1rem !important
  }

  .btn-google {
    padding: 12px 16px !important;
    font-size: .78rem !important;
    min-height: var(--btn-h) !important
  }

  .input-field {
    min-height: var(--input-h) !important;
    font-size: .95rem !important;
    padding: 12px 14px !important
  }

  .input-label {
    font-size: .75rem !important
  }

  .game-title {
    font-size: clamp(2.4rem, 13vw, 3.5rem) !important
  }

  .game-subtitle {
    font-size: .92rem !important
  }

  .title-badge {
    font-size: .72rem !important;
    letter-spacing: .3em !important
  }

  .title-buttons {
    gap: 10px !important;
    width: 100% !important
  }

  .title-buttons .btn {
    width: 100% !important
  }

  .map-layout {
    grid-template-columns: 1fr !important;
    gap: 10px
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px
  }

  .stat-item {
    padding: 7px 5px !important
  }

  .stat-label {
    font-size: .6rem !important
  }

  .stat-value {
    font-size: 1rem !important
  }

  .kingdom-header {
    padding: 8px 10px !important
  }

  .enemy-card {
    padding: 10px 8px !important;
    gap: 6px !important
  }

  .enemy-name {
    font-size: .82rem !important
  }

  .level-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 4px !important
  }

  .level-btn {
    width: 48px !important;
    height: 48px !important;
    font-size: .72rem !important
  }

  .battle-arena {
    grid-template-columns: 1fr 40px 1fr !important;
    min-height: 130px !important;
    gap: 0 !important
  }

  .arena-fighter {
    padding: 10px 6px 8px !important;
    gap: 4px !important
  }

  .fighter-sprite {
    font-size: 2.6rem !important
  }

  .enemy-sprite {
    font-size: 3rem !important
  }

  .fighter-name {
    font-size: .62rem !important
  }

  .arena-vs {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.2rem !important
  }

  .fighter-hp-bar {
    height: 6px !important
  }

  .fighter-hp-text {
    font-size: .62rem !important
  }

  .question-card {
    padding: 12px 10px !important
  }

  .question-meta {
    gap: 6px !important;
    flex-wrap: wrap !important
  }

  .question-number {
    font-size: .75rem !important
  }

  .question-text {
    font-size: .98rem !important;
    line-height: 1.55 !important;
    margin: 10px 0 !important
  }

  .options-grid {
    grid-template-columns: 1fr !important;
    gap: 7px !important
  }

  .option-btn {
    padding: 13px 12px !important;
    font-size: .88rem !important;
    min-height: 52px !important;
    text-align: left !important
  }

  .timer-display {
    font-size: 1.3rem !important;
    min-width: 40px !important;
    padding: 6px 8px !important
  }

  .category-badge {
    font-size: .7rem !important;
    padding: 3px 8px !important
  }

  .result-banner {
    font-size: .88rem !important;
    padding: 10px !important
  }

  .explanation-box {
    font-size: .8rem !important;
    padding: 10px !important
  }

  .skill-bar {
    padding: 8px 10px !important;
    gap: 6px !important;
    overflow-x: auto !important
  }

  .skill-bar-label {
    font-size: .62rem !important
  }

  .skill-frame {
    width: 44px !important;
    height: 44px !important
  }

  .skill-name-tag {
    font-size: .52rem !important;
    max-width: 46px !important
  }

  .skill-mult-tag {
    font-size: .7rem !important
  }

  .scroll-bar {
    gap: 5px !important;
    padding: 8px 8px !important;
    overflow-x: auto !important
  }

  .scroll-btn {
    font-size: .65rem !important;
    padding: 6px 8px !important;
    min-height: 36px !important;
    flex-shrink: 0 !important
  }

  .result-overlay-content {
    padding: 28px 18px !important
  }

  .result-trophy {
    font-size: 3.5rem !important
  }

  .result-skull {
    font-size: 3.5rem !important
  }

  .result-title {
    font-size: 1.7rem !important
  }

  .result-subtitle {
    font-size: .82rem !important
  }

  .result-rewards {
    gap: 8px !important
  }

  .result-reward-item {
    font-size: .78rem !important;
    padding: 5px 10px !important
  }

  .result-continue-btn {
    width: 100% !important
  }

  .rstar.s2 {
    font-size: 2.2rem !important
  }

  .upgrade-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important
  }

  .upg-card {
    padding: 12px 10px !important
  }

  .upg-tree-icon {
    font-size: 1.8rem !important
  }

  .upg-tree-name {
    font-size: .78rem !important
  }

  .upg-next-name {
    font-size: .72rem !important
  }

  .upg-cost {
    font-size: .72rem !important
  }

  .upgrades-summary {
    font-size: .72rem !important
  }

  .ranking-table {
    font-size: .72rem !important
  }

  .ranking-table th,
  .ranking-table td {
    padding: 7px 4px !important
  }

  .ranking-table th:nth-child(4),
  .ranking-table td:nth-child(4),
  .ranking-table th:nth-child(5),
  .ranking-table td:nth-child(5) {
    display: none !important
  }

  .rank-castle-art {
    font-size: 1.2rem !important
  }

  .rank-castle-name {
    font-size: .72rem !important
  }

  .rank-player-name {
    display: none !important
  }

  .rank-score {
    font-size: .88rem !important
  }

  .profile-hero-content {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important
  }

  .profile-hero-info {
    align-items: center !important
  }

  .profile-hero-name {
    font-size: 1.2rem !important
  }

  .profile-hero-badges {
    justify-content: center !important;
    flex-wrap: wrap !important
  }

  .profile-avatar-ring {
    width: 78px !important;
    height: 78px !important
  }

  .profile-avatar-inner {
    font-size: 2.4rem !important
  }

  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important
  }

  .profile-stat-val {
    font-size: 1.3rem !important
  }

  .theme-selector {
    gap: 6px !important
  }

  .theme-btn {
    padding: 10px 6px !important
  }

  .theme-btn-icon {
    font-size: 1.2rem !important
  }

  .friends-search-row {
    flex-direction: column !important
  }

  .friends-search-row .btn {
    width: 100% !important
  }

  .friend-card {
    padding: 10px 10px !important
  }

  .friend-avatar {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.2rem !important
  }

  .friend-name {
    font-size: .82rem !important
  }

  .friend-btns {
    flex-direction: column !important;
    gap: 5px !important
  }

  .friend-btns .btn {
    min-height: 36px !important;
    font-size: .7rem !important;
    width: 100% !important
  }

  .mm-idle-title {
    font-size: .95rem !important
  }

  .mm-idle-desc {
    font-size: .78rem !important
  }

  .mm-stats-row {
    gap: 16px !important
  }

  .mm-find-btn {
    max-width: 100% !important
  }

  .mm-result-btns {
    flex-direction: column !important;
    width: 100% !important
  }

  .mm-result-btns .btn {
    width: 100% !important
  }

  .mm-result-title {
    font-size: 1.4rem !important
  }

  .gold-packages-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important
  }

  .gold-pkg-card {
    padding: 14px 8px !important
  }

  .gold-pkg-icon {
    font-size: 1.8rem !important
  }

  .gold-pkg-amount {
    font-size: 1rem !important
  }

  .gold-pkg-price {
    font-size: .88rem !important
  }

  .store-tabs {
    gap: 4px !important
  }

  .store-tab {
    padding: 8px 8px !important;
    font-size: .65rem !important;
    flex: 1 !important
  }

  .vip-title {
    font-size: 1.3rem !important
  }

  .vip-crown {
    font-size: 3rem !important
  }

  .vip-price {
    font-size: 1.4rem !important
  }

  .vip-buy-btn {
    max-width: 100% !important
  }

  .energy-actions {
    flex-direction: column !important
  }

  .energy-actions .btn {
    width: 100% !important;
    min-width: unset !important
  }

  .skill-shop-grid {
    grid-template-columns: 1fr !important
  }

  .skill-owned-grid {
    gap: 8px !important
  }

  .skill-owned-card {
    width: 68px !important
  }

  .modal {
    padding: 22px 16px !important;
    margin: 10px !important
  }

  .modal-icon {
    font-size: 2.5rem !important
  }

  .modal-title {
    font-size: 1.2rem !important
  }

  .modal-body {
    font-size: .88rem !important
  }

  .notif {
    right: 12px !important;
    left: auto !important;
    top: 16px !important;
    bottom: auto !important;
    max-width: calc(100vw - 24px) !important;
    width: auto !important;
    font-size: .78rem !important;
    padding: 10px 14px !important;
    z-index: 99998 !important;
  }

  .terms-toc-grid {
    grid-template-columns: 1fr 1fr !important
  }

  .terms-section {
    padding: 12px 12px !important
  }

  .terms-section p {
    font-size: .88rem !important
  }

  .roulette-track {
    gap: 12px !important
  }

  .roulette-item {
    min-width: 80px !important;
    height: 80px !important
  }

  .roulette-icon {
    font-size: 2rem !important
  }

  .mission-card {
    padding: 8px 10px !important;
    gap: 8px !important
  }

  .mission-icon {
    font-size: 1.3rem !important
  }

  .mission-label {
    font-size: .7rem !important
  }

  .battle-result-overlay {
    padding: 12px !important
  }

  .ad-overlay-modal {
    padding: 24px 18px !important
  }

  .ad-overlay-icon {
    font-size: 2.8rem !important
  }
}

@media (min-width:481px) and (max-width:768px) {
  :root {
    --screen-pad: 14px;
    --panel-pad: 14px
  }

  .map-layout {
    grid-template-columns: 1fr !important;
    gap: 14px
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr) !important
  }

  .options-grid {
    grid-template-columns: 1fr 1fr !important
  }

  .upgrade-grid {
    grid-template-columns: repeat(3, 1fr) !important
  }

  .profile-stats-grid {
    grid-template-columns: repeat(3, 1fr) !important
  }

  .gold-packages-grid {
    grid-template-columns: repeat(2, 1fr) !important
  }

  .skill-shop-grid {
    grid-template-columns: repeat(2, 1fr) !important
  }

  .ranking-table th:nth-child(5),
  .ranking-table td:nth-child(5) {
    display: none !important
  }

  .battle-arena {
    min-height: 160px !important
  }

  .fighter-sprite {
    font-size: 3rem !important
  }

  .top-bar {
    padding: 10px 14px !important
  }

  .top-bar .btn-sm {
    padding: 7px 12px !important;
    font-size: .72rem !important
  }
}

@media (min-width:769px) and (max-width:1024px) {
  .map-layout {
    grid-template-columns: 260px 1fr !important
  }

  .options-grid {
    grid-template-columns: 1fr 1fr !important
  }

  .upgrade-grid {
    grid-template-columns: repeat(3, 1fr) !important
  }

  .gold-packages-grid {
    grid-template-columns: repeat(2, 1fr) !important
  }
}

@media (hover:none) and (pointer:coarse) {
  .option-btn {
    min-height: 54px !important
  }

  .btn {
    min-height: 46px !important
  }

  .btn-sm {
    min-height: 40px !important
  }

  .scroll-btn {
    min-height: 40px !important
  }

  .level-btn {
    min-height: 44px !important
  }

  .skill-slot {
    padding: 6px !important
  }

  .skill-frame {
    width: 50px !important;
    height: 50px !important
  }

  .option-btn:hover:not(:disabled) {
    transform: none !important
  }

  .enemy-card:hover {
    transform: none !important
  }

  .gold-pkg-card:hover {
    transform: none !important
  }
}

@media (max-height:500px) and (orientation:landscape) {
  .screen.active {
    padding-top: 8px !important
  }

  .top-bar {
    padding: 6px 12px !important
  }

  .battle-arena {
    min-height: 120px !important
  }

  .fighter-sprite {
    font-size: 2rem !important
  }

  .question-card {
    padding: 10px 10px !important
  }

  .options-grid {
    gap: 5px !important
  }

  .option-btn {
    padding: 9px 12px !important;
    min-height: 40px !important
  }

  .game-title {
    font-size: 2rem !important
  }

  .title-buttons {
    flex-direction: row !important
  }
}

.screen.active {
  overscroll-behavior: contain
}

.skill-bar {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none
}

.skill-bar::-webkit-scrollbar {
  display: none
}

.btn,
.top-stat-val {
  word-break: keep-all;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.option-btn {
  white-space: normal !important;
  overflow: visible !important
}

.battle-arena {
  overflow: hidden !important
}

.mission-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, .25);
  border: 1px solid var(--border);
  border-radius: 3px;
  transition: all .2s
}

.mission-card.done {
  border-color: rgba(200, 168, 75, .4);
  background: rgba(200, 168, 75, .06)
}

.mission-card.claimed {
  opacity: .5
}

.mission-icon {
  font-size: 1.5rem;
  flex-shrink: 0
}

.mission-body {
  flex: 1;
  min-width: 0
}

.mission-label {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: var(--text);
  margin-bottom: 5px
}

.mission-prog-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px
}

.mission-prog-bar {
  flex: 1;
  height: 5px;
  background: rgba(0, 0, 0, .4);
  border-radius: 3px;
  overflow: hidden
}

.mission-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  border-radius: 3px;
  transition: width .4s ease
}

.mission-prog-text {
  font-family: 'Cinzel', serif;
  font-size: .6rem;
  color: var(--muted);
  white-space: nowrap
}

.mission-reward {
  font-size: .62rem;
  color: var(--muted);
  font-family: 'Cinzel', serif
}

.mission-claim-btn {
  flex-shrink: 0;
  font-size: .68rem !important;
  padding: 6px 10px !important;
  animation: pulse-glow 1.5s ease-in-out infinite
}

.mission-pct {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: var(--muted);
  flex-shrink: 0
}

.mission-claimed-tag {
  font-size: 1.1rem;
  flex-shrink: 0
}

.streak-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  margin-bottom: 10px;
  border-radius: 3px;
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  background: rgba(200, 168, 75, .08);
  border: 1px solid rgba(200, 168, 75, .2);
  animation: screen-in .3s ease-out
}

.streak-display.streak-hot {
  background: rgba(220, 80, 30, .1);
  border-color: rgba(220, 80, 30, .3)
}

.streak-display.streak-godlike {
  background: rgba(96, 192, 224, .1);
  border-color: rgba(96, 192, 224, .3);
  animation: pulse-glow 1s ease-in-out infinite
}

.streak-fire {
  font-size: 1.3rem
}

.streak-count {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold2)
}

.streak-label {
  font-size: .65rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase
}

.streak-bonus {
  font-size: .65rem;
  color: #60c0e0;
  background: rgba(96, 192, 224, .1);
  border: 1px solid rgba(96, 192, 224, .2);
  padding: 2px 7px;
  border-radius: 10px
}

.roulette-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center
}

.roulette-overlay.active {
  display: flex
}

.roulette-modal {
  background: linear-gradient(160deg, rgba(12, 11, 20, .99), rgba(4, 3, 10, .99));
  border: 1px solid rgba(200, 168, 75, .3);
  border-radius: 4px;
  padding: 28px 20px;
  max-width: 480px;
  width: 96%;
  animation: modal-in .3s cubic-bezier(.2, .8, .3, 1);
  box-shadow: 0 0 60px rgba(200, 168, 75, .1);
  text-align: center
}

.roulette-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1rem;
  color: var(--gold2);
  margin-bottom: 18px;
  letter-spacing: .05em
}

.roulette-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px
}

.roulette-item {
  padding: 8px 4px;
  border-radius: 3px;
  border: 1px solid var(--border);
  transition: all .08s;
  background: rgba(0, 0, 0, .3)
}

.roulette-item-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: 3px
}

.roulette-item-label {
  font-family: 'Cinzel', serif;
  font-size: .58rem;
  color: var(--muted);
  letter-spacing: .03em
}

.roulette-active {
  transform: scale(1.08)
}

.roulette-arrow {
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 12px
}

.roulette-collect-btn {
  width: 100%;
  animation: pulse-glow 1s ease-in-out infinite
}

.roulette-spinning {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .2em
}

.boss-lore-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .92);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center
}

.boss-lore-overlay.active {
  display: flex
}

.boss-lore-modal {
  background: linear-gradient(160deg, rgba(15, 5, 5, .99), rgba(8, 3, 3, .99));
  border: 1px solid rgba(176, 32, 32, .4);
  border-radius: 4px;
  padding: 36px 28px;
  max-width: 460px;
  width: 94%;
  animation: modal-in .4s cubic-bezier(.2, .8, .3, 1);
  box-shadow: 0 0 60px rgba(176, 32, 32, .15);
  text-align: center
}

.boss-lore-kingdom {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 14px
}

.boss-lore-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 20px rgba(176, 32, 32, .5))
}

.boss-lore-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.1rem;
  color: #e04040;
  margin-bottom: 16px
}

.boss-lore-flavor {
  font-family: serif;
  font-size: 1rem;
  color: var(--muted2);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 16px
}

.boss-lore-weakness {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  color: var(--gold);
  background: rgba(200, 168, 75, .08);
  border: 1px solid rgba(200, 168, 75, .2);
  padding: 7px 14px;
  border-radius: 3px;
  margin-bottom: 20px
}

.boss-lore-btn {
  width: 100%;
  background: linear-gradient(180deg, rgba(140, 20, 20, .9), rgba(90, 10, 10, .9)) !important;
  border-color: rgba(176, 32, 32, .5) !important
}

.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 960px;
  margin-bottom: 14px
}

.upg-tree-card {
  background: linear-gradient(160deg, rgba(16, 14, 26, .95), rgba(8, 6, 14, .98));
  border: 1px solid rgba(200, 168, 75, .18);
  border-top: 2px solid var(--tree-color, var(--gold));
  border-radius: 3px;
  padding: 14px 14px 12px;
  transition: all .2s;
  position: relative
}

.upg-tree-card:hover {
  border-color: var(--tree-color, var(--gold));
  box-shadow: 0 4px 20px rgba(0, 0, 0, .4), 0 0 15px color-mix(in srgb, var(--tree-color, var(--gold)) 15%, transparent)
}

.upg-tree-card.upg-maxed {
  border-top-color: var(--gold2);
  background: linear-gradient(160deg, rgba(30, 24, 8, .95), rgba(14, 10, 2, .98))
}

.upg-tree-card.upg-locked {
  opacity: .45;
  pointer-events: none
}

.upg-tree-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px
}

.upg-tree-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5))
}

.upg-tree-info {
  flex: 1;
  min-width: 0
}

.upg-tree-name {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  color: var(--text);
  margin-bottom: 5px;
  letter-spacing: .03em
}

.upg-level-badge {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: var(--tree-color, var(--gold));
  background: color-mix(in srgb, var(--tree-color, var(--gold)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tree-color, var(--gold)) 30%, transparent);
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0
}

.upg-dots-row {
  display: flex;
  gap: 3px;
  flex-wrap: wrap
}

.upg-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  transition: all .3s
}

.upg-dot.filled {
  background: var(--tree-color, var(--gold));
  border-color: transparent;
  box-shadow: 0 0 4px color-mix(in srgb, var(--tree-color, var(--gold)) 50%, transparent)
}

.upg-dot.next {
  border-color: var(--tree-color, var(--gold));
  animation: dot-pulse 1.5s ease-in-out infinite
}

@keyframes dot-pulse {

  0%,
  100% {
    box-shadow: none
  }

  50% {
    box-shadow: 0 0 6px var(--tree-color, var(--gold))
  }
}

.upg-next-name {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  color: var(--gold2);
  margin-bottom: 3px
}

.upg-next-desc {
  font-size: .78rem;
  color: var(--muted2);
  margin-bottom: 10px;
  font-style: italic
}

.upg-cost-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px
}

.upg-cost {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  color: var(--gold)
}

.upg-maxed-msg {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  color: var(--gold2);
  margin-bottom: 4px
}

.upg-maxed-stat {
  font-size: .72rem;
  color: var(--muted);
  font-style: italic
}

.upg-locked-msg {
  font-size: .75rem;
  color: var(--muted);
  font-style: italic;
  padding: 4px 0
}

.upgrades-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: var(--muted2);
  max-width: 960px;
  width: 100%
}

.upgrades-summary strong {
  color: var(--gold2)
}

@media (max-width:480px) {
  .upgrade-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px
  }

  .upg-tree-name {
    font-size: .68rem
  }

  .upg-dot {
    width: 8px;
    height: 8px
  }
}

.title-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none
}

.title-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 6, 18, .55) 0%, rgba(10, 6, 18, .40) 40%, rgba(10, 6, 18, .75) 85%, rgba(10, 6, 18, .95) 100%);
  pointer-events: none
}

#screen-title>*:not(.title-video-bg):not(.title-video-overlay),
.auth-screen>*:not(.title-video-bg):not(.title-video-overlay) {
  position: relative;
  z-index: 2
}

.title-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 560px;
  text-align: center;
  z-index: 2;
  padding: 20px
}

.title-badge {
  font-family: 'Oswald', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  color: #ffcc00;
  letter-spacing: .5em;
  text-transform: uppercase;
  background: rgba(255, 204, 0, .12);
  border: 1px solid rgba(255, 204, 0, .35);
  padding: 5px 20px;
  border-radius: 2px;
  margin-bottom: 14px
}

.title-main {
  font-size: clamp(3.5rem, 13vw, 7rem) !important;
  text-shadow: 0 0 40px rgba(255, 204, 0, .5), 0 4px 12px rgba(0, 0, 0, .9);
  margin-bottom: 8px !important;
  animation: title-glow 3s ease-in-out infinite
}

@keyframes title-glow {

  0%,
  100% {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .9))
  }

  50% {
    filter: drop-shadow(0 0 30px rgba(255, 204, 0, .5)) drop-shadow(0 2px 8px rgba(0, 0, 0, .9))
  }
}

.title-subtitle {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: .4em;
  text-transform: uppercase;
  margin-bottom: 6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .8)
}

.title-tagline {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(.7rem, 1.8vw, .88rem);
  font-weight: 400;
  color: rgba(255, 204, 0, .8);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 30px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .7)
}

.title-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 340px
}

.btn-hero {
  font-family: 'Oswald', sans-serif !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  letter-spacing: .2em !important;
  padding: 16px 32px !important;
  text-transform: uppercase !important;
  border-radius: 3px !important;
  background: linear-gradient(135deg, #ffcc00, #ff8800) !important;
  color: #0a0612 !important;
  border: none !important;
  box-shadow: 0 4px 20px rgba(255, 136, 0, .4), 0 0 0 1px rgba(255, 204, 0, .3) !important;
  transition: all .2s !important
}

.btn-hero:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 30px rgba(255, 136, 0, .6), 0 0 20px rgba(255, 204, 0, .3) !important
}

.btn-hero-outline {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .08);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, .4);
  cursor: pointer;
  transition: all .2s;
  width: 100%
}

.btn-hero-outline:hover {
  background: rgba(255, 255, 255, .15);
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .4)
}

.btn-google-hero {
  font-family: 'Oswald', sans-serif !important;
  font-size: .9rem !important;
  font-weight: 600 !important;
  letter-spacing: .15em !important;
  text-transform: uppercase !important;
  background: rgba(255, 255, 255, .12) !important;
  border: 1px solid rgba(255, 255, 255, .25) !important;
  color: #ffffff !important
}

.btn-google-hero:hover {
  background: rgba(255, 255, 255, .2) !important;
  border-color: rgba(255, 255, 255, .5) !important
}

.btn {
  font-family: 'Oswald', sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
  font-size: .85rem !important
}

.btn-gold {
  background: linear-gradient(135deg, #ffcc00, #ff8800) !important;
  color: #0a0612 !important;
  border: none !important;
  box-shadow: 0 3px 12px rgba(255, 136, 0, .35) !important
}

.btn-gold:hover {
  background: linear-gradient(135deg, #ffd700, #ffaa00) !important;
  box-shadow: 0 5px 20px rgba(255, 136, 0, .5) !important
}

.panel-title {
  font-family: 'Oswald', sans-serif !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: .15em !important;
  text-transform: uppercase !important;
  color: #ffd700 !important
}

.top-bar-title {
  font-family: 'Oswald', sans-serif !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  color: #ffd700 !important
}

.question-text {
  font-family: 'Oswald', sans-serif !important;
  font-size: clamp(1.05rem, 3vw, 1.25rem) !important;
  font-weight: 500 !important;
  letter-spacing: .02em !important;
  line-height: 1.5 !important;
  color: #ffffff !important
}

.option-btn {
  font-family: 'Oswald', sans-serif !important;
  font-size: .95rem !important;
  font-weight: 500 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important
}

.castle-name,
.siege-label,
.siege-castle-name {
  font-family: 'Oswald', sans-serif !important;
  font-size: .82rem !important;
  font-weight: 600 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
  color: #ffd700 !important
}

.auth-screen .input-label {
  font-family: 'Oswald', sans-serif !important;
  font-size: .82rem !important;
  font-weight: 600 !important;
  letter-spacing: .2em !important;
  color: #ffd700 !important
}

.auth-screen .input-field {
  background: rgba(10, 6, 18, .75) !important;
  border-color: rgba(255, 204, 0, .3) !important;
  color: #ffffff !important;
  font-family: 'Oswald', sans-serif !important;
  font-size: .95rem !important;
  font-weight: 400 !important;
  letter-spacing: .05em !important;
  backdrop-filter: blur(8px)
}

.auth-screen .input-field:focus {
  border-color: #ffcc00 !important;
  box-shadow: 0 0 0 2px rgba(255, 204, 0, .2), inset 0 2px 8px rgba(0, 0, 0, .4) !important
}

.auth-screen .input-group {
  background: rgba(10, 6, 18, .6);
  border: 1px solid rgba(255, 204, 0, .2);
  border-radius: 4px;
  padding: 20px;
  backdrop-filter: blur(12px)
}

.hp-fill {
  background: linear-gradient(90deg, #cc0000, #ff2020, #ff5050) !important;
  box-shadow: 0 0 8px rgba(255, 32, 32, .5) !important
}

.hp-fill.mid {
  background: linear-gradient(90deg, #ff6600, #ff8800) !important;
  box-shadow: 0 0 8px rgba(255, 136, 0, .5) !important
}

.hp-fill.low {
  background: linear-gradient(90deg, #cc0000, #ff0000) !important;
  box-shadow: 0 0 12px rgba(255, 0, 0, .7) !important;
  animation: hp-shimmer 1.5s linear infinite !important
}

.xp-fill {
  background: linear-gradient(90deg, #8800cc, #aa44ff, #cc88ff) !important;
  box-shadow: 0 0 8px rgba(170, 68, 255, .5) !important
}

.result-banner.correct-ans {
  background: linear-gradient(135deg, rgba(0, 170, 68, .25), rgba(0, 204, 85, .15)) !important;
  border-color: rgba(0, 204, 85, .5) !important;
  color: #44ff88 !important
}

.result-banner.wrong-ans {
  background: linear-gradient(135deg, rgba(204, 0, 0, .25), rgba(255, 32, 32, .15)) !important;
  border-color: rgba(255, 32, 32, .5) !important;
  color: #ff8888 !important
}

.timer-display.urgent {
  color: #ff2020 !important;
  text-shadow: 0 0 20px rgba(255, 32, 32, .8) !important;
  animation: pulse-urgent .5s ease-in-out infinite !important
}

.diff-easy {
  background: rgba(0, 204, 85, .2) !important;
  border-color: rgba(0, 204, 85, .4) !important;
  color: #44ff88 !important
}

.diff-medium {
  background: rgba(255, 204, 0, .2) !important;
  border-color: rgba(255, 204, 0, .4) !important;
  color: #ffd700 !important
}

.diff-hard {
  background: rgba(255, 102, 0, .2) !important;
  border-color: rgba(255, 102, 0, .4) !important;
  color: #ffaa44 !important
}

.diff-epic {
  background: rgba(136, 0, 204, .2) !important;
  border-color: rgba(136, 0, 204, .4) !important;
  color: #cc88ff !important
}

.diff-legendary {
  background: rgba(255, 32, 32, .2) !important;
  border-color: rgba(255, 32, 32, .5) !important;
  color: #ff8888 !important
}

.category-badge {
  font-family: 'Oswald', sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  background: rgba(255, 204, 0, .15) !important;
  border-color: rgba(255, 204, 0, .35) !important;
  color: #ffd700 !important
}

.vs-badge {
  font-family: 'Oswald', sans-serif !important;
  font-size: 1.6rem !important;
  font-weight: 900 !important;
  color: #ff2020 !important;
  text-shadow: 0 0 20px rgba(255, 32, 32, .6) !important
}

@media (max-width:480px) {
  .title-main {
    font-size: clamp(2.8rem, 14vw, 4.5rem) !important
  }

  .title-subtitle {
    font-size: .9rem;
    letter-spacing: .25em
  }

  .title-tagline {
    font-size: .65rem;
    letter-spacing: .08em
  }

  .btn-hero {
    font-size: .95rem !important;
    padding: 14px 24px !important
  }
}

body {
  background: linear-gradient(135deg, #120824 0%, #1a0535 35%, #0d1535 65%, #120824 100%) !important;
  background-attachment: fixed !important
}

.panel {
  background: linear-gradient(160deg, rgba(40, 21, 80, .95), rgba(26, 15, 61, .98)) !important;
  border: 1px solid rgba(255, 224, 0, .35) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06), inset 0 1px 0 rgba(255, 255, 255, .08) !important
}

.panel-title {
  color: #ffe000 !important;
  text-shadow: 0 0 12px rgba(255, 224, 0, .5) !important
}

.top-bar {
  background: linear-gradient(90deg, rgba(30, 15, 61, .95), rgba(20, 10, 45, .95)) !important;
  border-color: rgba(255, 224, 0, .3) !important;
  backdrop-filter: blur(12px) !important
}

.top-bar-title {
  color: #ffe000 !important;
  text-shadow: 0 0 10px rgba(255, 224, 0, .5) !important
}

.question-card {
  background: linear-gradient(160deg, rgba(40, 21, 80, .97), rgba(28, 15, 60, .98)) !important;
  border-color: rgba(255, 224, 0, .3) !important;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .6), 0 0 30px rgba(204, 68, 255, .08) !important
}

.question-text {
  color: #ffffff !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5) !important;
  font-size: clamp(1.1rem, 3vw, 1.3rem) !important
}

.option-btn {
  background: linear-gradient(135deg, rgba(40, 21, 80, .85), rgba(28, 15, 58, .9)) !important;
  border: 1px solid rgba(255, 224, 0, .28) !important;
  color: #ede8ff !important;
  font-size: 1rem !important;
  letter-spacing: .06em !important;
  transition: all .18s !important
}

.option-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(60, 30, 110, .9), rgba(45, 22, 85, .95)) !important;
  border-color: #ffe000 !important;
  color: #ffe000 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5), 0 0 14px rgba(255, 224, 0, .2) !important
}

.option-btn.correct {
  background: linear-gradient(135deg, rgba(0, 200, 100, .3), rgba(0, 150, 80, .4)) !important;
  border-color: #00ff88 !important;
  color: #00ff88 !important;
  box-shadow: 0 0 20px rgba(0, 255, 136, .35) !important
}

.option-btn.wrong {
  background: linear-gradient(135deg, rgba(255, 34, 68, .2), rgba(200, 20, 50, .3)) !important;
  border-color: #ff4466 !important;
  color: #ff7799 !important
}

.btn-gold {
  background: linear-gradient(135deg, #ffcc00, #ff8c00) !important;
  color: #120824 !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 4px 20px rgba(255, 160, 0, .45), 0 0 0 1px rgba(255, 224, 0, .3) !important;
  text-shadow: none !important
}

.btn-gold:hover {
  background: linear-gradient(135deg, #ffe44d, #ffaa00) !important;
  box-shadow: 0 6px 28px rgba(255, 180, 0, .6), 0 0 20px rgba(255, 224, 0, .3) !important;
  transform: translateY(-2px) !important
}

.btn {
  background: linear-gradient(135deg, rgba(50, 28, 90, .85), rgba(35, 18, 68, .9)) !important;
  border: 1px solid rgba(255, 224, 0, .25) !important;
  color: #ede8ff !important
}

.btn:hover:not(:disabled) {
  border-color: rgba(255, 224, 0, .5) !important;
  background: linear-gradient(135deg, rgba(65, 35, 110, .9), rgba(48, 25, 88, .95)) !important
}

.hp-fill {
  background: linear-gradient(90deg, #cc0033, #ff2244, #ff5566) !important;
  box-shadow: 0 0 10px rgba(255, 34, 68, .6), 0 0 20px rgba(255, 34, 68, .3) !important
}

.hp-fill.mid {
  background: linear-gradient(90deg, #ff5500, #ff8800, #ffaa33) !important;
  box-shadow: 0 0 10px rgba(255, 136, 0, .6) !important
}

.hp-fill.low {
  background: linear-gradient(90deg, #cc0000, #ff0000) !important;
  box-shadow: 0 0 15px rgba(255, 0, 0, .8) !important
}

.xp-fill {
  background: linear-gradient(90deg, #8800ee, #bb44ff, #dd88ff) !important;
  box-shadow: 0 0 10px rgba(187, 68, 255, .6) !important
}

.hp-bar {
  background: rgba(255, 255, 255, .08) !important
}

.timer-display {
  color: #ffe000 !important;
  font-size: 1.5rem !important;
  font-weight: 900 !important;
  text-shadow: 0 0 12px rgba(255, 224, 0, .6) !important
}

.timer-display.urgent {
  color: #ff2244 !important;
  text-shadow: 0 0 20px rgba(255, 34, 68, .9) !important
}

.category-badge {
  background: rgba(255, 224, 0, .15) !important;
  border: 1px solid rgba(255, 224, 0, .4) !important;
  color: #ffe000 !important;
  font-weight: 700 !important
}

.result-banner.correct-ans {
  background: linear-gradient(135deg, rgba(0, 200, 100, .2), rgba(0, 255, 136, .12)) !important;
  border-color: #00ff88 !important;
  color: #44ffaa !important;
  box-shadow: 0 0 20px rgba(0, 255, 136, .2) !important
}

.result-banner.wrong-ans {
  background: linear-gradient(135deg, rgba(255, 34, 68, .2), rgba(255, 80, 100, .12)) !important;
  border-color: #ff4466 !important;
  color: #ff8899 !important
}

.modal {
  background: linear-gradient(160deg, rgba(40, 21, 80, .99), rgba(18, 8, 36, .99)) !important;
  border: 1px solid rgba(255, 224, 0, .4) !important;
  box-shadow: 0 0 60px rgba(204, 68, 255, .2), 0 20px 60px rgba(0, 0, 0, .8) !important
}

.modal-title.victory {
  color: #ffe000 !important;
  text-shadow: 0 0 20px rgba(255, 224, 0, .6) !important
}

.modal-title.defeat {
  color: #ff4466 !important;
  text-shadow: 0 0 20px rgba(255, 34, 68, .6) !important
}

.ranking-table th {
  background: rgba(40, 21, 80, .95) !important;
  color: #ffe000 !important
}

.ranking-table tr:nth-child(even) td {
  background: rgba(255, 224, 0, .04) !important
}

.rank-score {
  color: #ffe000 !important;
  font-size: 1rem !important
}

.enemy-card {
  background: linear-gradient(135deg, rgba(40, 21, 80, .8), rgba(28, 15, 58, .9)) !important;
  border-color: rgba(255, 224, 0, .2) !important
}

.enemy-card:hover {
  border-color: #ffe000 !important;
  box-shadow: 0 4px 20px rgba(255, 224, 0, .2) !important
}

.upg-tree-card {
  background: linear-gradient(160deg, rgba(40, 21, 80, .95), rgba(28, 15, 58, .98)) !important;
  border-color: rgba(255, 224, 0, .2) !important
}

.notif {
  background: linear-gradient(135deg, rgba(40, 21, 80, .97), rgba(28, 15, 58, .99)) !important;
  border: 1px solid rgba(255, 224, 0, .4) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .6), 0 0 15px rgba(255, 224, 0, .15) !important
}

.scroll-btn {
  background: transparent !important;
  border: 1px solid var(--scroll-color, #ffe000) !important;
  color: var(--scroll-color, #ffe000) !important
}

.input-field {
  background: rgba(20, 10, 45, .8) !important;
  border: 1px solid rgba(255, 224, 0, .3) !important;
  color: #ffffff !important
}

.input-field:focus {
  border-color: #ffe000 !important;
  box-shadow: 0 0 0 2px rgba(255, 224, 0, .25) !important
}

.input-label {
  color: #ffe000 !important
}

.diff-easy {
  background: rgba(0, 255, 136, .2) !important;
  border-color: rgba(0, 255, 136, .5) !important;
  color: #44ffaa !important
}

.diff-medium {
  background: rgba(255, 224, 0, .2) !important;
  border-color: rgba(255, 224, 0, .5) !important;
  color: #ffe44d !important
}

.diff-hard {
  background: rgba(255, 136, 0, .2) !important;
  border-color: rgba(255, 136, 0, .5) !important;
  color: #ffaa33 !important
}

.diff-epic {
  background: rgba(204, 68, 255, .2) !important;
  border-color: rgba(204, 68, 255, .5) !important;
  color: #dd88ff !important
}

.diff-legendary {
  background: rgba(255, 34, 68, .2) !important;
  border-color: rgba(255, 34, 68, .5) !important;
  color: #ff7799 !important
}

.mission-card {
  background: rgba(40, 21, 80, .7) !important;
  border-color: rgba(255, 224, 0, .2) !important
}

.mission-card.done {
  border-color: rgba(0, 255, 136, .4) !important;
  background: rgba(0, 100, 50, .15) !important
}

.mission-prog-fill {
  background: linear-gradient(90deg, #cc44ff, #ffe000) !important
}

.streak-display {
  background: rgba(255, 136, 0, .15) !important;
  border-color: rgba(255, 136, 0, .4) !important
}

.streak-display.streak-hot {
  background: rgba(255, 34, 68, .15) !important;
  border-color: rgba(255, 34, 68, .5) !important
}

.streak-display.streak-godlike {
  background: rgba(0, 238, 221, .1) !important;
  border-color: rgba(0, 238, 221, .4) !important
}

.streak-count {
  color: #ffe000 !important
}

.vs-badge {
  color: #ff2244 !important;
  text-shadow: 0 0 25px rgba(255, 34, 68, .8) !important;
  font-size: 2rem !important
}

.game-title {
  background: linear-gradient(180deg, #ffffa0 0%, #ffe000 30%, #ffaa00 65%, #ff6600 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 3px 12px rgba(0, 0, 0, .9)) !important
}

.title-main {
  text-shadow: none !important;
  filter: drop-shadow(0 0 40px rgba(255, 200, 0, .6)) drop-shadow(0 3px 12px rgba(0, 0, 0, .9)) !important
}

.btn-hero {
  background: linear-gradient(135deg, #ffe000, #ff8800) !important;
  box-shadow: 0 6px 28px rgba(255, 160, 0, .55), 0 0 0 1px rgba(255, 224, 0, .4) !important
}

.btn-hero-outline {
  border: 2px solid rgba(255, 255, 255, .55) !important;
  background: rgba(255, 255, 255, .1) !important
}

.btn-hero-outline:hover {
  background: rgba(255, 255, 255, .2) !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 20px rgba(255, 255, 255, .2) !important
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffe000, #cc44ff) !important
}

.ember {
  background: radial-gradient(circle, rgba(255, 220, 0, .95), rgba(255, 100, 0, .4)) !important;
  box-shadow: 0 0 8px rgba(255, 200, 0, .7) !important
}

.profile-layout {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 16px 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start
}

.profile-edit-panel {
  grid-column: 1 / -1
}

.profile-stats-panel {}

.profile-titles-panel {}

.profile-ads-panel {
  grid-column: 1 / -1
}

@media (max-width:600px) {
  .profile-layout {
    grid-template-columns: 1fr
  }

  .profile-edit-panel {
    grid-column: 1
  }

  .profile-ads-panel {
    grid-column: 1
  }
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 18px
}

@media(min-width:600px) {
  .profile-card {
    flex-direction: row;
    align-items: flex-start
  }
}

.profile-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--surface2);
  box-shadow: 0 0 20px rgba(255, 224, 0, .25)
}

.profile-upload-btn {
  font-size: .72rem !important;
  padding: 6px 14px !important;
  cursor: pointer;
  display: inline-block
}

.profile-upload-hint {
  font-size: .62rem;
  color: var(--muted);
  font-family: 'Cinzel', serif
}

.profile-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.profile-edit-row {
  display: flex;
  gap: 8px;
  align-items: center
}

.profile-edit-row .input-field {
  flex: 1
}

.profile-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px
}

.profile-field-block {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.profile-theme-block {
  border-top: 1px solid rgba(255, 224, 0, .12);
  padding-top: 16px;
  margin-top: 4px
}

@media (max-width:600px) {
  .profile-fields-grid {
    grid-template-columns: 1fr
  }
}

.profile-stats-panel,
.profile-titles-panel {
  width: 100%
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  padding: 6px 0
}

.profile-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 3px;
  background: rgba(255, 224, 0, .06);
  border: 1px solid rgba(255, 224, 0, .15);
  text-align: center
}

.profile-stat-icon {
  font-size: 1.4rem
}

.profile-stat-val {
  font-family: 'Oswald', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffe000
}

.profile-stat-label {
  font-family: 'Cinzel', serif;
  font-size: .6rem;
  color: var(--muted);
  letter-spacing: .05em
}

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 3px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  transition: all .2s
}

.title-row.title-active {
  background: rgba(255, 224, 0, .08);
  border-color: rgba(255, 224, 0, .4)
}

.title-row.title-locked {
  opacity: .4
}

.title-icon {
  font-size: 1.4rem;
  flex-shrink: 0
}

.title-name {
  flex: 1;
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  font-weight: 600
}

.title-unlock-hint {
  font-size: .7rem;
  color: var(--muted);
  font-family: 'Cinzel', serif
}

.friends-layout {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 14px
}

.friends-search-panel {}

.friends-search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px
}

.friends-search-row .input-field {
  flex: 1
}

.friends-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: .7rem;
  background: #ff2244;
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  margin-left: 6px
}

.friend-result-loading,
.friend-result-empty {
  padding: 12px;
  font-size: .82rem;
  color: var(--muted);
  font-family: 'Cinzel', serif;
  text-align: center
}

.friend-result-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 224, 0, .06);
  border: 1px solid rgba(255, 224, 0, .2);
  border-radius: 3px;
  margin-bottom: 8px
}

.friend-result-info {
  flex: 1
}

.friend-result-name {
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  color: #fff
}

.friend-result-sub {
  font-size: .7rem;
  color: var(--muted)
}

.friend-request-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 34, 68, .25);
  border-radius: 3px;
  margin-bottom: 8px;
  background: rgba(255, 34, 68, .06)
}

.friend-request-name {
  flex: 1;
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  color: #fff
}

.friend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, .03);
  transition: all .2s
}

.friend-row:hover {
  border-color: rgba(255, 224, 0, .3);
  background: rgba(255, 224, 0, .04)
}

.friend-avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: var(--surface2);
  overflow: hidden;
  flex-shrink: 0
}

.friend-info {
  flex: 1;
  min-width: 0
}

.friend-name {
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  color: #fff
}

.friend-sub {
  font-size: .7rem;
  color: var(--muted)
}

.friend-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0
}

.friends-empty {
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: .8rem;
  font-family: 'Cinzel', serif;
  font-style: italic
}

.multiplayer-layout {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 14px
}

.mp-status-panel {}

.mp-status-content {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0
}

.mp-status-icon {
  font-size: 2.5rem;
  flex-shrink: 0
}

.mp-status-text {
  font-family: 'Cinzel', serif;
  font-size: .88rem;
  color: var(--muted2);
  line-height: 1.6
}

.mp-arena {
  display: grid;
  grid-template-columns: 1fr 50px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  background: rgba(255, 224, 0, .04);
  border: 1px solid rgba(255, 224, 0, .15);
  border-radius: 4px
}

.mp-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center
}

.mp-player-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  overflow: hidden
}

.mp-player-name {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: #fff;
  letter-spacing: .05em
}

.mp-hp-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px
}

.mp-hp-bar .hp-bar {
  flex: 1;
  height: 8px
}

.mp-hp-bar span {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  color: var(--muted);
  white-space: nowrap
}

.mp-score {
  font-family: 'Oswald', sans-serif;
  font-size: .85rem;
  color: #ffe000;
  font-weight: 600
}

.mp-vs {
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #ff2244;
  text-shadow: 0 0 15px rgba(255, 34, 68, .6)
}

.answered-waiting {
  text-align: center;
  padding: 12px;
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  color: var(--muted);
  font-style: italic
}

.duel-invite-notif {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(40, 21, 80, .98), rgba(18, 8, 36, .99));
  border: 2px solid #ff2244;
  border-radius: 4px;
  padding: 16px 20px;
  z-index: 500;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 0 30px rgba(255, 34, 68, .3), 0 8px 30px rgba(0, 0, 0, .7);
  animation: modal-in .3s ease-out
}

.duel-invite-text {
  font-family: 'Cinzel', serif;
  font-size: .9rem;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.5
}

.duel-invite-btns {
  display: flex;
  gap: 8px;
  justify-content: center
}

@media(max-width:480px) {
  .profile-stats-grid {
    grid-template-columns: repeat(3, 1fr)
  }

  .mp-arena {
    grid-template-columns: 1fr 36px 1fr;
    gap: 6px
  }

  .mp-player-avatar {
    width: 40px;
    height: 40px;
    font-size: 1.2rem
  }

  .friends-search-row {
    flex-direction: column
  }
}

.terms-doc {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 40px
}

.terms-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 20px;
  background: linear-gradient(135deg, rgba(40, 21, 80, .98), rgba(18, 8, 36, .99));
  border: 1px solid rgba(255, 224, 0, .35);
  border-radius: 4px;
  margin-bottom: 16px
}

.terms-logo {
  font-size: 3rem;
  filter: drop-shadow(0 0 15px rgba(255, 224, 0, .4))
}

.terms-game-name {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.4rem;
  color: #ffe000;
  margin-bottom: 4px
}

.terms-company {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  color: var(--muted2)
}

.terms-version {
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  color: var(--muted)
}

.terms-toc {
  background: rgba(255, 224, 0, .05);
  border: 1px solid rgba(255, 224, 0, .2);
  border-radius: 4px;
  padding: 16px 18px;
  margin-bottom: 16px
}

.terms-toc-title {
  font-family: 'Oswald', sans-serif;
  font-size: .85rem;
  color: #ffe000;
  margin-bottom: 10px;
  letter-spacing: .1em
}

.terms-toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px
}

.terms-toc-item {
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  color: var(--muted2);
  text-decoration: none;
  padding: 5px 8px;
  border-radius: 2px;
  border: 1px solid rgba(255, 224, 0, .12);
  background: rgba(0, 0, 0, .2);
  transition: all .2s;
  display: block
}

.terms-toc-item:hover {
  color: #ffe000;
  border-color: rgba(255, 224, 0, .35);
  background: rgba(255, 224, 0, .06)
}

.terms-section {
  padding: 18px 20px;
  margin-bottom: 10px;
  background: linear-gradient(160deg, rgba(28, 15, 58, .9), rgba(18, 8, 36, .95));
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 4px;
  border-left: 3px solid rgba(255, 224, 0, .5)
}

.terms-section-title {
  font-family: 'Oswald', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  color: #ffe000;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 224, 0, .15)
}

.terms-section p {
  font-family: serif;
  font-size: .92rem;
  color: var(--muted2);
  line-height: 1.75;
  margin-bottom: 8px;
  text-align: justify
}

.terms-section strong {
  color: #fff
}

.terms-copyright {
  border-left-color: #ffe000
}

.terms-copyright-box {
  background: rgba(255, 224, 0, .08);
  border: 2px solid rgba(255, 224, 0, .35);
  border-radius: 3px;
  padding: 14px 18px;
  margin-bottom: 12px;
  text-align: center
}

.terms-copyright-text {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1rem;
  color: #ffe000;
  margin-bottom: 4px
}

.terms-copyright-sub {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  color: var(--muted2)
}

.terms-tech-list {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px
}

.terms-tech-title {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: var(--muted);
  width: 100%;
  margin-bottom: 4px
}

.terms-tech-badge {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  color: var(--muted2);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  padding: 3px 10px;
  border-radius: 10px
}

.terms-contact-card {
  background: rgba(255, 224, 0, .06);
  border: 1px solid rgba(255, 224, 0, .25);
  border-radius: 3px;
  padding: 14px 18px;
  margin-top: 8px
}

.terms-contact-name {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1rem;
  color: #ffe000;
  margin-bottom: 4px
}

.terms-contact-info {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  color: var(--muted2);
  margin-bottom: 2px
}

.terms-footer {
  text-align: center;
  padding: 24px 20px;
  margin-top: 10px;
  background: linear-gradient(135deg, rgba(40, 21, 80, .98), rgba(18, 8, 36, .99));
  border: 1px solid rgba(255, 224, 0, .25);
  border-radius: 4px
}

.terms-footer-copy {
  font-family: 'Cinzel Decorative', cursive;
  font-size: .95rem;
  color: #ffe000;
  margin-bottom: 6px
}

.terms-footer-sub {
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  color: var(--muted)
}

.title-terms-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  color: rgba(255, 224, 0, .5);
  letter-spacing: .1em;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 16px;
  transition: color .2s
}

.title-terms-link:hover {
  color: rgba(255, 224, 0, .85)
}

@media(max-width:480px) {
  .terms-toc-grid {
    grid-template-columns: 1fr 1fr
  }

  .terms-section {
    padding: 12px 14px
  }

  .terms-section p {
    font-size: .85rem
  }
}

.mm-layout {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 14px
}

.mm-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  text-align: center
}

.mm-idle-icon {
  font-size: 3.5rem;
  filter: drop-shadow(0 0 20px rgba(255, 224, 0, .4));
  animation: castle-breathe 3s ease-in-out infinite
}

.mm-idle-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.1rem;
  color: #ffe000;
  letter-spacing: .08em
}

.mm-idle-desc {
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  color: var(--muted2);
  max-width: 380px;
  line-height: 1.7
}

.mm-stats-row {
  display: flex;
  gap: 24px;
  justify-content: center
}

.mm-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px
}

.mm-stat span:first-child {
  font-family: 'Oswald', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffe000;
  text-shadow: 0 0 14px rgba(255, 224, 0, .5)
}

.mm-stat span:last-child {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase
}

.mm-find-btn {
  width: 100%;
  max-width: 280px;
  font-size: 1rem !important;
  padding: 16px !important;
  letter-spacing: .2em !important;
  animation: pulse-glow 2s ease-in-out infinite
}

.mm-searching {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  text-align: center
}

.mm-radar {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center
}

.mm-radar-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 224, 0, .6);
  animation: radar-expand 2s ease-out infinite
}

.mm-radar-ring.r1 {
  width: 40px;
  height: 40px;
  animation-delay: 0s
}

.mm-radar-ring.r2 {
  width: 70px;
  height: 70px;
  animation-delay: .6s
}

.mm-radar-ring.r3 {
  width: 100px;
  height: 100px;
  animation-delay: 1.2s
}

@keyframes radar-expand {
  0% {
    transform: scale(.6);
    opacity: .8;
    border-color: rgba(255, 224, 0, .8)
  }

  100% {
    transform: scale(1);
    opacity: 0;
    border-color: rgba(255, 224, 0, 0)
  }
}

.mm-radar-dot {
  font-size: 2rem;
  z-index: 1;
  animation: castle-breathe 1s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(255, 224, 0, .6))
}

.mm-searching-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #ffe000;
  letter-spacing: .2em
}

.mm-searching-sub {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  color: var(--muted2)
}

.mm-searching-timer {
  font-family: 'Oswald', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: rgba(255, 224, 0, .5)
}

.mm-cancel-btn {
  font-size: .8rem !important;
  padding: 8px 20px !important
}

.mm-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  text-align: center
}

.mm-found-icon {
  font-size: 3rem;
  animation: damage-pop .5s ease-out
}

.mm-found-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #00ff88;
  letter-spacing: .2em
}

.mm-found-name {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.2rem;
  color: #ffe000
}

.mm-found-sub {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  color: var(--muted2);
  animation: loading 1.5s infinite
}

.mm-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 0;
  text-align: center
}

.mm-result-icon {
  font-size: 4rem;
  animation: damage-pop .5s ease-out
}

.mm-win .mm-result-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.5rem;
  color: #ffe000;
  text-shadow: 0 0 25px rgba(255, 224, 0, .6)
}

.mm-lose .mm-result-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.5rem;
  color: #ff4466;
  text-shadow: 0 0 25px rgba(255, 34, 68, .5)
}

.mm-result-sub {
  font-family: 'Cinzel', serif;
  font-size: .88rem;
  color: var(--muted2)
}

.mm-result-sub strong {
  color: #fff
}

.mm-result-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px
}

.mm-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, .03);
  transition: all .2s
}

.mm-history-row:hover {
  border-color: rgba(255, 224, 0, .25)
}

.mm-history-result {
  font-size: 1.4rem;
  flex-shrink: 0
}

.mm-h-win {
  filter: drop-shadow(0 0 6px rgba(255, 224, 0, .5))
}

.mm-h-lose {
  filter: drop-shadow(0 0 6px rgba(255, 34, 68, .4))
}

.mm-history-info {
  flex: 1
}

.mm-history-name {
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  color: #fff
}

.mm-history-score {
  font-family: 'Oswald', sans-serif;
  font-size: .85rem;
  color: #ffe000;
  font-weight: 600
}

.mm-history-mode {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border)
}

.mm-status-panel {
  min-height: 200px
}

@media (max-width:480px) {
  .mm-stats-row {
    gap: 16px
  }

  .mm-find-btn {
    max-width: 100% !important
  }

  .mm-result-btns {
    flex-direction: column
  }
}

.auth-footer-terms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  color: var(--muted)
}

.auth-footer-terms button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  color: rgba(255, 224, 0, .5);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
  padding: 0;
  letter-spacing: .05em;
  text-transform: none !important;
  font-weight: 400 !important;
  min-height: unset !important
}

.auth-footer-terms button:hover {
  color: rgba(255, 224, 0, .85)
}

.auth-footer-terms span {
  color: var(--muted);
  font-size: .6rem
}

.profile-hero {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(40, 21, 80, .98), rgba(10, 5, 20, .99));
  border-bottom: 2px solid rgba(255, 224, 0, .3);
  padding: 24px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  animation: screen-in .4s ease-out
}

.profile-hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden
}

.profile-particle {
  position: absolute;
  bottom: -20px;
  animation: profile-particle-rise linear infinite;
  pointer-events: none
}

@keyframes profile-particle-rise {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0
  }

  10% {
    opacity: .8
  }

  90% {
    opacity: .3
  }

  100% {
    transform: translateY(-120px) rotate(360deg);
    opacity: 0
  }
}

.profile-hero-content {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 1
}

.profile-avatar-ring {
  position: relative;
  flex-shrink: 0;
  width: 90px;
  height: 90px
}

.profile-avatar-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(#ffe000, #aa44ff, #00ff88, #ffe000);
  animation: avatar-ring-spin 3s linear infinite;
  z-index: 0
}

@keyframes avatar-ring-spin {
  from {
    transform: rotate(0deg)
  }

  to {
    transform: rotate(360deg)
  }
}

.profile-avatar-inner {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--surface);
  z-index: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem
}

.profile-avatar-glow {
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  z-index: -1;
  opacity: .5;
  pointer-events: none;
  animation: avatar-glow-pulse 2s ease-in-out infinite
}

@keyframes avatar-glow-pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: .4
  }

  50% {
    transform: scale(1.1);
    opacity: .7
  }
}

.profile-level-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  z-index: 2;
  background: linear-gradient(135deg, #ffe000, #ff8800);
  color: #120824;
  font-family: 'Oswald', sans-serif;
  font-size: .75rem;
  font-weight: 900;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(255, 224, 0, .5)
}

.profile-hero-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px
}

@media (min-width:481px) {
  .profile-hero-content {
    align-items: center
  }
}

.profile-hero-name {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.3rem;
  color: #ffe000;
  margin-bottom: 4px;
  text-shadow: 0 0 20px rgba(255, 224, 0, .5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.profile-hero-title {
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  color: var(--muted2);
  margin-bottom: 3px;
  font-style: italic
}

.profile-hero-castle {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 8px
}

.profile-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-start
}

.profile-hero-badge {
  font-family: 'Cinzel', serif;
  font-size: .62rem;
  padding: 3px 8px;
  border-radius: 10px
}

.profile-hero-badge.win {
  background: rgba(0, 255, 136, .12);
  border: 1px solid rgba(0, 255, 136, .3);
  color: #44ffaa
}

.profile-hero-badge.lose {
  background: rgba(255, 34, 68, .12);
  border: 1px solid rgba(255, 34, 68, .3);
  color: #ff8899
}

.profile-hero-badge.streak {
  background: rgba(255, 136, 0, .12);
  border: 1px solid rgba(255, 136, 0, .3);
  color: #ffaa44
}

.profile-hero-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  position: relative;
  z-index: 1
}

.profile-edit-panel {}

.theme-selector {
  display: flex;
  gap: 8px;
  margin-top: 6px
}

.theme-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 8px;
  border-radius: 4px;
  cursor: pointer;
  background: rgba(0, 0, 0, .3);
  border: 2px solid var(--border);
  transition: all .2s;
  min-height: unset !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 400 !important
}

.theme-btn:hover {
  border-color: rgba(255, 224, 0, .5);
  background: rgba(255, 224, 0, .06)
}

.theme-btn.active {
  border-color: #ffe000;
  background: rgba(255, 224, 0, .12);
  box-shadow: 0 0 15px rgba(255, 224, 0, .2)
}

.theme-btn-icon {
  font-size: 1.4rem
}

.theme-btn-label {
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  color: var(--muted2)
}

.theme-btn.active .theme-btn-label {
  color: #ffe000
}

body.theme-light,
body.theme-light * {
  color: #2c1810
}

body.theme-light {
  background: linear-gradient(135deg, #fdf6e3 0%, #f5e6c8 50%, #faebd0 100%) !important;
  background-attachment: fixed !important
}

body.theme-light::before {
  opacity: .1 !important
}

body.theme-light body,
body.theme-light p,
body.theme-light div,
body.theme-light span {
  color: #2c1810
}

body.theme-light .panel {
  background: linear-gradient(160deg, #fffcf0, #faf4dc) !important;
  border: 1px solid rgba(160, 110, 20, .3) !important;
  box-shadow: 0 4px 16px rgba(120, 80, 10, .12), 0 0 0 1px rgba(160, 110, 20, .08) !important
}

body.theme-light .panel::before,
body.theme-light .panel::after {
  color: #b8860b !important;
  opacity: .5 !important
}

body.theme-light .panel-title {
  color: #6a3008 !important;
  text-shadow: none !important
}

body.theme-light .top-bar {
  background: linear-gradient(90deg, #fffcee, #faf2d8) !important;
  border-bottom: 2px solid rgba(160, 110, 20, .25) !important;
  box-shadow: 0 2px 12px rgba(120, 80, 10, .1) !important
}

body.theme-light .top-bar-title {
  color: #6a3008 !important;
  text-shadow: none !important
}

body.theme-light .top-stat {
  color: #4a2000 !important
}

body.theme-light .top-stat-val {
  color: #4a2000 !important
}

body.theme-light .question-card {
  background: linear-gradient(160deg, #fffdf5, #faf5e0) !important;
  border: 1px solid rgba(160, 110, 20, .2) !important;
  box-shadow: 0 4px 20px rgba(120, 80, 10, .1) !important
}

body.theme-light .question-text {
  color: #1a0800 !important;
  text-shadow: none !important
}

body.theme-light .question-number {
  color: #8a5010 !important
}

body.theme-light .question-meta {
  border-color: rgba(160, 110, 20, .15) !important
}

body.theme-light .category-badge {
  background: rgba(160, 110, 20, .12) !important;
  border: 1px solid rgba(160, 110, 20, .3) !important;
  color: #6a3008 !important
}

body.theme-light .timer-display {
  color: #6a3008 !important;
  background: rgba(160, 110, 20, .1) !important;
  border: 2px solid rgba(160, 110, 20, .25) !important;
  text-shadow: none !important
}

body.theme-light .timer-display.urgent {
  color: #aa1100 !important;
  background: rgba(180, 20, 0, .08) !important;
  border-color: rgba(180, 20, 0, .3) !important;
  animation: none !important;
  font-weight: 900 !important
}

body.theme-light .option-btn {
  background: linear-gradient(135deg, #fffcf0, #faf4dc) !important;
  border: 1px solid rgba(160, 110, 20, .25) !important;
  color: #1a0800 !important;
  text-shadow: none !important;
  box-shadow: 0 2px 8px rgba(120, 80, 10, .08) !important
}

body.theme-light .option-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(184, 134, 11, .15), rgba(160, 110, 0, .2)) !important;
  border-color: #b8860b !important;
  color: #5a2800 !important;
  box-shadow: 0 4px 14px rgba(160, 110, 10, .2) !important;
  transform: translateY(-2px) !important
}

body.theme-light .option-btn.correct {
  background: linear-gradient(135deg, rgba(0, 130, 60, .1), rgba(0, 110, 50, .15)) !important;
  border-color: #008844 !important;
  color: #004422 !important
}

body.theme-light .option-btn.wrong {
  background: linear-gradient(135deg, rgba(160, 20, 20, .1), rgba(140, 10, 10, .15)) !important;
  border-color: #cc2222 !important;
  color: #880000 !important
}

body.theme-light .btn {
  background: linear-gradient(135deg, #fffcf0, #f5eccc) !important;
  border: 1px solid rgba(160, 110, 20, .3) !important;
  color: #2c1810 !important;
  text-shadow: none !important;
  box-shadow: 0 2px 8px rgba(120, 80, 10, .1) !important
}

body.theme-light .btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(184, 134, 11, .18), rgba(160, 110, 0, .22)) !important;
  border-color: #b8860b !important;
  color: #4a2000 !important
}

body.theme-light .btn:disabled {
  background: rgba(160, 130, 80, .1) !important;
  color: rgba(80, 50, 20, .4) !important;
  border-color: rgba(160, 110, 20, .12) !important
}

body.theme-light .btn-gold {
  background: linear-gradient(135deg, #c8960b, #9a6e08) !important;
  color: #fff8e0 !important;
  border: none !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .2) !important;
  box-shadow: 0 3px 14px rgba(160, 110, 0, .4) !important
}

body.theme-light .btn-gold:hover:not(:disabled) {
  background: linear-gradient(135deg, #d8a61b, #b07e10) !important;
  box-shadow: 0 5px 20px rgba(160, 110, 0, .55) !important;
  color: #fff8e0 !important
}

body.theme-light .btn-ghost {
  background: transparent !important;
  color: #7a4010 !important;
  border-color: rgba(160, 110, 20, .25) !important
}

body.theme-light .btn-google {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, .2) !important;
  color: #444444 !important
}

body.theme-light .input-field {
  background: #fffef8 !important;
  border: 1px solid rgba(160, 110, 20, .3) !important;
  color: #1a0800 !important;
  text-shadow: none !important;
  box-shadow: inset 0 2px 6px rgba(120, 80, 10, .06) !important
}

body.theme-light .input-field:focus {
  border-color: #b8860b !important;
  box-shadow: 0 0 0 2px rgba(184, 134, 11, .2), inset 0 2px 6px rgba(120, 80, 10, .06) !important
}

body.theme-light .input-field::placeholder {
  color: rgba(100, 60, 20, .4) !important
}

body.theme-light .input-label {
  color: #6a3008 !important;
  text-shadow: none !important
}

body.theme-light .siege-arena {
  background: linear-gradient(135deg, #f5e8c8, #f0ddb0) !important;
  border-color: rgba(160, 110, 20, .25) !important
}

body.theme-light .siege-player-side {
  background: rgba(255, 252, 235, .7) !important;
  border-right-color: rgba(160, 110, 20, .2) !important
}

body.theme-light .siege-label {
  color: #6a3008 !important;
  text-shadow: none !important
}

body.theme-light .hp-bar {
  background: rgba(120, 80, 20, .15) !important
}

body.theme-light .hp-fill {
  background: linear-gradient(90deg, #bb2020, #dd4444) !important;
  box-shadow: 0 0 6px rgba(180, 20, 20, .35) !important
}

body.theme-light .hp-fill.mid {
  background: linear-gradient(90deg, #bb6600, #dd8800) !important
}

body.theme-light .hp-fill.low {
  background: linear-gradient(90deg, #991100, #bb2222) !important
}

body.theme-light .xp-bar {
  background: rgba(100, 60, 20, .12) !important
}

body.theme-light .xp-fill {
  background: linear-gradient(90deg, #5820a0, #7840c8) !important
}

body.theme-light .hp-label {
  color: #5a2800 !important
}

body.theme-light .result-banner.correct-ans {
  background: rgba(0, 120, 50, .1) !important;
  border-color: rgba(0, 140, 60, .4) !important;
  color: #004422 !important
}

body.theme-light .result-banner.correct-ans * {
  color: #004422 !important
}

body.theme-light .result-banner.wrong-ans {
  background: rgba(160, 20, 20, .08) !important;
  border-color: rgba(180, 30, 30, .35) !important;
  color: #880000 !important
}

body.theme-light .result-banner.wrong-ans * {
  color: #880000 !important
}

body.theme-light .damage-text {
  color: #8a3008 !important
}

body.theme-light .weakness-label {
  color: #7a0060 !important
}

body.theme-light .modal {
  background: linear-gradient(160deg, #fffdf5, #faf5e0) !important;
  border: 1px solid rgba(160, 110, 20, .35) !important;
  box-shadow: 0 20px 60px rgba(80, 40, 0, .2) !important
}

body.theme-light .modal-icon {
  filter: none !important
}

body.theme-light .modal-title {
  color: #6a3008 !important;
  text-shadow: none !important
}

body.theme-light .modal-title.victory {
  color: #b8860b !important
}

body.theme-light .modal-title.defeat {
  color: #aa1100 !important
}

body.theme-light .modal-body {
  color: #2c1810 !important
}

body.theme-light .notif {
  background: #fffef0 !important;
  border: 1px solid rgba(160, 110, 20, .35) !important;
  color: #1a0800 !important;
  box-shadow: 0 4px 16px rgba(80, 40, 0, .15) !important
}

body.theme-light .ranking-table th {
  background: rgba(184, 134, 11, .15) !important;
  color: #5a2800 !important
}

body.theme-light .ranking-table td {
  color: #2c1810 !important;
  background: transparent !important
}

body.theme-light .ranking-table tr:nth-child(even) td {
  background: rgba(184, 134, 11, .05) !important
}

body.theme-light .rank-score {
  color: #b8860b !important
}

body.theme-light .rank-num {
  color: #6a3008 !important
}

body.theme-light .enemy-card {
  background: rgba(255, 252, 235, .85) !important;
  border-color: rgba(160, 110, 20, .2) !important
}

body.theme-light .enemy-card:hover {
  border-color: #b8860b !important
}

body.theme-light .enemy-name {
  color: #2c1810 !important
}

body.theme-light .enemy-level {
  color: #7a4010 !important
}

body.theme-light .diff-easy {
  background: rgba(0, 120, 50, .1) !important;
  border-color: rgba(0, 120, 50, .3) !important;
  color: #004422 !important
}

body.theme-light .diff-medium {
  background: rgba(160, 100, 0, .1) !important;
  border-color: rgba(160, 100, 0, .3) !important;
  color: #6a3800 !important
}

body.theme-light .diff-hard {
  background: rgba(160, 50, 0, .1) !important;
  border-color: rgba(160, 50, 0, .3) !important;
  color: #7a1800 !important
}

body.theme-light .diff-epic {
  background: rgba(80, 0, 140, .1) !important;
  border-color: rgba(80, 0, 140, .3) !important;
  color: #440068 !important
}

body.theme-light .diff-legendary {
  background: rgba(150, 0, 30, .1) !important;
  border-color: rgba(150, 0, 30, .3) !important;
  color: #660010 !important
}

body.theme-light .ornament {
  color: #b8860b !important
}

body.theme-light .ornament::before,
body.theme-light .ornament::after {
  background: linear-gradient(90deg, transparent, #b8860b, transparent) !important
}

body.theme-light .divider {
  border-color: rgba(160, 110, 20, .2) !important
}

body.theme-light .profile-hero {
  background: linear-gradient(135deg, #fffcee, #f5e8c0) !important;
  border-bottom: 2px solid rgba(160, 110, 20, .25) !important
}

body.theme-light .profile-hero-name {
  color: #b8860b !important;
  text-shadow: none !important
}

body.theme-light .profile-hero-title {
  color: #7a4010 !important
}

body.theme-light .profile-hero-castle {
  color: #5a2800 !important
}

body.theme-light .profile-hero-badge.win {
  background: rgba(0, 120, 50, .1) !important;
  color: #004422 !important;
  border-color: rgba(0, 120, 50, .3) !important
}

body.theme-light .profile-hero-badge.lose {
  background: rgba(160, 20, 20, .1) !important;
  color: #880000 !important;
  border-color: rgba(160, 20, 20, .3) !important
}

body.theme-light .profile-hero-badge.streak {
  background: rgba(160, 90, 0, .1) !important;
  color: #7a3800 !important;
  border-color: rgba(160, 90, 0, .3) !important
}

body.theme-light .profile-stat-item {
  background: rgba(184, 134, 11, .08) !important;
  border-color: rgba(160, 110, 20, .18) !important
}

body.theme-light .profile-stat-val {
  color: #b8860b !important
}

body.theme-light .profile-stat-label {
  color: #7a4010 !important
}

body.theme-light .theme-btn {
  background: rgba(160, 110, 20, .06) !important;
  border-color: rgba(160, 110, 20, .22) !important
}

body.theme-light .theme-btn.active {
  background: rgba(184, 134, 11, .16) !important;
  border-color: #b8860b !important;
  box-shadow: 0 0 10px rgba(184, 134, 11, .15) !important
}

body.theme-light .theme-btn-label {
  color: #6a3008 !important
}

body.theme-light .theme-btn.active .theme-btn-label {
  color: #b8860b !important
}

body.theme-light .ad-card.ad-ready {
  background: rgba(184, 134, 11, .07) !important;
  border-color: rgba(160, 110, 20, .3) !important
}

body.theme-light .ad-card.ad-cooldown {
  background: rgba(0, 0, 0, .03) !important;
  border-color: rgba(160, 110, 20, .1) !important
}

body.theme-light .ad-card-label {
  color: #2c1810 !important
}

body.theme-light .ad-card-desc {
  color: #7a4010 !important
}

body.theme-light .ad-cooldown-timer {
  color: #8a5010 !important
}

body.theme-light .mission-card {
  background: rgba(255, 252, 235, .8) !important;
  border-color: rgba(160, 110, 20, .2) !important
}

body.theme-light .mission-card.done {
  background: rgba(0, 120, 50, .06) !important;
  border-color: rgba(0, 120, 50, .25) !important
}

body.theme-light .mission-label {
  color: #2c1810 !important
}

body.theme-light .mission-reward {
  color: #7a4010 !important
}

body.theme-light .streak-display {
  background: rgba(184, 134, 11, .1) !important;
  border-color: rgba(160, 110, 20, .3) !important
}

body.theme-light .streak-count {
  color: #b8860b !important
}

body.theme-light .streak-label {
  color: #7a4010 !important
}

body.theme-light .game-title {
  background: linear-gradient(180deg, #8a5000 0%, #b8860b 40%, #7a3800 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important
}

body.theme-light .game-subtitle {
  color: #8a5010 !important
}

body.theme-light .title-badge {
  background: rgba(184, 134, 11, .15) !important;
  border-color: rgba(160, 110, 20, .4) !important;
  color: #b8860b !important
}

body.theme-light::-webkit-scrollbar-track {
  background: #f5e8c8 !important
}

body.theme-light::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #b8860b, #7a5008) !important
}

body.theme-neon,
body.theme-neon * {
  color: #c0fff0
}

body.theme-neon {
  background: #000010 !important;
  background-image: radial-gradient(ellipse 80% 60% at 20% 30%, rgba(0, 255, 150, .08) 0%, transparent 60%), radial-gradient(ellipse 60% 70% at 80% 70%, rgba(0, 200, 255, .06) 0%, transparent 60%) !important;
  background-attachment: fixed !important
}

body.theme-neon .panel {
  background: linear-gradient(160deg, rgba(0, 18, 12, .97), rgba(0, 10, 6, .99)) !important;
  border: 1px solid rgba(0, 255, 150, .18) !important;
  box-shadow: 0 4px 20px rgba(0, 255, 150, .04), 0 0 0 1px rgba(0, 255, 150, .08) !important
}

body.theme-neon .panel-title {
  color: #00ffaa !important;
  text-shadow: 0 0 10px rgba(0, 255, 170, .4) !important
}

body.theme-neon .top-bar {
  background: linear-gradient(90deg, rgba(0, 18, 12, .97), rgba(0, 10, 6, .97)) !important;
  border-bottom: 1px solid rgba(0, 255, 150, .18) !important
}

body.theme-neon .top-bar-title {
  color: #00ffaa !important;
  text-shadow: 0 0 8px rgba(0, 255, 170, .4) !important
}

body.theme-neon .top-stat {
  color: #80ffcc !important
}

body.theme-neon .top-stat-val {
  color: #00ffaa !important
}

body.theme-neon .question-card {
  background: linear-gradient(160deg, rgba(0, 18, 12, .98), rgba(0, 10, 6, .99)) !important;
  border: 1px solid rgba(0, 255, 150, .14) !important
}

body.theme-neon .question-text {
  color: #e0fff8 !important;
  text-shadow: none !important
}

body.theme-neon .question-number {
  color: #00ffaa !important
}

body.theme-neon .category-badge {
  background: rgba(0, 255, 150, .1) !important;
  border-color: rgba(0, 255, 150, .3) !important;
  color: #00ffaa !important
}

body.theme-neon .timer-display {
  color: #00ffaa !important;
  text-shadow: 0 0 12px rgba(0, 255, 170, .6) !important;
  border-color: rgba(0, 255, 150, .3) !important;
  background: rgba(0, 255, 150, .06) !important
}

body.theme-neon .timer-display.urgent {
  color: #ff2244 !important;
  text-shadow: 0 0 15px rgba(255, 34, 68, .8) !important;
  border-color: rgba(255, 34, 68, .4) !important;
  background: rgba(255, 34, 68, .06) !important
}

body.theme-neon .option-btn {
  background: linear-gradient(135deg, rgba(0, 18, 12, .88), rgba(0, 10, 6, .92)) !important;
  border: 1px solid rgba(0, 255, 150, .18) !important;
  color: #c0fff0 !important;
  text-shadow: none !important
}

body.theme-neon .option-btn:hover:not(:disabled) {
  background: rgba(0, 255, 150, .1) !important;
  border-color: #00ffaa !important;
  color: #00ffaa !important;
  box-shadow: 0 0 15px rgba(0, 255, 150, .2) !important;
  transform: translateY(-2px) !important
}

body.theme-neon .option-btn.correct {
  border-color: #00ffaa !important;
  color: #00ffaa !important;
  background: rgba(0, 255, 150, .1) !important
}

body.theme-neon .option-btn.wrong {
  border-color: #ff2244 !important;
  color: #ff6688 !important;
  background: rgba(255, 34, 68, .08) !important
}

body.theme-neon .btn {
  background: rgba(0, 18, 12, .8) !important;
  border: 1px solid rgba(0, 255, 150, .2) !important;
  color: #c0fff0 !important;
  text-shadow: none !important
}

body.theme-neon .btn:hover:not(:disabled) {
  border-color: #00ffaa !important;
  background: rgba(0, 255, 150, .1) !important;
  color: #00ffaa !important
}

body.theme-neon .btn-gold {
  background: linear-gradient(135deg, #00ffaa, #00cc88) !important;
  color: #000c08 !important;
  border: none !important;
  text-shadow: none !important;
  box-shadow: 0 3px 14px rgba(0, 255, 150, .4) !important
}

body.theme-neon .btn-gold:hover {
  background: linear-gradient(135deg, #44ffcc, #00ffaa) !important;
  box-shadow: 0 5px 22px rgba(0, 255, 150, .55) !important;
  color: #000c08 !important
}

body.theme-neon .input-field {
  background: rgba(0, 18, 12, .82) !important;
  border: 1px solid rgba(0, 255, 150, .22) !important;
  color: #e0fff8 !important;
  text-shadow: none !important
}

body.theme-neon .input-field:focus {
  border-color: #00ffaa !important;
  box-shadow: 0 0 0 2px rgba(0, 255, 150, .2) !important
}

body.theme-neon .input-field::placeholder {
  color: rgba(0, 200, 120, .4) !important
}

body.theme-neon .input-label {
  color: #00ffaa !important;
  text-shadow: none !important
}

body.theme-neon .hp-fill {
  background: linear-gradient(90deg, #00aa55, #00ffaa) !important;
  box-shadow: 0 0 8px rgba(0, 255, 150, .4) !important
}

body.theme-neon .hp-fill.mid {
  background: linear-gradient(90deg, #aaaa00, #ddff00) !important
}

body.theme-neon .hp-fill.low {
  background: linear-gradient(90deg, #880000, #ff2244) !important
}

body.theme-neon .xp-fill {
  background: linear-gradient(90deg, #0055ff, #00aaff) !important;
  box-shadow: 0 0 6px rgba(0, 150, 255, .4) !important
}

body.theme-neon .hp-label {
  color: #80ffcc !important
}

body.theme-neon .siege-arena {
  background: linear-gradient(135deg, #000c08, #000e0a) !important;
  border-color: rgba(0, 255, 150, .15) !important
}

body.theme-neon .siege-label {
  color: #00ffaa !important;
  text-shadow: 0 0 8px rgba(0, 255, 150, .3) !important
}

body.theme-neon .modal {
  background: linear-gradient(160deg, rgba(0, 18, 12, .99), rgba(0, 10, 6, .99)) !important;
  border: 1px solid rgba(0, 255, 150, .3) !important
}

body.theme-neon .modal-title {
  color: #00ffaa !important;
  text-shadow: 0 0 15px rgba(0, 255, 150, .5) !important
}

body.theme-neon .modal-title.victory {
  color: #00ffaa !important
}

body.theme-neon .modal-title.defeat {
  color: #ff2244 !important
}

body.theme-neon .modal-body {
  color: #c0fff0 !important
}

body.theme-neon .notif {
  background: rgba(0, 18, 12, .97) !important;
  border: 1px solid rgba(0, 255, 150, .3) !important;
  color: #e0fff8 !important
}

body.theme-neon .ranking-table th {
  background: rgba(0, 255, 150, .1) !important;
  color: #00ffaa !important
}

body.theme-neon .ranking-table td {
  color: #c0fff0 !important
}

body.theme-neon .rank-score {
  color: #00ffaa !important
}

body.theme-neon .ornament {
  color: #00ffaa !important
}

body.theme-neon .ornament::before,
body.theme-neon .ornament::after {
  background: linear-gradient(90deg, transparent, #00ffaa, transparent) !important
}

body.theme-neon .game-title {
  background: linear-gradient(180deg, #ffffff 0%, #00ffaa 45%, #008855 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important
}

body.theme-neon .game-subtitle {
  color: #00cc88 !important
}

body.theme-neon .profile-hero {
  background: linear-gradient(135deg, rgba(0, 18, 12, .99), rgba(0, 10, 6, .99)) !important
}

body.theme-neon .profile-hero-name {
  color: #00ffaa !important;
  text-shadow: 0 0 15px rgba(0, 255, 170, .4) !important
}

body.theme-neon .profile-stat-val {
  color: #00ffaa !important
}

body.theme-neon .theme-btn {
  background: rgba(0, 18, 12, .7) !important;
  border-color: rgba(0, 255, 150, .18) !important
}

body.theme-neon .theme-btn.active {
  background: rgba(0, 255, 150, .1) !important;
  border-color: #00ffaa !important
}

body.theme-neon .theme-btn-label {
  color: #80ffcc !important
}

body.theme-neon .theme-btn.active .theme-btn-label {
  color: #00ffaa !important
}

body.theme-neon .diff-easy {
  background: rgba(0, 255, 150, .1) !important;
  color: #00ffaa !important;
  border-color: rgba(0, 255, 150, .3) !important
}

body.theme-neon .diff-medium {
  background: rgba(200, 255, 0, .08) !important;
  color: #ccff44 !important;
  border-color: rgba(200, 255, 0, .25) !important
}

body.theme-neon .diff-hard {
  background: rgba(255, 150, 0, .08) !important;
  color: #ffaa44 !important;
  border-color: rgba(255, 150, 0, .25) !important
}

body.theme-neon .diff-epic {
  background: rgba(0, 200, 255, .08) !important;
  color: #44eeff !important;
  border-color: rgba(0, 200, 255, .25) !important
}

body.theme-neon .diff-legendary {
  background: rgba(255, 0, 100, .08) !important;
  color: #ff4488 !important;
  border-color: rgba(255, 0, 100, .25) !important
}

body.theme-neon::-webkit-scrollbar-track {
  background: #000c08 !important
}

body.theme-neon::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00ffaa, #00aa77) !important
}

.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 4px 0
}

.ad-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 4px;
  text-align: center;
  transition: all .2s
}

.ad-card.ad-ready {
  background: rgba(255, 224, 0, .07);
  border: 1px solid rgba(255, 224, 0, .3);
  animation: ad-ready-pulse 2s ease-in-out infinite
}

@keyframes ad-ready-pulse {

  0%,
  100% {
    box-shadow: none
  }

  50% {
    box-shadow: 0 0 15px rgba(255, 224, 0, .15)
  }
}

.ad-card.ad-cooldown {
  background: rgba(0, 0, 0, .2);
  border: 1px solid rgba(255, 255, 255, .08);
  opacity: .6
}

.ad-card-icon {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4))
}

.ad-card-label {
  font-family: 'Oswald', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  color: #fff
}

.ad-card-desc {
  font-family: 'Cinzel', serif;
  font-size: .62rem;
  color: var(--muted);
  line-height: 1.4
}

.ad-watch-btn {
  font-size: .68rem !important;
  padding: 6px 10px !important;
  width: 100%
}

.ad-cooldown-timer {
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  color: var(--muted)
}

.ad-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, .92);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center
}

.ad-overlay.active {
  display: flex
}

.ad-overlay-modal {
  background: linear-gradient(160deg, rgba(30, 15, 60, .99), rgba(10, 5, 20, .99));
  border: 2px solid rgba(255, 224, 0, .35);
  border-radius: 6px;
  padding: 32px 28px;
  max-width: 340px;
  width: 92%;
  text-align: center;
  animation: modal-in .3s ease-out;
  box-shadow: 0 0 50px rgba(255, 224, 0, .1)
}

.ad-overlay-badge {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .2em;
  background: rgba(255, 224, 0, .15);
  color: #ffe000;
  border: 1px solid rgba(255, 224, 0, .3);
  padding: 3px 12px;
  border-radius: 10px;
  margin-bottom: 20px
}

.ad-overlay-icon {
  font-size: 3.5rem;
  margin-bottom: 12px
}

.ad-overlay-text {
  font-family: 'Cinzel Decorative', cursive;
  font-size: .95rem;
  color: #fff;
  margin-bottom: 6px
}

.ad-overlay-sub {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  color: var(--muted2);
  margin-bottom: 20px
}

.ad-overlay-progress-wrap {
  height: 6px;
  background: rgba(255, 255, 255, .1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px
}

.ad-overlay-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ffe000, #ff8800);
  border-radius: 3px;
  transition: width 1s linear;
  box-shadow: 0 0 8px rgba(255, 224, 0, .5)
}

.ad-overlay-timer {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  color: var(--muted)
}

@media (max-width:480px) {
  .profile-hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center
  }

  .profile-hero-badges {
    justify-content: center
  }

  .ads-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .theme-selector {
    gap: 5px
  }
}

.battle-arena {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  align-items: center;
  gap: 0;
  min-height: 180px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, rgba(4, 2, 12, .95) 0%, rgba(8, 4, 18, .98) 60%, rgba(15, 8, 25, 1) 100%);
  border: 1px solid rgba(255, 224, 0, .15);
  border-radius: 4px;
  overflow: hidden
}

.arena-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none
}

.arena-ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .4))
}

.arena-particle {
  position: absolute;
  font-size: .6rem;
  opacity: .3;
  animation: arena-float linear infinite
}

.ap1 {
  top: 15%;
  left: 10%;
  animation-duration: 8s;
  animation-delay: 0s
}

.ap2 {
  top: 30%;
  right: 15%;
  animation-duration: 10s;
  animation-delay: -3s
}

.ap3 {
  top: 10%;
  left: 40%;
  animation-duration: 7s;
  animation-delay: -1s
}

.ap4 {
  top: 45%;
  right: 30%;
  animation-duration: 9s;
  animation-delay: -5s
}

@keyframes arena-float {

  0%,
  100% {
    transform: translateY(0) rotate(0);
    opacity: .2
  }

  50% {
    transform: translateY(-15px) rotate(180deg);
    opacity: .5
  }
}

.arena-fighter {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px 10px
}

.fighter-name {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted2);
  letter-spacing: .08em;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%
}

.fighter-sprite {
  font-size: 3.4rem;
  line-height: 1;
  z-index: 1;
  animation: fighter-idle 2.5s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .6));
  cursor: default;
  user-select: none
}

.enemy-sprite {
  font-size: 3.8rem;
  animation: fighter-idle 2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px currentColor)
}

@keyframes fighter-idle {

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

  50% {
    transform: translateY(-6px) scale(1.04)
  }
}

@keyframes fighter-attack {
  0% {
    transform: translateX(0) scale(1)
  }

  30% {
    transform: translateX(20px) scale(1.2)
  }

  60% {
    transform: translateX(-5px) scale(.95)
  }

  100% {
    transform: translateX(0) scale(1)
  }
}

@keyframes fighter-attack-enemy {
  0% {
    transform: translateX(0) scale(1)
  }

  30% {
    transform: translateX(-20px) scale(1.2)
  }

  60% {
    transform: translateX(5px) scale(.95)
  }

  100% {
    transform: translateX(0) scale(1)
  }
}

@keyframes enemy-defeated {
  0% {
    transform: translateY(0) rotate(0) scale(1);
    opacity: 1;
    filter: grayscale(0)
  }

  30% {
    transform: translateY(-10px) rotate(-15deg) scale(1.1)
  }

  60% {
    transform: translateY(0) rotate(10deg) scale(.9);
    filter: grayscale(.8)
  }

  100% {
    transform: translateY(20px) rotate(0) scale(.7);
    opacity: .3;
    filter: grayscale(1) brightness(.4)
  }
}

.shake-hit {
  animation: shake-damage .35s ease-out !important
}

@keyframes shake-damage {

  0%,
  100% {
    transform: translateX(0)
  }

  20% {
    transform: translateX(-10px)
  }

  40% {
    transform: translateX(12px)
  }

  60% {
    transform: translateX(-8px)
  }

  80% {
    transform: translateX(6px)
  }
}

.fighter-aura {
  position: absolute;
  width: 130%;
  height: 130%;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  pointer-events: none;
  z-index: 0;
  animation: aura-pulse 3s ease-in-out infinite
}

@keyframes aura-pulse {

  0%,
  100% {
    transform: translate(-50%, -45%) scale(1);
    opacity: .7
  }

  50% {
    transform: translate(-50%, -45%) scale(1.12);
    opacity: 1
  }
}

.enemy-damage-state {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 1rem;
  z-index: 3;
  animation: damage-state-pulse 1s ease-in-out infinite
}

@keyframes damage-state-pulse {

  0%,
  100% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.2)
  }
}

.enemy-healthy .enemy-sprite {
  filter: drop-shadow(0 0 15px currentColor)
}

.enemy-damaged .enemy-sprite {
  filter: drop-shadow(0 0 20px rgba(255, 100, 0, .8)) sepia(.4) !important;
  animation: fighter-idle 1.5s ease-in-out infinite, enemy-hurt-shake 2s ease-in-out infinite !important
}

.enemy-critical .enemy-sprite {
  filter: drop-shadow(0 0 25px rgba(255, 0, 0, .9)) sepia(.7) !important;
  animation: fighter-idle 1s ease-in-out infinite, enemy-hurt-shake 1s ease-in-out infinite !important
}

@keyframes enemy-hurt-shake {

  0%,
  90%,
  100% {
    transform: translateY(-6px) rotate(0) scale(1.04)
  }

  92% {
    transform: translateY(-4px) rotate(-3deg) scale(1.02)
  }

  96% {
    transform: translateY(-8px) rotate(2deg) scale(1.05)
  }
}

.fighter-hp-wrap {
  width: 100%
}

.fighter-hp-bar {
  height: 8px;
  background: rgba(255, 255, 255, .1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 3px
}

.fighter-hp-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: var(--muted2);
  font-weight: 700
}

.arena-center {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%
}

.arena-vs {
  font-size: 1.5rem !important;
  z-index: 1;
  text-shadow: 0 0 20px rgba(255, 34, 68, .8)
}

.battle-projectile {
  position: absolute;
  font-size: 1.6rem;
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(255, 224, 0, .6))
}

.player-proj {
  left: 10%
}

.enemy-proj {
  right: 10%
}

.impact-burst {
  position: absolute;
  font-size: 2rem;
  z-index: 11;
  pointer-events: none
}

@keyframes impact-pop {
  0% {
    transform: scale(.3);
    opacity: 1
  }

  50% {
    transform: scale(1.8);
    opacity: .8
  }

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

.battle-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: result-overlay-in .5s cubic-bezier(.2, .8, .3, 1) forwards
}

@keyframes result-overlay-in {
  0% {
    opacity: 0;
    transform: scale(.9)
  }

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

.victory-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 200, 0, .25) 0%, rgba(10, 5, 30, .97) 65%)
}

.defeat-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(200, 0, 30, .2) 0%, rgba(5, 2, 10, .97) 65%)
}

.result-overlay-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 30px;
  max-width: 420px;
  width: 94%;
  text-align: center
}

.result-stars {
  display: flex;
  gap: 12px;
  justify-content: center
}

.rstar {
  font-size: 2.5rem;
  animation: star-pop .5s cubic-bezier(.2, .8, .3, 1.3) both;
  filter: drop-shadow(0 0 15px rgba(255, 220, 0, .7))
}

.rstar.s1 {
  animation-delay: .1s;
  font-size: 2rem
}

.rstar.s2 {
  animation-delay: .25s;
  font-size: 3rem
}

.rstar.s3 {
  animation-delay: .4s;
  font-size: 2rem
}

@keyframes star-pop {
  0% {
    transform: scale(0) rotate(-30deg);
    opacity: 0
  }

  80% {
    transform: scale(1.2) rotate(5deg)
  }

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

.result-trophy {
  font-size: 5rem;
  filter: drop-shadow(0 0 30px rgba(255, 215, 0, .7));
  animation: trophy-bounce .6s cubic-bezier(.2, .8, .3, 1.4) .3s both
}

@keyframes trophy-bounce {
  0% {
    transform: scale(0) translateY(40px);
    opacity: 0
  }

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

.result-skull {
  font-size: 5rem;
  filter: drop-shadow(0 0 25px rgba(200, 0, 30, .6));
  animation: skull-drop .6s cubic-bezier(.4, 0, .2, 1) .2s both
}

@keyframes skull-drop {
  0% {
    transform: translateY(-60px) rotate(-20deg);
    opacity: 0
  }

  60% {
    transform: translateY(10px) rotate(5deg)
  }

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

.result-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 2.2rem;
  font-weight: 900;
  animation: title-reveal .5s ease-out .5s both
}

.victory-title {
  color: #ffd700;
  text-shadow: 0 0 30px rgba(255, 215, 0, .7), 0 4px 12px rgba(0, 0, 0, .8)
}

.defeat-title {
  color: #ff2244;
  text-shadow: 0 0 25px rgba(255, 34, 68, .6), 0 4px 12px rgba(0, 0, 0, .8)
}

@keyframes title-reveal {
  0% {
    opacity: 0;
    transform: translateY(20px)
  }

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

.result-subtitle {
  font-family: 'Cinzel', serif;
  font-size: .9rem;
  color: var(--muted2);
  animation: title-reveal .4s ease-out .7s both
}

.result-tip {
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  color: var(--muted);
  animation: title-reveal .4s ease-out .9s both;
  font-style: italic
}

.result-rewards {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  animation: title-reveal .4s ease-out .8s both
}

.result-reward-item {
  font-family: 'Cinzel', serif;
  font-size: .88rem;
  background: rgba(255, 224, 0, .1);
  border: 1px solid rgba(255, 224, 0, .3);
  padding: 6px 14px;
  border-radius: 20px;
  color: #ffe000
}

.result-reward-item strong {
  font-size: 1rem
}

.levelup-reward {
  background: rgba(255, 100, 0, .15) !important;
  border-color: rgba(255, 100, 0, .4) !important;
  color: #ffaa44 !important;
  animation: pulse-glow 1s infinite !important
}

.result-continue-btn {
  animation: title-reveal .4s ease-out 1s both;
  min-width: 160px
}

.result-retry-btn {
  animation: title-reveal .4s ease-out 1.1s both
}

.confetti-piece {
  position: absolute;
  top: -20px;
  z-index: 0;
  animation: confetti-fall linear both;
  pointer-events: none
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0) scale(1);
    opacity: 1
  }

  80% {
    opacity: .8
  }

  100% {
    transform: translateY(110vh) rotate(720deg) scale(.3);
    opacity: 0
  }
}

@media (max-width:480px) {
  .battle-arena {
    grid-template-columns: 1fr 50px 1fr;
    min-height: 150px
  }

  .fighter-sprite {
    font-size: 2.4rem !important
  }

  .result-title {
    font-size: 1.6rem !important
  }

  .result-trophy,
  .result-skull {
    font-size: 3.5rem !important
  }
}

.skill-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(5, 3, 15, .97), rgba(8, 4, 20, .99));
  border: 1px solid rgba(255, 224, 0, .2);
  border-radius: 4px;
  overflow-x: auto;
  flex-wrap: nowrap
}

.skill-bar-label {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  font-weight: 800;
  color: rgba(255, 224, 0, .7);
  letter-spacing: .15em;
  white-space: nowrap;
  flex-shrink: 0
}

.skill-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .2s;
  padding: 4px
}

.skill-slot:hover:not(.skill-disabled) {
  transform: translateY(-4px)
}

.skill-frame {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--sk-color, rgba(255, 224, 0, .5));
  background: var(--sk-bg, rgba(255, 224, 0, .1));
  box-shadow: 0 0 10px var(--sk-glow, rgba(255, 224, 0, .3)), inset 0 0 8px rgba(0, 0, 0, .6);
  transition: all .2s
}

.skill-slot:hover:not(.skill-disabled) .skill-frame {
  box-shadow: 0 0 20px var(--sk-glow, rgba(255, 224, 0, .5)), inset 0 0 12px rgba(0, 0, 0, .4)
}

.skill-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: crisp-edges
}

.skill-cd-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 8px rgba(0, 0, 0, .8)
}

.skill-name-tag {
  font-family: 'Cinzel', serif;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  text-align: center;
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis
}

.skill-mult-tag {
  font-family: 'Oswald', sans-serif;
  font-size: .78rem;
  font-weight: 900;
  color: rgba(255, 255, 255, .7);
  line-height: 1
}

.skill-active .skill-frame {
  border-color: var(--sk-color, #ffe000) !important;
  box-shadow: 0 0 25px var(--sk-glow, rgba(255, 224, 0, .6)), 0 0 50px var(--sk-glow, rgba(255, 224, 0, .3)), inset 0 0 15px rgba(255, 224, 0, .1) !important;
  animation: skill-active-pulse 1s ease-in-out infinite
}

@keyframes skill-active-pulse {

  0%,
  100% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.06)
  }
}

.skill-disabled {
  opacity: .4;
  cursor: not-allowed
}

.skill-disabled .skill-frame {
  filter: grayscale(1) brightness(.6)
}

.skill-hit-flash {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 600;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: skill-hit-anim .9s ease-out forwards;
  text-align: center
}

.skill-hit-icon {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  border: 3px solid var(--sk-border, rgba(255, 224, 0, .8));
  box-shadow: 0 0 40px var(--sk-glow, rgba(255, 224, 0, .6));
  image-rendering: crisp-edges
}

.skill-hit-name {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.1rem;
  font-weight: 900;
  text-shadow: 0 0 20px currentColor, 0 2px 8px rgba(0, 0, 0, .8);
  letter-spacing: .1em
}

.skill-hit-mult {
  font-family: 'Oswald', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  text-shadow: 0 0 25px currentColor
}

@keyframes skill-hit-anim {
  0% {
    transform: translate(-50%, -50%) scale(.4);
    opacity: 0
  }

  25% {
    transform: translate(-50%, -55%) scale(1.2);
    opacity: 1
  }

  60% {
    transform: translate(-50%, -58%) scale(1);
    opacity: 1
  }

  100% {
    transform: translate(-50%, -70%) scale(.8);
    opacity: 0
  }
}

.question-card.skill-buffed {
  animation: skill-card-glow 1s ease-in-out infinite
}

@keyframes skill-card-glow {

  0%,
  100% {
    box-shadow: none
  }

  50% {
    box-shadow: 0 0 30px var(--sk-glow, rgba(255, 224, 0, .4))
  }
}

@media (max-width:480px) {
  .skill-frame {
    width: 44px;
    height: 44px
  }

  .skill-name-tag {
    font-size: .5rem;
    max-width: 48px
  }

  .skill-bar {
    padding: 8px 10px;
    gap: 6px
  }
}

.arena-vs {
  font-family: 'Oswald', sans-serif !important;
  font-size: 1.8rem !important;
  font-weight: 900 !important;
  color: #ff2244 !important;
  text-shadow: 0 0 20px rgba(255, 34, 68, .7), 0 2px 8px rgba(0, 0, 0, .9) !important;
  background: rgba(255, 34, 68, .1) !important;
  border: 2px solid rgba(255, 34, 68, .4) !important;
  border-radius: 50% !important;
  width: 52px !important;
  height: 52px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  animation: vs-pulse 1.5s ease-in-out infinite !important;
  letter-spacing: 0 !important
}

@keyframes vs-pulse {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(255, 34, 68, .3)
  }

  50% {
    box-shadow: 0 0 25px rgba(255, 34, 68, .6)
  }
}

.skill-bar {
  flex-wrap: wrap !important
}

.skill-bar[style*="display:none"] {
  display: none !important
}

.skill-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px
}

.skill-shop-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 6px;
  background: var(--sk-bg, rgba(255, 224, 0, .08));
  border: 1px solid var(--sk-color, rgba(255, 224, 0, .3));
  box-shadow: 0 0 12px var(--sk-glow, rgba(255, 224, 0, .1));
  transition: all .2s
}

.skill-shop-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--sk-glow, rgba(255, 224, 0, .2))
}

.skill-shop-frame {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--sk-color);
  align-self: center;
  box-shadow: 0 0 15px var(--sk-glow)
}

.skill-rarity-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-family: 'Oswald', sans-serif;
  font-size: .5rem;
  font-weight: 900;
  text-align: center;
  background: rgba(0, 0, 0, .7);
  letter-spacing: .1em;
  padding: 1px 0
}

.skill-shop-info {
  flex: 1
}

.skill-shop-name {
  font-family: 'Cinzel', serif;
  font-size: .9rem;
  font-weight: 800;
  margin-bottom: 4px
}

.skill-shop-desc {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: var(--muted2);
  line-height: 1.5;
  margin-bottom: 4px
}

.skill-shop-mult {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: var(--muted)
}

.skill-buy-btn {
  width: 100% !important;
  font-size: .82rem !important;
  padding: 8px !important;
  font-weight: 800 !important
}

.btn-disabled {
  background: rgba(100, 100, 100, .2) !important;
  border-color: rgba(100, 100, 100, .3) !important;
  color: rgba(200, 200, 200, .4) !important;
  cursor: not-allowed !important
}

.skill-owned-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0
}

.skill-owned-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 6px;
  width: 80px;
  background: var(--sk-bg);
  border: 1px solid var(--sk-color)
}

.skill-owned-icon {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover
}

.skill-owned-name {
  font-family: 'Cinzel', serif;
  font-size: .58rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.3
}

.skill-owned-mult {
  font-family: 'Oswald', sans-serif;
  font-size: .8rem;
  font-weight: 900;
  color: rgba(255, 255, 255, .6)
}

@keyframes enemy-stagger {
  0% {
    transform: translateY(0) rotate(0) scale(1)
  }

  20% {
    transform: translateY(-8px) rotate(-12deg) scale(1.05);
    filter: brightness(2) saturate(0)
  }

  50% {
    transform: translateY(4px) rotate(8deg) scale(.95)
  }

  70% {
    transform: translateY(-4px) rotate(-5deg) scale(1)
  }

  100% {
    transform: translateY(0) rotate(0) scale(1);
    filter: grayscale(.5) brightness(.7)
  }
}

@keyframes enemy-fall-dead {
  0% {
    transform: translateY(0) rotate(0) scale(1);
    opacity: 1;
    filter: grayscale(.5)
  }

  30% {
    transform: translateY(-12px) rotate(-20deg) scale(1.1);
    filter: brightness(3) saturate(0)
  }

  60% {
    transform: translateY(10px) rotate(45deg) scale(.9);
    opacity: .8
  }

  80% {
    transform: translateY(20px) rotate(80deg) scale(.7);
    opacity: .5;
    filter: grayscale(1) brightness(.3)
  }

  100% {
    transform: translateY(35px) rotate(90deg) scale(.5);
    opacity: 0;
    filter: grayscale(1) brightness(.2)
  }
}

@keyframes enemy-victory-taunt {

  0%,
  100% {
    transform: translateY(0) scale(1) rotate(0);
    filter: drop-shadow(0 0 20px rgba(255, 100, 0, .8))
  }

  25% {
    transform: translateY(-15px) scale(1.15) rotate(-5deg)
  }

  50% {
    transform: translateY(-8px) scale(1.08) rotate(5deg)
  }

  75% {
    transform: translateY(-12px) scale(1.12) rotate(-3deg)
  }
}

@keyframes player-kneel {
  0% {
    transform: translateY(0) rotate(0) scale(1);
    filter: none
  }

  20% {
    transform: translateY(-6px) rotate(5deg) scale(1.05);
    filter: brightness(2) saturate(0)
  }

  45% {
    transform: translateY(5px) rotate(-10deg) scale(.95)
  }

  65% {
    transform: translateY(8px) rotate(-20deg) scale(.85);
    filter: grayscale(.6) brightness(.6)
  }

  80% {
    transform: translateY(12px) rotate(-30deg) scale(.75)
  }

  100% {
    transform: translateY(18px) rotate(-45deg) scale(.65);
    filter: grayscale(.9) brightness(.4);
    opacity: .6
  }
}

@keyframes player-victory-dance {

  0%,
  100% {
    transform: translateY(0) scale(1) rotate(0)
  }

  20% {
    transform: translateY(-18px) scale(1.2) rotate(-8deg)
  }

  40% {
    transform: translateY(-10px) scale(1.1) rotate(6deg)
  }

  60% {
    transform: translateY(-16px) scale(1.15) rotate(-4deg)
  }

  80% {
    transform: translateY(-8px) scale(1.08) rotate(3deg)
  }
}

@keyframes fighter-victory-shake {

  0%,
  100% {
    transform: translateX(0)
  }

  25% {
    transform: translateX(-5px)
  }

  75% {
    transform: translateX(5px)
  }
}

@keyframes player-death-shake {

  0%,
  100% {
    transform: translateX(0) rotate(0)
  }

  20% {
    transform: translateX(-8px) rotate(-2deg)
  }

  40% {
    transform: translateX(10px) rotate(2deg)
  }

  60% {
    transform: translateX(-6px) rotate(-1deg)
  }

  80% {
    transform: translateX(6px) rotate(1deg)
  }
}

@keyframes battle-particle-burst {
  0% {
    transform: translate(0, 0) scale(0) rotate(0);
    opacity: 0
  }

  20% {
    opacity: 1
  }

  60% {
    transform: translate(var(--dx, 20px), var(--dy, -40px)) scale(1.2) rotate(180deg);
    opacity: .8
  }

  100% {
    transform: translate(var(--dx, 20px), var(--dy, -80px)) scale(.3) rotate(360deg);
    opacity: 0
  }
}

.battle-arena.defeat-shade {
  animation: arena-defeat-shade 1.5s ease-out forwards
}

@keyframes arena-defeat-shade {
  0% {
    filter: none
  }

  100% {
    filter: brightness(.4) saturate(.3) sepia(.5)
  }
}

.store-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 40px
}

.store-energy-panel {}

.energy-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0
}

.energy-hearts {
  display: flex;
  gap: 8px
}

.energy-full {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 8px rgba(255, 220, 0, .6))
}

.energy-empty {
  font-size: 1.6rem;
  filter: grayscale(1) brightness(.4)
}

.energy-timer {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  color: var(--muted2)
}

.energy-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.energy-actions .btn {
  flex: 1;
  min-width: 160px
}

.store-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid rgba(255, 224, 0, .2);
  padding-bottom: 0;
  margin-bottom: 0
}

.store-tab {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  font-weight: 700;
  padding: 10px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  transition: all .2s;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 4px 4px 0 0
}

.store-tab:hover {
  color: var(--muted2);
  background: rgba(255, 255, 255, .04)
}

.store-tab.active {
  color: #ffe000;
  border-bottom-color: #ffe000;
  background: rgba(255, 224, 0, .06)
}

.store-tab-content {
  padding-top: 12px
}

.gold-packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px
}

.gold-pkg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: 6px;
  text-align: center;
  background: linear-gradient(160deg, rgba(28, 18, 5, .97), rgba(15, 10, 2, .99));
  border: 1px solid rgba(255, 180, 0, .25);
  transition: all .2s
}

.gold-pkg-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 200, 0, .5);
  box-shadow: 0 8px 24px rgba(255, 180, 0, .15)
}

.gold-pkg-card.popular {
  border-color: rgba(255, 224, 0, .6) !important;
  box-shadow: 0 0 20px rgba(255, 224, 0, .15) !important;
  background: linear-gradient(160deg, rgba(40, 25, 5, .97), rgba(25, 15, 2, .99)) !important
}

.gold-pkg-card.vip-pkg {
  border-color: rgba(255, 215, 0, .5) !important
}

.gold-pkg-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Oswald', sans-serif;
  font-size: .62rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ffe000, #ff8800);
  color: #000;
  padding: 3px 12px;
  border-radius: 10px;
  letter-spacing: .15em;
  white-space: nowrap
}

.gold-pkg-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 10px rgba(255, 200, 0, .5))
}

.gold-pkg-amount {
  font-family: 'Oswald', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: #ffe000
}

.gold-pkg-bonus {
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  color: #00ff88;
  font-weight: 700;
  min-height: 1.2em
}

.gold-pkg-price {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 4px 0
}

.gold-pkg-card .btn {
  width: 100% !important;
  font-size: .82rem !important
}

.adsense-banner {
  margin-top: 14px;
  min-height: 90px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .03);
  border: 1px dashed rgba(255, 255, 255, .1);
  display: flex;
  align-items: center;
  justify-content: center
}

.adsense-placeholder {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  color: rgba(255, 255, 255, .2)
}

.vip-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 20px;
  text-align: center;
  background: linear-gradient(160deg, rgba(40, 30, 5, .98), rgba(20, 15, 2, .99));
  border: 2px solid rgba(255, 215, 0, .5);
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(255, 215, 0, .1)
}

.vip-crown {
  font-size: 4rem;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, .7));
  animation: castle-breathe 2s ease-in-out infinite
}

.vip-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.8rem;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, .5)
}

.vip-subtitle {
  font-family: 'Cinzel', serif;
  font-size: .85rem;
  color: var(--muted2)
}

.vip-benefits {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 320px
}

.vip-benefit {
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  color: #fff;
  background: rgba(255, 215, 0, .08);
  border: 1px solid rgba(255, 215, 0, .2);
  padding: 8px 16px;
  border-radius: 4px;
  text-align: left
}

.vip-price {
  font-family: 'Oswald', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 15px rgba(255, 215, 0, .5)
}

.vip-price span {
  font-size: .85rem;
  color: var(--muted2);
  font-weight: 400
}

.vip-buy-btn {
  width: 100% !important;
  max-width: 280px !important;
  font-size: 1rem !important;
  padding: 14px !important
}

.vip-owned {
  font-family: 'Cinzel', serif;
  font-size: .9rem;
  color: #00ff88;
  font-weight: 700
}

.mp-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0, 0, 0, .88);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px)
}

.mp-modal {
  background: linear-gradient(160deg, rgba(20, 12, 40, .99), rgba(10, 6, 20, .99));
  border: 2px solid rgba(255, 224, 0, .3);
  border-radius: 8px;
  padding: 32px 24px;
  max-width: 380px;
  width: 92%;
  text-align: center;
  animation: modal-in .3s ease-out
}

.mp-modal-logo {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.3rem;
  color: #00b1ea;
  margin-bottom: 8px
}

.mp-modal-title {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 4px
}

.mp-modal-price {
  font-family: 'Oswald', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffe000;
  margin-bottom: 12px
}

.mp-modal-info {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  color: var(--muted2);
  line-height: 1.6;
  margin-bottom: 16px
}

.mp-modal-btns {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.mp-modal-btns .btn {
  width: 100% !important
}

.energy-bar-map {
  display: flex;
  gap: 4px;
  align-items: center
}

.energy-bar-map span {
  font-size: 1rem
}

@media(max-width:480px) {
  .gold-packages-grid {
    grid-template-columns: 1fr 1fr
  }

  .vip-title {
    font-size: 1.3rem
  }

  .store-tab {
    padding: 8px 10px;
    font-size: .68rem
  }
}

.map-navbar {
  width: 100%;
  background: linear-gradient(180deg, rgba(18, 10, 38, .98) 0%, rgba(12, 6, 26, .99) 100%);
  border-bottom: 2px solid rgba(255, 224, 0, .2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .5);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0
}

.map-navbar-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(255, 224, 0, .08);
  flex-wrap: wrap;
  min-height: 52px
}

.map-navbar-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0
}

.map-navbar-castle-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 8px rgba(255, 224, 0, .4))
}

.map-navbar-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: .9rem;
  font-weight: 700;
  color: #ffe000;
  text-shadow: 0 0 12px rgba(255, 224, 0, .3);
  white-space: nowrap
}

.map-navbar-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1
}

.map-stat-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Cinzel', serif
}

.map-stat-chip span:first-child {
  font-size: .9rem
}

.map-stat-val {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff
}

.map-stat-label {
  font-size: .62rem;
  color: var(--muted);
  letter-spacing: .08em
}

.gold-chip .map-stat-val {
  color: #ffe000
}

.map-navbar-energy {
  display: flex;
  gap: 3px;
  align-items: center;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 12px;
  background: rgba(255, 224, 0, .06);
  border: 1px solid rgba(255, 224, 0, .15);
  transition: all .2s;
  flex-shrink: 0
}

.map-navbar-energy:hover {
  background: rgba(255, 224, 0, .12)
}

.map-navbar-utils {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0
}

.map-util-btn {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all .2s;
  color: var(--muted2);
  min-height: unset !important
}

.map-util-btn:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .2)
}

.map-navbar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  overflow-x: auto;
  flex-wrap: wrap;
  scrollbar-width: none
}

.map-navbar-nav::-webkit-scrollbar {
  display: none
}

.map-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 4px;
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  color: var(--muted2);
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  flex-shrink: 0;
  min-height: unset !important
}

.map-nav-btn:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
  transform: translateY(-1px)
}

.map-nav-btn.nav-gold {
  background: rgba(255, 224, 0, .1);
  border-color: rgba(255, 224, 0, .3);
  color: #ffe000
}

.map-nav-btn.nav-gold:hover {
  background: rgba(255, 224, 0, .18);
  border-color: rgba(255, 224, 0, .5);
  box-shadow: 0 0 12px rgba(255, 224, 0, .15)
}

@media (max-width:600px) {
  .map-navbar-top {
    padding: 8px 10px 6px;
    gap: 8px
  }

  .map-navbar-title {
    font-size: .75rem
  }

  .map-navbar-castle-icon {
    font-size: 1.3rem
  }

  .map-stat-label {
    display: none
  }

  .map-stat-val {
    font-size: .88rem
  }

  .map-navbar-nav {
    padding: 6px 8px;
    gap: 3px
  }

  .map-nav-btn {
    padding: 6px 10px;
    font-size: .65rem
  }

  .map-nav-btn span {
    display: none
  }

  .map-nav-btn {
    font-size: 1rem;
    padding: 7px 10px
  }
}

.game-footer {
  width: 100%;
  height: 44px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  background: rgba(8, 5, 18, .97);
  border-top: 1px solid rgba(255, 224, 0, .12);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .5)
}

.footer-inner {
  width: 100% !important;
  max-width: 900px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 8px !important
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px
}

.footer-copy {
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .06em
}

.footer-copy strong {
  color: var(--muted2)
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px
}

.footer-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  color: rgba(255, 224, 0, .45);
  letter-spacing: .06em;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
  padding: 0;
  min-height: unset !important
}

.footer-link:hover {
  color: rgba(255, 224, 0, .8)
}

.footer-sep {
  color: var(--muted);
  font-size: .6rem
}

@media (max-width:480px) {
  .footer-inner {
    justify-content: center;
    text-align: center
  }

  .footer-copy {
    font-size: .6rem
  }

  .footer-link {
    font-size: .6rem
  }
}

.terms-accept-wrap {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255, 224, 0, .05);
  border: 1px solid rgba(255, 224, 0, .2);
  border-radius: 4px
}

.terms-accept-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer
}

.terms-accept-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #ffe000;
  cursor: pointer
}

.terms-accept-label span {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: var(--muted2);
  line-height: 1.7
}

.terms-inline-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: rgba(255, 224, 0, .8);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  min-height: unset !important;
  transition: color .2s
}

.terms-inline-link:hover {
  color: #ffe000
}

.terms-accept-error {
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  color: #ff6666;
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(255, 50, 50, .08);
  border-radius: 3px;
  border: 1px solid rgba(255, 50, 50, .3)
}

.option-btn {
  -webkit-tap-highlight-color: rgba(255, 224, 0, .2);
  touch-action: manipulation;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none
}

.options-grid {
  pointer-events: auto !important
}

.question-card {
  pointer-events: auto !important
}

#screen-title.active {
  justify-content: center !important
}

#screen-login.active,
#screen-register.active {
  justify-content: center !important
}

#screen-profile.active {
  padding: 0 !important;
  align-items: stretch !important
}

#screen-profile .profile-hero {
  width: 100% !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  min-height: auto !important
}

#screen-profile .profile-layout {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 14px !important
}

.profile-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px
}

.profile-field-block {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.profile-theme-block {
  border-top: 1px solid rgba(255, 224, 0, .1);
  padding-top: 14px
}

@media (max-width:600px) {
  .profile-fields-grid {
    grid-template-columns: 1fr
  }
}

.map-rewards-panel {}

.map-ads-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px
}

.map-ad-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  transition: all .2s;
  border: 1px solid transparent;
  background: rgba(0, 0, 0, .2)
}

.map-ad-ready {
  border-color: rgba(255, 224, 0, .3);
  background: rgba(255, 224, 0, .07);
  animation: ad-map-pulse 2s ease-in-out infinite
}

@keyframes ad-map-pulse {

  0%,
  100% {
    box-shadow: none
  }

  50% {
    box-shadow: 0 0 10px rgba(255, 224, 0, .15)
  }
}

.map-ad-cd {
  border-color: rgba(255, 255, 255, .06);
  opacity: .5
}

.map-ad-icon {
  font-size: 1.4rem
}

.map-ad-label {
  font-family: 'Cinzel', serif;
  font-size: .58rem;
  font-weight: 700;
  color: var(--muted2);
  text-align: center
}

.map-ad-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 6px rgba(0, 255, 136, .6);
  animation: dot-blink 1.2s ease-in-out infinite
}

@keyframes dot-blink {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .3
  }
}

.map-ad-timer {
  font-family: 'Cinzel', serif;
  font-size: .52rem;
  color: var(--muted)
}

.skill-slot {
  position: relative;
  transition: transform .2s, opacity .3s
}

.skill-slot:not(.skill-disabled):hover .skill-frame {
  transform: scale(1.08);
  filter: brightness(1.2)
}

.skill-slot:not(.skill-disabled):hover .skill-name-tag {
  opacity: 1
}

.skill-slot:not(.skill-disabled):hover {
  filter: drop-shadow(0 0 8px var(--sk-glow, rgba(255, 224, 0, .4)))
}

.skill-slot:not(.skill-disabled):not(.skill-active) .skill-frame {
  animation: skill-ready-breathe 3s ease-in-out infinite
}

@keyframes skill-ready-breathe {

  0%,
  100% {
    box-shadow: 0 0 8px var(--sk-glow, rgba(255, 224, 0, .2))
  }

  50% {
    box-shadow: 0 0 18px var(--sk-glow, rgba(255, 224, 0, .45))
  }
}

.profile-hero {
  background: linear-gradient(135deg, rgba(30, 15, 60, .99), rgba(12, 6, 24, .99)) !important;
  border-bottom: 2px solid rgba(255, 224, 0, .2) !important;
  padding: 20px 20px 14px !important
}

.profile-hero-content {
  gap: 18px !important
}

.profile-avatar-ring {
  width: 86px !important;
  height: 86px !important;
  flex-shrink: 0 !important
}

.profile-hero-name {
  font-size: 1.35rem !important;
  letter-spacing: .04em !important
}

.profile-hero-badge {
  font-size: .65rem !important;
  padding: 4px 10px !important;
  letter-spacing: .04em !important
}

.profile-edit-panel {
  background: linear-gradient(160deg, rgba(28, 15, 55, .97), rgba(16, 8, 32, .99)) !important
}

.profile-edit-panel .input-field {
  font-size: .95rem !important;
  padding: 11px 14px !important
}

.profile-edit-panel .btn-gold {
  white-space: nowrap !important;
  font-size: .78rem !important;
  padding: 11px 14px !important
}

.profile-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important
}

.profile-stat-item {
  background: rgba(255, 224, 0, .06) !important;
  border: 1px solid rgba(255, 224, 0, .15) !important;
  border-radius: 5px !important;
  padding: 10px 8px !important;
  text-align: center !important
}

.profile-stat-val {
  font-family: 'Oswald', sans-serif !important;
  font-size: 1.4rem !important;
  font-weight: 900 !important;
  color: #ffe000 !important;
  display: block !important
}

.profile-stat-label {
  font-family: 'Cinzel', serif !important;
  font-size: .6rem !important;
  font-weight: 700 !important;
  color: var(--muted) !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  display: block !important;
  margin-top: 2px !important
}

.theme-selector {
  display: flex !important;
  gap: 8px !important
}

.theme-btn {
  flex: 1 !important;
  padding: 10px 6px !important
}

.theme-btn-icon {
  font-size: 1.3rem !important
}

.theme-btn-label {
  font-size: .72rem !important
}

#screen-profile.active {
  align-items: stretch;
  padding: 0 !important
}

#screen-profile .profile-hero {
  align-items: flex-start !important;
  padding: 24px 24px 16px !important
}

#screen-profile .profile-layout {
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 900px !important
}

.ad-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center
}

.ad-overlay-modal {
  background: linear-gradient(160deg, rgba(20, 10, 40, .99), rgba(10, 5, 20, .99));
  border: 2px solid rgba(255, 224, 0, .3);
  border-radius: 10px;
  max-width: 380px;
  width: 92%;
  overflow: hidden;
  animation: modal-in .3s ease-out;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 40px rgba(255, 224, 0, .05)
}

.ad-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 224, 0, .08);
  border-bottom: 1px solid rgba(255, 224, 0, .15)
}

.ad-badge {
  font-family: 'Oswald', sans-serif;
  font-size: .65rem;
  font-weight: 900;
  background: rgba(255, 224, 0, .2);
  color: #ffe000;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: .2em
}

.ad-brand {
  font-family: 'Cinzel Decorative', cursive;
  font-size: .72rem;
  color: var(--muted)
}

.ad-overlay-body {
  padding: 28px 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px
}

.ad-castle-anim {
  font-size: 3.5rem;
  animation: castle-float 2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(255, 224, 0, .4))
}

.ad-overlay-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.1rem;
  color: #ffe000;
  font-weight: 700
}

.ad-overlay-text {
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  color: var(--muted2);
  line-height: 1.7;
  max-width: 280px
}

.ad-overlay-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(255, 255, 255, .06)
}

.ad-progress-wrap {
  height: 6px;
  background: rgba(255, 255, 255, .08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px
}

.ad-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff8800, #ffe000);
  border-radius: 3px;
  transition: width .9s linear;
  box-shadow: 0 0 8px rgba(255, 200, 0, .4)
}

.ad-timer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px
}

.ad-timer-text {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  color: var(--muted2)
}

.ad-skip-btn {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff8800, #ffe000);
  color: #000;
  border: none;
  border-radius: 4px;
  padding: 7px 14px;
  cursor: pointer;
  animation: btn-appear .3s ease-out
}

@keyframes btn-appear {
  from {
    opacity: 0;
    transform: scale(.8)
  }

  to {
    opacity: 1;
    transform: scale(1)
  }
}

.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px
}

.ad-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  transition: all .2s;
  position: relative
}

.ad-card.ad-ready {
  border-color: rgba(255, 224, 0, .3);
  background: rgba(255, 224, 0, .06);
  cursor: pointer
}

.ad-card.ad-ready:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 224, 0, .1);
  border-color: rgba(255, 224, 0, .5)
}

.ad-card.ad-cooldown {
  opacity: .5
}

.ad-card-top {
  position: relative;
  display: inline-block
}

.ad-card-icon {
  font-size: 2rem;
  display: block
}

.ad-ready-dot {
  position: absolute;
  top: -2px;
  right: -6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 6px rgba(0, 255, 136, .7);
  animation: dot-blink 1.2s ease-in-out infinite
}

.ad-card-label {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  font-weight: 800;
  color: #ffe000
}

.ad-card-desc {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  color: var(--muted2);
  line-height: 1.5
}

.ad-watch-btn {
  width: 100% !important;
  font-size: .72rem !important;
  padding: 8px !important;
  margin-top: 4px
}

.ad-cooldown-timer {
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  color: var(--muted);
  margin-top: 4px
}

.energy-full {
  font-size: 1.4rem;
  transition: filter .3s
}

.energy-empty {
  font-size: 1.4rem;
  filter: grayscale(1) brightness(.35)
}

.energy-full:hover {
  filter: drop-shadow(0 0 6px rgba(255, 220, 0, .8))
}

.prebattle-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, .85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s
}

.prebattle-overlay.active {
  opacity: 1
}

.prebattle-modal {
  background: linear-gradient(160deg, rgba(20, 10, 40, .99), rgba(10, 5, 20, .99));
  border: 2px solid rgba(255, 224, 0, .3);
  border-radius: 10px;
  max-width: 440px;
  width: 94%;
  padding: 28px 24px;
  animation: modal-in .3s ease-out
}

.prebattle-header {
  text-align: center;
  margin-bottom: 20px
}

.prebattle-icon {
  font-size: 2.5rem;
  margin-bottom: 8px
}

.prebattle-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.2rem;
  color: #ffe000;
  margin-bottom: 6px
}

.prebattle-sub {
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  color: var(--muted2)
}

.prebattle-rewards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px
}

.prebattle-reward-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  background: rgba(255, 224, 0, .07);
  border: 1px solid rgba(255, 224, 0, .25);
  transition: all .2s
}

.prebattle-reward-card:hover {
  background: rgba(255, 224, 0, .14);
  border-color: rgba(255, 224, 0, .5);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(255, 224, 0, .1)
}

.prebattle-reward-icon {
  font-size: 1.8rem;
  flex-shrink: 0
}

.prebattle-reward-label {
  font-family: 'Cinzel', serif;
  font-size: .85rem;
  font-weight: 800;
  color: #ffe000;
  display: block
}

.prebattle-reward-desc {
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  color: var(--muted2);
  display: block
}

.prebattle-reward-cta {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  color: rgba(255, 224, 0, .6);
  margin-top: 2px
}

.prebattle-actions {
  text-align: center
}

.prebattle-fight-btn {
  width: 100%;
  margin-bottom: 8px;
  opacity: .7;
  font-size: .8rem !important
}

.prebattle-skip-note {
  font-family: 'Cinzel', serif;
  font-size: .6rem;
  color: var(--muted)
}

.revive-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, .92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center
}

.revive-overlay.active {
  display: flex
}

.revive-modal {
  background: linear-gradient(160deg, rgba(30, 5, 5, .99), rgba(10, 2, 2, .99));
  border: 2px solid rgba(255, 50, 50, .3);
  border-radius: 10px;
  max-width: 380px;
  width: 92%;
  padding: 32px 24px;
  text-align: center;
  animation: modal-in .3s ease-out
}

.revive-skull {
  font-size: 3.5rem;
  margin-bottom: 8px;
  animation: castle-breathe 1.5s ease-in-out infinite
}

.revive-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.4rem;
  color: #ff4444;
  margin-bottom: 4px
}

.revive-enemy {
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  color: var(--muted2);
  margin-bottom: 20px
}

.revive-offer {
  background: rgba(255, 150, 150, .08);
  border: 1px solid rgba(255, 150, 150, .2);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px
}

.revive-offer-icon {
  font-size: 2rem;
  margin-bottom: 8px
}

.revive-offer-text {
  font-family: 'Cinzel', serif;
  font-size: .9rem;
  color: #fff;
  margin-bottom: 4px
}

.revive-offer-sub {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: var(--muted2)
}

.revive-timer-wrap {
  height: 4px;
  background: rgba(255, 255, 255, .1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 20px
}

.revive-timer-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff4444, #ff8800);
  transition: width 1s linear
}

.revive-actions {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.revive-yes-btn {
  font-size: .9rem !important;
  padding: 14px !important
}

.revive-no-btn {
  opacity: .5;
  font-size: .78rem !important
}

.hp-warn-toast {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 4000;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(30, 5, 5, .97), rgba(20, 3, 3, .98));
  border: 1px solid rgba(255, 80, 80, .4);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 280px;
  max-width: 360px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  opacity: 0;
  transition: all .4s ease
}

.hp-warn-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0)
}

.hp-warn-icon {
  font-size: 1.6rem;
  flex-shrink: 0
}

.hp-warn-text {
  flex: 1
}

.hp-warn-text strong {
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  color: #ff6666;
  display: block
}

.hp-warn-text span {
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  color: var(--muted2)
}

.hp-warn-btn {
  flex-shrink: 0;
  font-size: .7rem !important;
  padding: 7px 12px !important
}

.hp-warn-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  flex-shrink: 0;
  min-height: unset !important
}

.scroll-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  align-items: flex-start;
  background: rgba(0, 0, 0, .2);
  border-bottom: 1px solid rgba(255, 255, 255, .05)
}

.scroll-bar-label {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .15em;
  text-transform: uppercase;
  width: 100%;
  margin-bottom: 2px
}

.scroll-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
  transition: all .2s;
  position: relative;
  flex: 1;
  min-width: 160px
}

.scroll-card:hover {
  border-color: var(--sc, rgba(255, 224, 0, .4));
  background: rgba(255, 255, 255, .08);
  transform: translateY(-1px)
}

.scroll-card-active {
  border-color: var(--sc, #ffe000) !important;
  background: color-mix(in srgb, var(--sc, #ffe000) 15%, transparent) !important;
  box-shadow: 0 0 12px color-mix(in srgb, var(--sc, #ffe000) 30%, transparent)
}

.scroll-card-icon {
  font-size: 1.4rem;
  flex-shrink: 0
}

.scroll-card-info {
  flex: 1;
  min-width: 0
}

.scroll-card-name {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.scroll-card-desc {
  font-family: 'Cinzel', serif;
  font-size: .62rem;
  color: var(--muted2);
  line-height: 1.4;
  margin-top: 1px
}

.scroll-active-badge {
  font-family: 'Oswald', sans-serif;
  font-size: .7rem;
  font-weight: 900;
  color: var(--sc, #ffe000);
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--sc, #ffe000) 20%, transparent);
  border-radius: 50%
}

.roulette-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, .9);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center
}

.roulette-overlay.active {
  display: flex
}

.roulette-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 420px;
  width: 95%
}

.roulette-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.3rem;
  color: #ffe000;
  text-shadow: 0 0 20px rgba(255, 224, 0, .4);
  text-align: center
}

.roulette-wheel-wrap {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center
}

.roulette-needle {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.6rem;
  color: #ffe000;
  z-index: 5;
  filter: drop-shadow(0 0 8px rgba(255, 224, 0, .8))
}

.roulette-wheel {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 3px solid rgba(255, 224, 0, .3);
  box-shadow: 0 0 30px rgba(255, 224, 0, .15), inset 0 0 20px rgba(0, 0, 0, .5);
  overflow: visible;
  position: relative
}

.roulette-svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: visible
}

.roulette-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: 'Cinzel', serif;
  font-size: .6rem;
  font-weight: 800;
  text-align: center;
  width: 52px;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .8)
}

.roulette-winner-banner {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1rem;
  border: 2px solid;
  border-radius: 6px;
  padding: 10px 24px;
  text-align: center;
  animation: modal-in .4s ease-out
}

.roulette-collect-btn {
  width: 100%;
  font-size: 1rem !important;
  padding: 14px !important;
  animation: modal-in .3s ease-out .1s both
}

.roulette-spinning {
  font-family: 'Cinzel', serif;
  font-size: .85rem;
  color: var(--muted2);
  text-align: center;
  letter-spacing: .1em
}

.roulette-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: radial-gradient(ellipse at center, rgba(30, 5, 60, .97) 0%, rgba(0, 0, 0, .98) 100%);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .4s ease
}

.roulette-overlay.active {
  display: flex !important;
  opacity: 1
}

.roulette-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 380px;
  width: 95%;
  padding: 0 10px
}

.roulette-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.4rem;
  color: #ffe000;
  text-shadow: 0 0 30px rgba(255, 224, 0, .5);
  text-align: center;
  letter-spacing: .05em
}

.roulette-outer {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center
}

.roulette-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .8))
}

.roulette-ring {
  width: 290px;
  height: 290px;
  border-radius: 50%;
  background: conic-gradient(#1a0a30 0deg, #2d1060 36deg, #1a0a30 36deg, #2d1060 72deg, #1a0a30 72deg, #2d1060 108deg, #1a0a30 108deg, #2d1060 144deg, #1a0a30 144deg, #2d1060 180deg, #1a0a30 180deg, #2d1060 216deg, #1a0a30 216deg, #2d1060 252deg, #1a0a30 252deg, #2d1060 288deg, #1a0a30 288deg, #2d1060 324deg, #1a0a30 324deg, #2d1060 360deg);
  border: 4px solid rgba(255, 224, 0, .6);
  box-shadow: 0 0 0 2px rgba(255, 224, 0, .2), 0 0 40px rgba(255, 224, 0, .15), inset 0 0 20px rgba(0, 0, 0, .4);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ring-spin 8s linear infinite
}

@keyframes ring-spin {
  from {
    transform: rotate(0deg)
  }

  to {
    transform: rotate(360deg)
  }
}

.roulette-wheel {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 224, 0, .4), 0 8px 40px rgba(0, 0, 0, .6);
  overflow: hidden;
  cursor: default
}

.roulette-wheel svg {
  display: block
}

.roulette-winner-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  border: 2px solid var(--wc, #ffe000);
  box-shadow: 0 0 20px color-mix(in srgb, var(--wc, #ffe000) 30%, transparent);
  animation: modal-in .5s cubic-bezier(.2, .8, .3, 1.2);
  width: 100%
}

.rw-icon {
  font-size: 2.4rem;
  flex-shrink: 0
}

.rw-text {
  flex: 1
}

.rw-label {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: .1em
}

.rw-prize {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.1rem;
  font-weight: 900
}

.roulette-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%
}

.roulette-collect-btn {
  width: 100% !important;
  font-size: 1rem !important;
  padding: 14px !important
}

.roulette-extra-btn {
  width: 100% !important;
  font-size: .82rem !important;
  background: rgba(255, 255, 255, .06) !important;
  border: 1px solid rgba(255, 255, 255, .15) !important;
  color: #88ddff !important;
  padding: 11px !important;
  animation: modal-in .3s ease-out .15s both
}

.roulette-extra-btn:hover {
  background: rgba(136, 221, 255, .12) !important;
  border-color: rgba(136, 221, 255, .4) !important
}

.roulette-extra-used {
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  color: var(--muted);
  text-align: center;
  padding: 8px
}

.roulette-spinning {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1rem;
  color: #ffe000;
  letter-spacing: .1em;
  animation: spin-pulse 1s ease-in-out infinite
}

@keyframes spin-pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .4
  }
}

.roulette-spin-btn {
  width: 100% !important;
  font-size: 1rem !important;
  padding: 16px !important
}

@media(max-width:480px) {
  .roulette-outer {
    width: 260px;
    height: 260px
  }

  .roulette-ring {
    width: 250px;
    height: 250px
  }

  .roulette-wheel {
    width: 240px;
    height: 240px
  }
}

.skill-qty-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: rgba(10, 5, 20, .92);
  border: 1px solid rgba(255, 224, 0, .5);
  color: #ffe000;
  font-family: 'Oswald', sans-serif;
  font-size: .6rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 6px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5)
}

.skill-qty-owned {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #ffe000, #ff8800);
  color: #000;
  font-family: 'Oswald', sans-serif;
  font-size: .6rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 6px;
  min-width: 18px;
  text-align: center
}

.map-ad-section {}

.map-ad-section-label {
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  font-weight: 800;
  color: var(--muted2);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 6px;
  padding-left: 2px;
  display: flex;
  align-items: center;
  gap: 6px
}

.map-ad-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, .08)
}

.no-energy-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: radial-gradient(ellipse at center, rgba(10, 3, 30, .97) 0%, rgba(0, 0, 0, .98) 100%);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center
}

.no-energy-overlay.active {
  display: flex !important
}

.no-energy-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 400px;
  width: 94%;
  padding: 10px 0;
  animation: modal-in .35s ease-out
}

.no-energy-emojis {
  font-size: 1.6rem;
  letter-spacing: 4px;
  filter: grayscale(1) brightness(.35)
}

.no-energy-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.6rem;
  color: #ff4444;
  text-shadow: 0 0 20px rgba(255, 50, 50, .4);
  margin: 0
}

.no-energy-sub {
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  color: var(--muted2);
  margin-top: -8px
}

.no-energy-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%
}

.no-energy-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  transition: all .2s
}

.no-energy-card:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .2);
  transform: translateX(3px)
}

.no-energy-card.primary {
  background: rgba(255, 224, 0, .08);
  border-color: rgba(255, 224, 0, .3)
}

.no-energy-card.primary:hover {
  background: rgba(255, 224, 0, .15);
  border-color: rgba(255, 224, 0, .6);
  box-shadow: 0 0 20px rgba(255, 224, 0, .1)
}

.no-energy-card-icon {
  font-size: 1.8rem;
  flex-shrink: 0
}

.no-energy-card-body {
  flex: 1
}

.no-energy-card-title {
  font-family: 'Cinzel', serif;
  font-size: .88rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 3px
}

.no-energy-card-desc {
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  color: var(--muted2);
  line-height: 1.6
}

.no-energy-unlimited {
  color: #00ff88;
  font-weight: 800
}

.no-energy-card-arrow {
  font-size: 1rem;
  color: rgba(255, 224, 0, .5);
  flex-shrink: 0
}

.no-energy-card.primary .no-energy-card-arrow {
  color: #ffe000
}

.no-energy-back-btn {
  width: 100% !important;
  opacity: .5;
  font-size: .78rem !important;
  margin-top: 4px
}

@media (max-width:480px) {
  .no-energy-title {
    font-size: 1.3rem !important
  }

  .no-energy-card {
    padding: 12px 14px
  }

  .no-energy-card-icon {
    font-size: 1.5rem
  }
}

#screen-battle.active,
#screen-store.active,
#screen-skillshop.active,
#screen-upgrade.active,
#screen-ranking.active,
#screen-friends.active,
#screen-multiplayer.active,
#screen-terms.active,
#screen-matchmaking.active {
  padding: 0 !important
}

#screen-battle .battle-layout {
  padding: 0 6px 10px !important
}

#screen-store .store-layout,
#screen-skillshop>div,
#screen-upgrade>.upgrade-grid,
#screen-ranking table,
#screen-friends .friends-layout,
#screen-multiplayer .multiplayer-layout,
#screen-matchmaking .mm-layout {
  padding-left: 12px !important;
  padding-right: 12px !important
}

@media (max-width:480px) {
  #screen-battle .battle-layout {
    padding: 0 3px 10px !important
  }

  #screen-store .store-layout {
    padding: 0 8px 10px !important
  }
}

.achievement-toast {
  position: fixed;
  right: 16px;
  bottom: 60px;
  z-index: 9500;
  background: linear-gradient(135deg, rgba(20, 10, 40, .97), rgba(10, 5, 20, .98));
  border: 1px solid var(--ac, #ffe000);
  border-radius: 8px;
  padding: 12px 16px;
  max-width: 300px;
  min-width: 240px;
  box-shadow: 0 0 20px var(--ag, rgba(255, 224, 0, .3));
  transform: translateX(120%);
  transition: transform .4s cubic-bezier(.2, .8, .3, 1.2)
}

.achievement-toast.visible {
  transform: translateX(0)
}

.ach-toast-label {
  font-family: 'Oswald', sans-serif;
  font-size: .6rem;
  font-weight: 900;
  color: var(--ac, #ffe000);
  letter-spacing: .2em;
  margin-bottom: 8px
}

.ach-toast-body {
  display: flex;
  align-items: center;
  gap: 10px
}

.ach-toast-icon {
  font-size: 2rem;
  flex-shrink: 0
}

.ach-toast-name {
  font-family: 'Cinzel', serif;
  font-size: .88rem;
  font-weight: 800
}

.ach-toast-desc {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  color: var(--muted2);
  margin-top: 2px
}

.ach-toast-reward {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  color: #ffe000;
  margin-top: 4px;
  font-weight: 700
}

.achievements-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px
}

.achievements-list::-webkit-scrollbar {
  width: 4px
}

.achievements-list::-webkit-scrollbar-thumb {
  background: rgba(255, 224, 0, .3);
  border-radius: 2px
}

.achievement-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  transition: all .2s
}

.ach-done {
  border-color: var(--ac, rgba(255, 224, 0, .3)) !important;
  background: color-mix(in srgb, var(--ac, #ffe000) 8%, transparent) !important
}

.ach-locked {
  opacity: .5
}

.ach-icon {
  font-size: 1.6rem;
  flex-shrink: 0
}

.ach-icon-locked {
  filter: grayscale(1) brightness(.4)
}

.ach-body {
  flex: 1;
  min-width: 0
}

.ach-name {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.ach-desc {
  font-family: 'Cinzel', serif;
  font-size: .62rem;
  color: var(--muted2);
  margin-top: 2px;
  line-height: 1.4
}

.ach-rarity {
  font-family: 'Oswald', sans-serif;
  font-size: .55rem;
  font-weight: 900;
  letter-spacing: .15em;
  margin-top: 3px
}

.ach-check {
  font-family: 'Oswald', sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  color: #00ff88;
  flex-shrink: 0
}

.ach-reward {
  font-family: 'Cinzel', serif;
  font-size: .6rem;
  color: var(--muted);
  flex-shrink: 0;
  text-align: right;
  line-height: 1.6
}

@media (max-width:480px) {
  .achievements-list {
    grid-template-columns: 1fr
  }

  .achievement-toast {
    right: 8px;
    left: 8px;
    max-width: unset
  }
}

.chat-modal-overlay {
  position: fixed;
  inset: 0 !important;
  z-index: 99999 !important;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0
}

.chat-modal {
  width: 100%;
  max-width: 480px;
  height: 60vh;
  max-height: 520px;
  min-height: 300px;
  background: linear-gradient(180deg, rgba(18, 10, 38, .99), rgba(10, 5, 20, .99));
  border: 1px solid rgba(255, 224, 0, .2);
  border-radius: 12px 12px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-in .3s ease-out
}

@media(max-height:600px) {
  .chat-modal {
    height: 80vh
  }
}

.chat-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 224, 0, .06);
  border-bottom: 1px solid rgba(255, 224, 0, .1);
  flex-shrink: 0
}

.chat-modal-avatar {
  font-size: 1.6rem;
  flex-shrink: 0
}

.chat-modal-name {
  font-family: 'Cinzel', serif;
  font-size: .9rem;
  font-weight: 800;
  color: #ffe000;
  flex: 1
}

.chat-modal-status {
  font-family: 'Cinzel', serif;
  font-size: .62rem;
  color: var(--muted2)
}

.chat-close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  min-height: unset !important
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth
}

.chat-messages::-webkit-scrollbar {
  width: 3px
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 224, 0, .2);
  border-radius: 2px
}

.chat-loading,
.chat-empty {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  color: var(--muted);
  text-align: center;
  padding: 20px
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 75%
}

.chat-mine {
  align-self: flex-end;
  align-items: flex-end
}

.chat-theirs {
  align-self: flex-start;
  align-items: flex-start
}

.chat-msg-name {
  font-family: 'Cinzel', serif;
  font-size: .6rem;
  color: var(--muted2);
  margin-bottom: 2px
}

.chat-bubble {
  padding: 8px 12px;
  border-radius: 12px;
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  line-height: 1.5;
  word-break: break-word
}

.chat-mine .chat-bubble {
  background: rgba(255, 224, 0, .15);
  border: 1px solid rgba(255, 224, 0, .3);
  color: #fff;
  border-radius: 12px 12px 2px 12px
}

.chat-theirs .chat-bubble {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  color: var(--muted2);
  border-radius: 12px 12px 12px 2px
}

.chat-msg-time {
  font-family: 'Cinzel', serif;
  font-size: .55rem;
  color: var(--muted);
  margin-top: 2px
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  flex-shrink: 0
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 20px;
  padding: 8px 14px;
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  color: #fff;
  outline: none
}

.chat-input:focus {
  border-color: rgba(255, 224, 0, .4)
}

.chat-send-btn {
  background: linear-gradient(135deg, #ff8800, #ffe000);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: unset !important
}

.chat-quick-emojis {
  display: flex;
  gap: 6px;
  padding: 6px 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, .04);
  flex-shrink: 0
}

.chat-quick-emojis button {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
  font-size: 1.1rem;
  width: 36px;
  height: 32px;
  cursor: pointer;
  min-height: unset !important;
  transition: all .15s
}

.chat-quick-emojis button:hover {
  background: rgba(255, 255, 255, .12);
  transform: scale(1.1)
}

.chat-friend-btn {
  font-size: 1rem !important;
  padding: 7px 10px !important
}

.chat-unread-badge {
  background: #ff4444;
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-size: .6rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 8px;
  margin-left: 3px;
  vertical-align: middle
}

.tournament-my-panel {}

.my-tournament-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px
}

.my-tourn-stat {
  text-align: center;
  background: rgba(255, 224, 0, .06);
  border: 1px solid rgba(255, 224, 0, .2);
  border-radius: 5px;
  padding: 10px 6px
}

.my-tourn-val {
  font-family: 'Oswald', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffe000
}

.my-tourn-label {
  font-family: 'Cinzel', serif;
  font-size: .6rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: 2px
}

.tourn-score-formula {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  color: var(--muted2);
  text-align: center;
  padding: 6px 0
}

.tournament-prizes {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.tournament-prize {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08)
}

.gold-prize {
  background: rgba(255, 200, 0, .08);
  border-color: rgba(255, 200, 0, .3)
}

.silver-prize {
  background: rgba(192, 192, 192, .06);
  border-color: rgba(192, 192, 192, .25)
}

.bronze-prize {
  background: rgba(205, 127, 50, .06);
  border-color: rgba(205, 127, 50, .25)
}

.prize-rank {
  font-size: 1.6rem;
  flex-shrink: 0
}

.prize-title {
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  font-weight: 800;
  color: #fff
}

.prize-reward {
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  color: var(--muted2);
  margin-top: 2px
}

.tournament-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 5px
}

.tourn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
  transition: all .2s
}

.tourn-row-me {
  background: rgba(255, 224, 0, .08);
  border-color: rgba(255, 224, 0, .3) !important
}

.tourn-rank {
  font-size: 1.2rem;
  width: 32px;
  text-align: center;
  flex-shrink: 0
}

.tourn-player {
  flex: 1;
  min-width: 0
}

.tourn-name {
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.tourn-castle {
  font-family: 'Cinzel', serif;
  font-size: .62rem;
  color: var(--muted2);
  margin-top: 1px
}

.tourn-score {
  text-align: right;
  flex-shrink: 0
}

.tourn-score-val {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffe000
}

.tourn-score-sub {
  font-family: 'Cinzel', serif;
  font-size: .6rem;
  color: var(--muted);
  margin-top: 1px
}

@keyframes screen-flash {
  0% {
    opacity: 1
  }

  100% {
    opacity: 0
  }
}

@keyframes particle-burst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1
  }

  100% {
    transform: translate(var(--dx, 0px), var(--dy, -80px)) scale(0);
    opacity: 0
  }
}

@keyframes levelup-in {
  0% {
    transform: translateX(-50%) translateY(40px) scale(.7);
    opacity: 0
  }

  60% {
    transform: translateX(-50%) translateY(-8px) scale(1.08);
    opacity: 1
  }

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

@keyframes levelup-out {
  0% {
    transform: translateX(-50%) scale(1);
    opacity: 1
  }

  100% {
    transform: translateX(-50%) translateY(-30px) scale(.8);
    opacity: 0
  }
}

@keyframes streak-flash-in {
  0% {
    transform: translate(-50%, -50%) scale(.5);
    opacity: 0
  }

  50% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1
  }
}

@keyframes streak-flash-out {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1
  }

  100% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0
  }
}

.levelup-banner {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(40px) scale(.7);
  z-index: 9800;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(255, 200, 0, .18), rgba(255, 100, 0, .15));
  border: 2px solid rgba(255, 200, 0, .6);
  border-radius: 12px;
  padding: 12px 22px;
  opacity: 0;
  transition: opacity .4s, transform .4s cubic-bezier(.2, .8, .3, 1.2);
  pointer-events: none;
  box-shadow: 0 0 30px rgba(255, 200, 0, .3);
  backdrop-filter: blur(4px)
}

.levelup-banner.visible {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1
}

.lu-icon {
  font-size: 1.8rem;
  animation: fighter-idle 1s ease-in-out infinite
}

.lu-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1rem;
  color: #ffe000;
  text-shadow: 0 0 15px rgba(255, 224, 0, .6);
  font-weight: 900
}

.lu-sub {
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  color: rgba(255, 200, 0, .7);
  margin-top: 2px
}

.streak-flash {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.5);
  z-index: 9800;
  font-family: 'Cinzel Decorative', cursive;
  font-size: 2rem;
  color: #ffe000;
  text-shadow: 0 0 30px rgba(255, 200, 0, .9), 0 0 60px rgba(255, 100, 0, .5);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s, transform .4s cubic-bezier(.2, .8, .3, 1.3);
  white-space: nowrap;
  letter-spacing: .05em
}

.streak-flash.visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1
}

.option-btn.correct {
  animation: correct-bounce .4s ease-out !important
}

@keyframes correct-bounce {
  0% {
    transform: scale(1)
  }

  40% {
    transform: scale(1.04)
  }

  100% {
    transform: scale(1)
  }
}

.option-btn.wrong {
  animation: wrong-shake .35s ease-out !important
}

@keyframes wrong-shake {

  0%,
  100% {
    transform: translateX(0)
  }

  25% {
    transform: translateX(-8px)
  }

  75% {
    transform: translateX(8px)
  }
}

/* Glow pulsante en los botones de respuesta mientras está activo */
.option-btn:not(:disabled):not(.correct):not(.wrong) {
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s !important
}

.chat-inapp-notif {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 9600;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(20, 10, 40, .97), rgba(10, 5, 20, .98));
  border: 1px solid rgba(255, 224, 0, .3);
  border-radius: 10px;
  padding: 10px 12px;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .6);
  transform: translateY(-120%);
  transition: transform .35s cubic-bezier(.2, .8, .3, 1.2);
  pointer-events: auto;
  width: calc(100% - 24px);
  box-sizing: border-box;
}

.chat-inapp-notif.visible {
  transform: translateY(0)
}

@media(min-width:500px) {
  .chat-inapp-notif {
    left: auto;
    right: 16px;
    top: 16px;
    width: 320px;
    transform: translateX(120%)
  }

  .chat-inapp-notif.visible {
    transform: translateX(0)
  }
}

.cin-icon {
  font-size: 1.4rem;
  flex-shrink: 0
}

.cin-body {
  flex: 1;
  min-width: 0
}

.cin-name {
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  font-weight: 800;
  color: #ffe000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.cin-text {
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  color: var(--muted2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.cin-reply {
  background: linear-gradient(135deg, #ffe000, #ff8800);
  border: none;
  border-radius: 6px;
  color: #000;
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  font-weight: 800;
  padding: 5px 10px;
  cursor: pointer;
  flex-shrink: 0;
  min-height: unset !important
}

.cin-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: .9rem;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
  min-height: unset !important
}

/* ══ WHATSAPP ══ */
.wa-panel-map {}

.wa-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 7px;
  cursor: pointer;
  background: rgba(37, 211, 102, .07);
  border: 1px solid rgba(37, 211, 102, .25);
  margin-bottom: 8px;
  transition: all .2s
}

.wa-card:hover {
  background: rgba(37, 211, 102, .14);
  border-color: rgba(37, 211, 102, .5);
  transform: translateX(3px)
}

.wa-card.wa-primary {
  background: rgba(37, 211, 102, .14);
  border-color: rgba(37, 211, 102, .4);
  box-shadow: 0 0 14px rgba(37, 211, 102, .12)
}

.wa-icon {
  font-size: 1.6rem;
  flex-shrink: 0
}

.wa-body {
  flex: 1
}

.wa-title {
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  font-weight: 800;
  color: #25d366
}

.wa-reward {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  color: var(--muted2);
  margin-top: 2px
}

.wa-share-result-btn {
  width: 100% !important;
  background: linear-gradient(135deg, #128c3c, #25d366) !important;
  border: none !important;
  color: #fff !important;
  font-size: .82rem !important;
  padding: 12px !important;
  margin-top: 4px !important
}

.global-chat-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  height: calc(100dvh - 106px);
  overflow: hidden
}

.global-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scroll-behavior: smooth
}

.global-chat-messages::-webkit-scrollbar {
  width: 3px
}

.global-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 224, 0, .2);
  border-radius: 2px
}

.global-chat-input-row {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  flex-shrink: 0
}

.gchat-msg {
  display: flex;
  flex-direction: column;
  max-width: 78%
}

.gchat-msg.mine {
  align-self: flex-end;
  align-items: flex-end
}

.gchat-msg.theirs {
  align-self: flex-start;
  align-items: flex-start
}

.gchat-msg.victory {
  background: rgba(255, 224, 0, .06);
  border-radius: 8px;
  padding: 4px 8px;
  border-left: 2px solid #ffe000;
  max-width: 90%
}

.gchat-msg.levelup {
  background: rgba(0, 255, 136, .06);
  border-radius: 8px;
  padding: 4px 8px;
  border-left: 2px solid #00ff88;
  max-width: 90%
}

.gchat-author {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px
}

.gchat-name {
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  font-weight: 800;
  color: #ffe000
}

.gchat-level {
  font-family: 'Cinzel', serif;
  font-size: .6rem;
  color: var(--muted);
  background: rgba(255, 224, 0, .1);
  padding: 1px 5px;
  border-radius: 8px
}

.gchat-bubble {
  padding: 7px 11px;
  border-radius: 10px;
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  line-height: 1.5;
  word-break: break-word
}

.gchat-msg.mine .gchat-bubble {
  background: rgba(255, 224, 0, .15);
  border: 1px solid rgba(255, 224, 0, .3);
  color: #fff;
  border-radius: 10px 10px 2px 10px
}

.gchat-msg.theirs .gchat-bubble {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  color: var(--muted2);
  border-radius: 10px 10px 10px 2px
}

.gchat-time {
  font-family: 'Cinzel', serif;
  font-size: .55rem;
  color: var(--muted);
  margin-top: 2px
}

@media(max-width:480px) {
  .global-chat-layout {
    height: calc(100dvh - 96px)
  }

  .gchat-bubble {
    font-size: .78rem
  }

  .gchat-msg {
    max-width: 88%
  }
}

/* ══ LANDING PAGE ══ */
#landing-page {
  display: block;
  width: 100%;
  overflow-x: hidden;
  background: #0a0808
}

.lp-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden
}

.lp-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0
}

.lp-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 8, 8, .2) 0%, rgba(10, 8, 8, .5) 50%, rgba(10, 8, 8, .92) 90%, #0a0808 100%)
}

.lp-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 860px;
  padding: 0 20px
}

.lp-badge-top {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  color: #c8a84b;
  letter-spacing: .5em;
  margin-bottom: 20px;
  display: block
}

.lp-main-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: clamp(3rem, 9vw, 7rem);
  color: #f0d078;
  text-shadow: 0 0 60px rgba(200, 168, 75, .6), 0 4px 20px rgba(0, 0, 0, .9);
  margin-bottom: 14px;
  line-height: 1;
  letter-spacing: .05em
}

.lp-main-subtitle {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(.9rem, 2.5vw, 1.3rem);
  color: #e8dcc8;
  letter-spacing: .25em;
  text-transform: uppercase;
  margin-bottom: 36px;
  opacity: .9
}

.lp-hero-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px
}

.lp-btn-play {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 15px 36px;
  background: linear-gradient(135deg, #c8a84b, #8a6820);
  color: #fff8e0;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(200, 168, 75, .4);
  transition: all .2s
}

.lp-btn-play:hover {
  background: linear-gradient(135deg, #f0d078, #c8a84b);
  box-shadow: 0 0 50px rgba(200, 168, 75, .7);
  transform: translateY(-2px)
}

.lp-btn-login {
  font-family: 'Oswald', sans-serif;
  font-size: .95rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 14px 32px;
  background: transparent;
  color: #e8dcc8;
  border: 2px solid rgba(200, 168, 75, .4);
  border-radius: 3px;
  cursor: pointer;
  transition: all .2s
}

.lp-btn-login:hover {
  border-color: #f0d078;
  background: rgba(200, 168, 75, .1);
  transform: translateY(-2px)
}

.lp-hero-stats {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap
}

.lp-hstat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px
}

.lp-hstat span {
  font-family: 'Oswald', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #f0d078
}

.lp-hstat small {
  font-family: 'Cinzel', serif;
  font-size: .6rem;
  color: #8a7a5a;
  letter-spacing: .1em;
  text-transform: uppercase
}

.lp-scroll-ind {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: #c8a84b;
  font-size: 1.2rem;
  animation: lp-bounce 2s ease-in-out infinite
}

@keyframes lp-bounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: .5
  }

  50% {
    transform: translateX(-50%) translateY(8px);
    opacity: 1
  }
}

.lp-sec {
  padding: 80px 20px;
  position: relative
}

.lp-sec-dark {
  background: #12100e
}

.lp-sec-darker {
  background: #0e0c0a
}

.lp-sec-inner {
  max-width: 1000px;
  margin: 0 auto
}

.lp-sec-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  color: #f0d078;
  text-align: center;
  margin-bottom: 12px;
  text-shadow: 0 0 20px rgba(200, 168, 75, .3);
  letter-spacing: .05em
}

.lp-sec-sub {
  font-family: 'Cinzel', serif;
  font-size: .85rem;
  color: #8a7a5a;
  text-align: center;
  margin-bottom: 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.9
}

.lp-divider {
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c8a84b, transparent);
  margin: 14px auto 40px
}

.lp-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 10px
}

.lp-pillar {
  text-align: center;
  padding: 32px 20px;
  background: rgba(200, 168, 75, .04);
  border: 1px solid rgba(200, 168, 75, .2);
  border-top: 3px solid #c8a84b;
  border-radius: 2px;
  transition: all .2s
}

.lp-pillar:hover {
  background: rgba(200, 168, 75, .07);
  border-color: rgba(200, 168, 75, .4)
}

.lp-pillar-icon {
  font-size: 2.8rem;
  margin-bottom: 14px;
  display: block
}

.lp-pillar h3 {
  font-family: 'Cinzel', serif;
  font-size: .92rem;
  color: #f0d078;
  margin-bottom: 10px
}

.lp-pillar p {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  color: #8a7a5a;
  line-height: 1.8;
  margin: 0
}

.lp-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px
}

.lp-step {
  text-align: center
}

.lp-step-num {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 168, 75, .18), rgba(200, 168, 75, .04));
  border: 2px solid #c8a84b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.7rem;
  color: #f0d078;
  margin: 0 auto 18px;
  box-shadow: 0 0 20px rgba(200, 168, 75, .25)
}

.lp-step h3 {
  font-family: 'Cinzel', serif;
  font-size: .88rem;
  color: #f0d078;
  margin-bottom: 8px
}

.lp-step p {
  font-family: 'Cinzel', serif;
  font-size: .76rem;
  color: #8a7a5a;
  line-height: 1.75;
  margin: 0
}

.lp-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start
}

.lp-col-title {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: #f0d078;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(200, 168, 75, .25)
}

.lp-prize-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  margin-bottom: 7px;
  border-radius: 3px
}

.lp-prize-1 {
  background: rgba(255, 215, 0, .08);
  border: 1px solid rgba(255, 215, 0, .25)
}

.lp-prize-2 {
  background: rgba(192, 192, 192, .06);
  border: 1px solid rgba(192, 192, 192, .2)
}

.lp-prize-3 {
  background: rgba(205, 127, 50, .06);
  border: 1px solid rgba(205, 127, 50, .2)
}

.lp-prize-other {
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .07)
}

.lp-prize-medal {
  font-size: 1.4rem;
  flex-shrink: 0
}

.lp-prize-name {
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  color: #e8dcc8;
  flex: 1
}

.lp-prize-reward {
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  color: #c8a84b
}

.lp-league-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  margin-bottom: 5px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(200, 168, 75, .1);
  border-radius: 2px;
  transition: all .2s
}

.lp-league-row:last-child {
  border-color: rgba(200, 168, 75, .35);
  background: rgba(200, 168, 75, .07)
}

.lp-league-icon {
  font-size: 1.2rem;
  flex-shrink: 0
}

.lp-league-name {
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  color: #e8dcc8;
  flex: 1
}

.lp-league-range {
  font-family: 'Cinzel', serif;
  font-size: .62rem;
  color: #8a7a5a
}

.lp-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px
}

.lp-card {
  padding: 26px 22px;
  background: rgba(200, 168, 75, .03);
  border: 1px solid rgba(200, 168, 75, .18);
  border-radius: 3px;
  transition: all .2s
}

.lp-card:hover {
  border-color: rgba(200, 168, 75, .5);
  background: rgba(200, 168, 75, .07);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(200, 168, 75, .1)
}

.lp-card-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 14px
}

.lp-card h3 {
  font-family: 'Cinzel', serif;
  font-size: .88rem;
  color: #f0d078;
  margin-bottom: 8px
}

.lp-card p {
  font-family: 'Cinzel', serif;
  font-size: .76rem;
  color: #8a7a5a;
  line-height: 1.75;
  margin: 0
}

.lp-faq-list {
  max-width: 780px;
  margin: 0 auto
}

.lp-faq-item {
  border-bottom: 1px solid rgba(200, 168, 75, .2)
}

.lp-faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: .88rem;
  color: #e8dcc8;
  user-select: none;
  transition: color .2s
}

.lp-faq-q:hover {
  color: #f0d078
}

.lp-faq-icon {
  font-size: 1.3rem;
  color: #c8a84b;
  transition: transform .35s;
  flex-shrink: 0;
  margin-left: 12px
}

.lp-faq-item.open .lp-faq-icon {
  transform: rotate(45deg)
}

.lp-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease
}

.lp-faq-item.open .lp-faq-a {
  max-height: 200px
}

.lp-faq-a p {
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  color: #8a7a5a;
  line-height: 1.85;
  padding-bottom: 16px;
  margin: 0
}

.lp-cta-sec {
  position: relative;
  padding: 120px 20px;
  text-align: center;
  background: #0a0808;
  overflow: hidden
}

.lp-cta-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(200, 168, 75, .12), transparent 70%)
}

.lp-cta-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  color: #f0d078;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 40px rgba(200, 168, 75, .4)
}

.lp-cta-sub {
  font-family: 'Cinzel', serif;
  font-size: .88rem;
  color: #8a7a5a;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
  line-height: 1.8
}

.lp-online-count {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  color: rgba(0, 255, 136, .6);
  margin-top: 18px;
  position: relative;
  z-index: 1
}

.lp-footer {
  background: #080606;
  border-top: 1px solid rgba(200, 168, 75, .2);
  padding: 40px 20px 28px;
  text-align: center
}

.lp-footer-logo {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.1rem;
  color: #f0d078;
  margin-bottom: 14px
}

.lp-footer-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px
}

.lp-footer-links button,
.lp-footer-links a {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  color: rgba(200, 168, 75, .45);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s
}

.lp-footer-links button:hover,
.lp-footer-links a:hover {
  color: rgba(200, 168, 75, .8)
}

.lp-footer-copy {
  font-family: 'Cinzel', serif;
  font-size: .62rem;
  color: #8a7a5a
}

@media(max-width:768px) {
  .lp-pillars {
    grid-template-columns: 1fr;
    gap: 14px
  }

  .lp-steps {
    grid-template-columns: 1fr 1fr;
    gap: 20px
  }

  .lp-two-cols {
    grid-template-columns: 1fr
  }

  .lp-cards-grid {
    grid-template-columns: 1fr 1fr
  }
}

@media(max-width:480px) {
  .lp-sec {
    padding: 50px 16px
  }

  .lp-steps {
    grid-template-columns: 1fr
  }

  .lp-hero-btns {
    flex-direction: column;
    align-items: center
  }

  .lp-btn-play,
  .lp-btn-login {
    width: 100%;
    max-width: 280px
  }

  .lp-cards-grid {
    grid-template-columns: 1fr
  }

  .lp-hero-stats {
    gap: 16px
  }

  .lp-hstat span {
    font-size: 1.3rem
  }
}

/* ══ SPRITES PIXEL ART ══ */
.castle-sprite-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block
}

.enemy-sprite-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 8px rgba(255, 50, 50, .5))
}

.fighter-sprite img,
.enemy-sprite img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated
}

.castle-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  animation: castle-float 4.5s ease-in-out infinite
}

.map-navbar-castle-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated
}

/* ══════════ BOTÓN VOLVER / GHOST MEJORADO ══════════ */
.btn-ghost {
  background: rgba(255, 224, 0, 0.04);
  border: 1px solid rgba(255, 224, 0, 0.2);
  color: #d4ccff;
  backdrop-filter: blur(4px);
  transition: all 0.25s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.btn-ghost:hover {
  background: rgba(255, 224, 0, 0.1);
  border-color: rgba(255, 224, 0, 0.45);
  color: #fff8a0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 224, 0, 0.08);
}

.btn-ghost:active {
  transform: translateY(0);
  background: rgba(255, 224, 0, 0.06);
}

.auth-screen .btn-ghost {
  background: linear-gradient(135deg, rgba(255, 224, 0, 0.06), rgba(200, 168, 75, 0.03));
  border-color: rgba(200, 168, 75, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.auth-screen .btn-ghost:hover {
  background: linear-gradient(135deg, rgba(255, 224, 0, 0.12), rgba(200, 168, 75, 0.08));
  border-color: rgba(242, 208, 107, 0.5);
  color: #ffe000;
}

/* ══════════ BOTÓN VOLVER PRINCIPAL (btn-back) ══════════ */
.btn-back {
  background: linear-gradient(135deg, rgba(200, 168, 75, 0.08), rgba(255, 224, 0, 0.04));
  border: 1px solid rgba(255, 224, 0, 0.25);
  color: #ffe000;
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 8px 18px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.btn-back::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 224, 0, 0.1), transparent);
  transition: left 0.5s ease;
}

.btn-back:hover::before {
  left: 100%;
}

.btn-back:hover {
  background: linear-gradient(135deg, rgba(255, 224, 0, 0.18), rgba(200, 168, 75, 0.12));
  border-color: rgba(255, 224, 0, 0.55);
  color: #fff8a0;
  transform: translateX(-3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 224, 0, 0.12);
}

.btn-back:hover .btn-back-arrow {
  transform: translateX(-4px);
}

.btn-back:active {
  transform: translateX(-1px);
  background: rgba(255, 224, 0, 0.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-back-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
  margin-right: 4px;
}

/* ══════════ BOTONES INLINE (Términos, Privacidad, etc.) ══════════ */
.btn-link {
  background: linear-gradient(135deg, rgba(200, 168, 75, 0.08), rgba(255, 224, 0, 0.04));
  border: 1px solid rgba(255, 224, 0, 0.25);
  color: #ffe000;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.btn-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 224, 0, 0.1), transparent);
  transition: left 0.5s ease;
}

.btn-link:hover::before {
  left: 100%;
}

.btn-link:hover {
  background: linear-gradient(135deg, rgba(255, 224, 0, 0.15), rgba(200, 168, 75, 0.1));
  border-color: rgba(255, 224, 0, 0.5);
  color: #fff8a0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), 0 0 15px rgba(255, 224, 0, 0.1);
}

.btn-link:active {
  transform: translateY(0);
  background: rgba(255, 224, 0, 0.08);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Footer buttons */
.footer-links .btn-link {
  font-size: 0.75rem;
  padding: 6px 12px;
}

/* Auth screen footer terms */
.auth-footer-terms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.auth-footer-terms .btn-link {
  font-size: 0.72rem;
  padding: 5px 10px;
}

/* Inline terms buttons in checkbox label */
.terms-inline-link {
  all: unset;
  cursor: pointer;
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.terms-inline-link:hover {
  color: var(--gold2);
}