:root {
  color-scheme: dark;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --bg-outer: radial-gradient(circle at 20% -10%, #3b66f2 0%, transparent 45%),
    radial-gradient(circle at 80% -20%, #ff8a39 0%, transparent 40%),
    radial-gradient(circle at 50% 120%, #301548 0%, transparent 55%), #0f131a;
  --panel: rgba(17, 19, 25, 0.75);
  --panel-strong: rgba(20, 23, 31, 0.85);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f7f8fc;
  --text-subtle: rgba(247, 248, 252, 0.7);
  --gold: #f6c05f;
  --orange: #f4721c;
  --teal: #50f9d3;
  --ring: #151820;
  --radius-xl: clamp(1.5rem, 3vw, 2.75rem);
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --blur-card: 40px;
  --shadow-soft: 0 25px 40px rgba(0, 0, 0, 0.35);
  --shadow-inner: inset 2px 4px 16px rgba(248, 248, 248, 0.06);
  --transition: 240ms cubic-bezier(0.4, 0, 0.2, 1);
  --achievements-bg: url("../img/extracted_images/0e8e5195-7aa2-475d-89a1-5d3e32fafc88");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-outer);
  color: var(--text);
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
  background-image: url("../img/images_gil/e5814168-50b7-4792-8347-4bdc626dfe1b.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("../img/images_gil/e5814168-50b7-4792-8347-4bdc626dfe1b.png");
  background-size: cover;
  background-position: center bottom;
  opacity: 0.08;
  pointer-events: none;
  filter: blur(20px);
  z-index: -1;
}

.page-root {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sidebar {
  width: 96px;
  background: #0b0d14;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 0;
  gap: 24px;
}

.sidebar-logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #151823;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
  border: none;
  cursor: pointer;
  padding: 0;
}

.sidebar-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #151822;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border: none;
  cursor: pointer;
  padding: 0;
}

.sidebar-icon img {
  width: 22px;
  height: 22px;
}

.page {
  flex: 1;
  padding: 0;
  min-height: 100vh;
  position: relative;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.layout {
  width: min(1400px, 100vw - 2rem);
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 3rem) 0 4rem;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: clamp(2rem, 4vw, 4rem);
}

/* .back-link стили теперь берутся из styles.css */

.back-link__icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  position: relative;
}

.back-link__icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ffffff40, #ffffff08);
  border-radius: 50%;
}

.back-link__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: 0.35rem;
  border-top: 2px solid var(--text);
  border-left: 2px solid var(--text);
  transform: rotate(-45deg);
}

.hero__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

.crest-card,
.hero-cta,
.table-card {
  /*background: #e8ece709;*/
  backdrop-filter: blur(var(--blur-card));
  /*border: 1px solid rgba(255, 255, 255, 0.06);*/
  border-radius: var(--radius-xl);
  padding: clamp(1rem, 2vw, 2rem);
  position: relative;
  isolation: isolate;
}

.crest-card__hero {
  display: grid;
  grid-template-columns: minmax(140px, 210px) 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: flex-start;
}

.crest-card__stats {
  width: 100%;
}

.crest-stack {
  position: relative;
  width: clamp(160px, 22vw, 230px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 30px 45px rgba(0, 0, 0, 0.55));
  animation: crestFloat 6s ease-in-out infinite;
}

.crest-stack img {
  width: 88%;
  height: auto;
  border-radius: 32%;
  z-index: 2;
}
span {
  margin-right: 0.3rem; /* or whatever value you need */
}

.crest-stack::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 40%;
  background: url("../img/extracted_images/iloveyou.png") center/cover no-repeat;
  filter: blur(10px) brightness(0.85) saturate(0.9);
  opacity: 0.45;
  z-index: 0;
}

.crest-stack__halo {
  position: absolute;
  inset: 0;
  border-radius: 40%;
  border: 1px solid rgba(255, 188, 87, 0.4);
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.45), rgba(254, 145, 27, 0.2) 55%, transparent);
  z-index: 1;
}

.crest-stack__halo--outer {
  filter: blur(12px);
  animation: haloPulse 5s ease-in-out infinite alternate;
}

.crest-stack__halo--inner {
  inset: 10%;
  border: 2px solid rgba(255, 211, 124, 0.8);
  filter: blur(72px);
  mix-blend-mode: screen;
  animation: haloPulse 6s ease-in-out infinite reverse;
}

.crest-stack__halo--inner::after {
  content: "";
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255, 230, 150, 0.6), rgba(255, 120, 40, 0.2), rgba(255, 230, 150, 0.6), rgba(255, 120, 40, 0.2));
  filter: blur(24px);
  opacity: 0;
  pointer-events: none;
}

.crest-stack:hover .crest-stack__halo--inner {
  border-color: rgba(255, 230, 160, 0.95);
  filter: blur(64px) brightness(1.12);
  animation: haloPulseIntense 2s ease-in-out infinite, sparkleTwinkle 1.8s ease-in-out infinite;
}

.crest-stack:hover .crest-stack__halo--inner::after {
  opacity: 1;
  animation: sparkleSpin 2.2s linear infinite;
}

.crest-card__content {
  display: flex;
  flex-direction: column;
  animation: contentRise 100ms ease-out backwards;
}

.crest-card__stats {
  width: 100%;
}

.crest-card__content h1 {
  font-family: "Oswald", "Manrope", sans-serif;
  font-weight: 600;
  font-size: 34px;
  margin: 0.35rem 0 0;
}

.crest-copy {
  color: rgba(247, 248, 252, 0.75);
  max-width: 36ch;
  margin: 0;
  font-size: 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin: 0;
}

.title-stack {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.badge {
  width: 64px;
  aspect-ratio: 1;
  border-radius: 1rem;
  
  background: url("../img/images_gil/iloveyou.png") center/cover no-repeat;
  color: #4b2c00;
  font-family: "Oswald", sans-serif;
  font-size: 2rem;
  margin-left: -3px;
  display: grid;
  place-items: center;
  font-weight: 700;
  position: relative;
  overflow: hidden;

}

.badge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  mix-blend-mode: screen;
  pointer-events: none;
}

.stat-groups {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 0.1rem;
}

.stat-label {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.token-row {
  display: flex;
  /*gap: 0.5rem;*/
  align-items: center;
  flex-wrap: wrap;
}

.token-row--achievements {
  position: relative;
  /*padding: 0.55rem 0.9rem;*/
}
.token-row--achievements {
position: relative;
}

.token-row--achievements::after {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 14px;
  pointer-events: none;
  mix-blend-mode: screen;
}

.token {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: 14px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-inner);
  animation: float 6s ease-in-out infinite;
}

.has-tooltip {
  position: relative;
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 50;
  width: max-content;
  max-width: 280px;
}

.has-tooltip:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.tooltip__media {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
}

.tooltip__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tooltip__content strong {
  font-family: "Oswald", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.tooltip__content p {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.tooltip--achievements {
  box-shadow: 0 6px 20px rgba(255, 199, 122, 0.24), var(--shadow-soft);
}

.tooltip--bonuses {
  box-shadow: 0 6px 20px rgba(80, 249, 211, 0.24), var(--shadow-soft);
}

.token img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.token:nth-child(2) {
  animation-delay: 0.8s;
}
.token:nth-child(3) {
  animation-delay: 1.6s;
}
.token:nth-child(4) {
  animation-delay: 2.4s;
}
.token:nth-child(5) {
  animation-delay: 3.2s;
}

.token-row--achievements .token {
  background: rgba(35, 17, 7, 0.65);
  border: 1px solid rgba(255, 199, 122, 0.35);
  box-shadow: inset 0 0 12px rgba(255, 233, 188, 0.25), var(--shadow-inner);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 3vw, 3rem);
  position: relative;
  z-index: 2;
}

.hero-cta__art {
  flex: 1;
  display: grid;
  place-items: center;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: visible;
  z-index: 1;
}

.hero-cta__art img {
  width: clamp(200px, 40vw, 400px);
  max-width: 400px;
  object-fit: contain;
  filter: drop-shadow(0 30px 35px rgba(0, 0, 0, 0.5));
  animation: bob 8s ease-in-out infinite;
}

/* Уменьшение конкретного изображения с хешем */
img[src*="be13793a35343079feb79db8e1accb6d98caf969"],
img[srcset*="be13793a35343079feb79db8e1accb6d98caf969"] {
  width: clamp(200px, 40vw, 400px) !important;
  max-width: 400px !important;
  height: auto !important;
  object-fit: contain !important;
}

.primary-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.95rem 3.85rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 0.95rem;
  color: black;
  box-shadow:
    /* Core warm glow */
    0 12px 25px rgba(255, 111, 41, 0.50),
    inset 0 3px 8px rgba(255, 255, 255, 0.35),

    /* Layer 1: deep ambient */
    0 22px 40px rgba(255, 80, 0, 0.22),

    /* Layer 2: mid orange aura */
    0 8px 18px rgba(255, 140, 60, 0.38),

    /* Layer 3: golden halo */
    0 0 22px rgba(255, 190, 90, 0.45),

    /* Layer 4: soft diffusion circle */
    0 0 38px rgba(255, 150, 60, 0.30),

    /* Layer 5: faint wide glow */
    0 0 70px rgba(255, 100, 20, 0.20),

    /* Layer 6: atmospheric bloom */
    0 18px 120px rgba(255, 80, 0, 0.12),

    /* Layer 7: deep orange floor reflection */
    0 35px 65px rgba(255, 70, 0, 0.25),

    /* Layer 8: ultra-soft outer rim */
    0 0 140px rgba(255, 160, 80, 0.15);
  background: linear-gradient(130deg, #e3940b 0%, #ffb74f 42%, #ff6418 85%);
  box-shadow: 0 12px 25px rgba(255, 111, 41, 0.5), inset 0 3px 8px rgba(255, 255, 255, 0.35);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), filter var(--transition);
  animation: igPulse 2.8s ease-in-out infinite;
  flex-shrink: 0;
}

/* Hide mobile button on desktop */
.primary-btn--mobile {
  display: none;
}

.primary-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 120%;
  height: 100%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 45%,
    transparent 90%
  );
  transform: skewX(-20deg);
  transition: opacity 0.4s cubic-bezier(.2,.8,.2,1);
  opacity: 0;
}

/* Hover – unleash the glory */
.primary-btn:hover {
  transform: translateY(-3px) scale(1.03);
  filter: brightness(1.08) saturate(1.25);
  box-shadow:
    0 16px 30px rgba(255, 120, 50, 0.6),
    0 0 18px rgba(255, 180, 90, 0.55),
    inset 0 4px 10px rgba(255, 255, 255, 0.4);
}

/* Hover: shimmer intensifies */
.primary-btn:hover::before {
  opacity: 0.75;
  transform: scale(1.15);
}

/* Hover: streak slides across */
.primary-btn:hover::after {
  opacity: 1;
  animation: streakSlide 1.1s cubic-bezier(.3,.6,.2,1);
}

/* Strobed-ember pulse refinement */
@keyframes igPulse {
  0%   { filter: brightness(0.98); }
  50%  { filter: brightness(1.18); }
  100% { filter: brightness(0.98); }
}

/* Streak animation */
@keyframes streakSlide {
  0%   { left: -150%; }
  100% { left: 150%; }
}

.table-shell {
  width: 100%;
  cursor: pointer;
  margin-top: -300px;
  position: relative;
  z-index: 2;
}

/* Исправление для десктопной версии - отображение как на скриншоте */
@media (min-width: 1001px) {
  /* Hero секция */
  .hero {
    margin-bottom: 2rem;
    padding-bottom: 0;
    position: relative;
    z-index: 1;
    min-height: 400px;
  }

  /* Hero grid - персонажи справа */
  .hero__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    overflow: visible;
    position: relative;
  }

  /* Левая часть - crest-card */
  .crest-card {
    grid-column: 1;
    position: relative;
    z-index: 2;
  }

  /* Правая часть - персонажи (не влияют на высоту) */
  .hero-cta {
    grid-column: 2;
    position: relative;
    height: 0;
    min-height: 0;
    overflow: visible;
    z-index: 1;
  }

  /* Персонажи абсолютно позиционированы, не влияют на поток */
  .hero-cta__art {
    position: absolute;
    right: 0;
    top: 0;
    bottom: auto;
    width: auto;
    height: auto;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    overflow: visible;
    z-index: 1;
    pointer-events: none;
  }

  .hero-cta__art img {
    width: clamp(500px, 60vw, 700px) !important;
    max-width: 700px !important;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 30px 35px rgba(0, 0, 0, 0.5));
    animation: bob 8s ease-in-out infinite;
    transform: translateY(0);
  }

  /* Таблица начинается после hero с правильным отступом */
  .table-shell {
    margin-top: -120px !important;
    margin-bottom: 2rem;
    padding: 0;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: min(1400px, 100vw - 2rem);
    margin-left: auto;
    margin-right: auto;
  }

  .table-card {
    max-width: 100%;
    margin: 0;
    padding: clamp(1rem, 2vw, 2rem) clamp(1rem, 2vw, 2.5rem);
    position: relative;
    z-index: 2;
  }

  /* Кнопка справа, выше таблицы */
  .table-card__action {
    position: absolute;
    top: -70px;
    right: clamp(1rem, 2vw, 2.5rem);
    margin-bottom: 0;
    width: auto;
    display: inline-block;
    z-index: 3;
  }

  /* Заголовки таблицы в uppercase */
  .table-card__head {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
  }
}

.table-card {
  padding: clamp(1rem, 2vw, 2rem) clamp(1rem, 2vw, 2.5rem);
  position: relative;
  z-index: 2;
}

.table-card__action {
  position: absolute;
  top: -62px;
  right: clamp(1rem, 2vw, 2.5rem);
  z-index: 3;
}

.table-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  mix-blend-mode: screen;
}

.table-card__head {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 80px;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  padding: 0 0.5rem 0.75rem;
}

.table-card__head span:last-child {
  text-align: right;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.05rem;
}

tbody tr {
  background: linear-gradient(120deg, rgba(162, 171, 229, 0.018), rgba(135, 153, 234, 0.005));
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 35px rgba(255, 255, 255, 0.045);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

tbody tr:hover {
  transform: translateY(-4px);
  background: linear-gradient(120deg, rgba(162, 171, 229, 0.18), rgba(135, 153, 234, 0.005));
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 1px 25px rgba(177, 186, 223, 0.129);
}

td {
  padding: 1rem 0.75rem;
}

td:first-child {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
  flex-shrink: 0;
  background: #1d2233;
}

.avatar:hover {
  color: #e3940b;
}

.player-name {
  display: flex;
  flex-direction: column;
}

.player-name strong {
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.04em;
  font-size: 1rem;
}

.player-name span {
  color: var(--text-subtle);
  font-size: 0.78rem;
}

td:nth-child(2) {
  text-align: center;
  font-weight: 700;
  color: #f8f8f8ca;
}

.action-cell {
  text-align: left;
  display: flex;
  align-items: center;
      flex-direction: row-reverse;
}

.view-btn {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: background var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.view-btn svg {
  width: 22px;
  height: 22px;
}

.view-btn::after {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.view-btn:hover {
  transform: translateY(-1px) scale(1.05);
  background: rgba(255, 255, 255, 0.12);
}

.view-btn:hover::after {
  opacity: 1;
}

.view-btn.ping::after {
  animation: pulseRing 600ms ease-out;
}

@keyframes pulseRing {
  0% {
    opacity: 1;
    transform: scale(0.3);
  }
  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse {
  from {
    opacity: 0.4;
    transform: scale(0.95);
  }
  to {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes bob {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes wantedGlow {
  0% {
    box-shadow: inset 0 2px 14px rgba(255, 206, 143, 0.2), 0 12px 30px rgba(9, 5, 2, 0.55);
    filter: brightness(1);
  }
  50% {
    box-shadow: inset 0 4px 18px rgba(255, 228, 170, 0.45), 0 16px 40px rgba(9, 5, 2, 0.75);
    filter: brightness(1.08);
  }
  100% {
    box-shadow: inset 0 2px 14px rgba(255, 206, 143, 0.2), 0 12px 30px rgba(9, 5, 2, 0.55);
    filter: brightness(1);
  }
}

@keyframes crestFloat {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-6px) rotate(-1deg);
  }
  100% {
    transform: translateY(0) rotate(0.6deg);
  }
}

@keyframes haloPulse {
  from {
    opacity: 0.55;
    transform: scale(0.98);
  }
  to {
    opacity: 0.95;
    transform: scale(1.05);
  }
}

@keyframes haloPulseIntense {
  0% {
    opacity: 0.7;
    transform: scale(0.96);
    box-shadow: 0 0 24px rgba(255, 190, 90, 0.35), 0 0 60px rgba(255, 120, 40, 0.22);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 0 36px rgba(255, 205, 110, 0.55), 0 0 90px rgba(255, 140, 60, 0.32);
  }
  100% {
    opacity: 0.85;
    transform: scale(1.02);
    box-shadow: 0 0 28px rgba(255, 190, 90, 0.4), 0 0 70px rgba(255, 120, 40, 0.26);
  }
}

@keyframes sparkleSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.06); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes sparkleTwinkle {
  0%, 100% { filter: blur(64px) brightness(1.05); }
  50% { filter: blur(56px) brightness(1.25); }
}

@keyframes contentRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes igPulse {
  0% {
    box-shadow: 0 8px 20px rgba(255, 111, 41, 0.45), inset 0 3px 8px rgba(255, 255, 255, 0.35);
  }
  50% {
    box-shadow: 0 16px 28px rgba(255, 111, 41, 0.65), inset 0 5px 12px rgba(255, 255, 255, 0.5);
  }
  100% {
    box-shadow: 0 8px 20px rgba(255, 111, 41, 0.45), inset 0 3px 8px rgba(255, 255, 255, 0.35);
  }
}

@keyframes igSweep {
  0% {
    transform: translateX(-130%);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  100% {
    transform: translateX(130%);
    opacity: 0;
  }
}

@media (max-width: 720px) {
  /* Body Mobile Adjustments */
  body {
    background: rgba(21, 24, 34, 1);
    background-image: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  body::after {
    display: none;
  }

  /* Smooth Scrolling */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  /* Page Root Mobile */
  .page-root {
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* Main Page Mobile */
  .page {
    padding: 0;
    overflow-x: hidden;
    padding-bottom: 2rem;
  }

  /* Hero Section Mobile Improvements */
  .hero {
    margin-bottom: 0 !important;
    padding: 0 1rem 0;
    margin-top: 0.5rem;
    gap: 0;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0;
  }

  .crest-card {
    display: flex;
    flex-direction: column;
  }

  .crest-card__hero {
    display: grid;
  }

  .hero header {
    margin-bottom: 0;
  }

  /* Crest Card Mobile Layout - Vertical Layout */
  .crest-card {
    padding: 1.5rem 1rem;
    border-radius: 0;
    background: rgba(21, 24, 34, 1);
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
  }

  .crest-card__hero {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
    align-items: flex-start;
    text-align: left;
  }

  .crest-stack {
    grid-column: 1;
    grid-row: 1;
    width: clamp(70px, 18vw, 100px);
    flex-shrink: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
  }

  .crest-card__content {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    flex: 1;
    min-width: 0;
    width: 100%;
    padding-bottom: 0;
    justify-content: flex-start;
    position: relative;
  }

  /* Separate stats block from title - positioned under crest-stack */
  .crest-card__stats {
    grid-column: 1;
    grid-row: 2;
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
    justify-self: start;
    width: fit-content;
    max-width: 100%;
  }

  .crest-card__content h1 {
    font-size: clamp(20px, 5vw, 26px);
    margin: 0;
    line-height: 1.2;
    font-weight: 600;
  }

  .title-stack {
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    margin-bottom: 0;
    align-self: flex-start;
  }



  .badge {
    width: clamp(44px, 11vw, 52px);
    height: clamp(44px, 11vw, 52px);
    font-size: clamp(1.4rem, 3.5vw, 1.6rem);
    flex-shrink: 0;
    margin-left: 0;
  }

  /* Stat Groups Mobile - Compact Layout */
  .stat-groups {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 1rem;
    align-items: flex-start;
    width: 100%;
    justify-items: start;
  }

  .stat-groups > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .stat-groups > div:first-child {
    align-items: flex-start;
    margin-bottom: 0;
  }

  .stat-groups > div:first-child .stat-label {
    align-self: flex-start;
  }

  .stat-groups > div:first-child .token-row {
    justify-content: flex-start;
    align-self: flex-start;
  }

  .stat-label {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
    text-align: left;
    font-weight: 600;
    color: rgba(247, 248, 252, 0.8);
    letter-spacing: 0.05em;
    align-self: flex-start;
    width: 100%;
  }

  .token-row {
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
    width: 100%;
  }

  .token-row--achievements,
  .token-row--bonuses {
    padding: 0;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .token {
    width: clamp(48px, 12vw, 56px);
    height: clamp(48px, 12vw, 56px);
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
  }

  .guild-row {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .guild-row .stat-label {
    align-self: flex-start;
    width: 100%;
  }

  .guild-row .token-row {
    justify-content: flex-start;
    align-self: flex-start;
    width: 100%;
  }

  /* Touch-friendly interactive elements */
  .token,
  .view-btn,
  .primary-btn,
  .header-circle,
  .back-link {
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    touch-action: manipulation;
  }

  /* Hero CTA Mobile - Hide illustration */
  .hero-cta {
    display: none !important;
    height: 0;
    margin: 0;
    padding: 0;
  }

  /* Mobile Join Button in Hero */
  .crest-card__stats .primary-btn--mobile {
    display: block !important;
    width: 100%;
    max-width: 320px;
    margin: 1.5rem auto 0;
    padding: 0.95rem 2rem;
    font-size: 0.9rem;
    text-align: center;
    border-radius: 999px;
    letter-spacing: 0.15em;
    align-self: center;
    box-shadow: 
      0 10px 20px rgba(255, 111, 41, 0.55),
      inset 0 3px 8px rgba(255, 255, 255, 0.35),
      0 0 25px rgba(255, 140, 60, 0.45);
  }

  .primary-btn--mobile:active {
    transform: scale(0.98);
  }

  /* Hide desktop button in table on mobile */
  .table-card__action {
    display: none !important;
  }

  /* Table Card Mobile */
  .table-shell {
    margin-top: 1rem !important;
    padding: 0 1rem;
    position: relative;
    z-index: 3;
    pointer-events: none;
  }

  .table-card {
    padding: 1.25rem 1rem;
    border-radius: clamp(1rem, 3vw, 1.5rem);
    background: rgba(21, 24, 34, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-top: 0;
  }


  .table-card__head {
    display: grid;
    grid-template-columns: 2fr 1fr 80px;
    font-size: 0.7rem;
    padding: 0 0.5rem 1rem;
    color: rgba(247, 248, 252, 0.7);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .table-card__head span:nth-child(2) {
    text-align: center;
  }

  .table-card__head span:last-child {
    text-align: right;
  }

  /* Table Rows Mobile */
  table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
  }

  tbody tr {
    display: table-row;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
  }

  tbody tr:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  tbody tr td {
    background: transparent;
  }

  td {
    padding: 0.875rem 0.5rem;
    vertical-align: middle;
  }

  td:first-child {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0.5rem;
  }

  td:first-child > div:first-child {
    position: relative;
    flex-shrink: 0;
  }

  td:nth-child(2) {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(247, 248, 252, 0.9);
  }

  .action-cell {
    text-align: center;
    padding-right: 0.5rem;
  }

  .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    flex-shrink: 0;
    display: block;
  }

  .player-name {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
  }

  .player-name strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ff8a3c;
    line-height: 1.2;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .player-name span {
    font-size: 0.7rem;
    color: rgba(247, 248, 252, 0.6);
    font-weight: 400;
  }

  .view-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 auto;
  }

  .view-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .view-btn svg {
    width: 20px;
    height: 20px;
    color: rgba(247, 248, 252, 0.8);
  }

  .view-btn svg {
    width: 20px;
    height: 20px;
  }

  /* Tooltip Mobile */
  .tooltip {
    transform: translateX(-50%) translateY(8px);
    padding: 0.5rem 0.6rem;
    max-width: 240px;
  }

  .tooltip__content strong {
    font-size: 0.8rem;
  }

  .tooltip__content p {
    font-size: 0.75rem;
  }

  /* Back Link Mobile */
  .back-link {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .back-link img {
    width: 16px;
    height: 16px;
  }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
  .hero {
    padding: 0 0.75rem;
  }

  .crest-card {
    padding: 0.875rem 0.625rem 1.25rem;
  }

  .crest-card__hero {
    gap: 0.625rem;
  }

  .crest-stack {
    width: clamp(45px, 12vw, 55px);
  }

  .crest-card__content h1 {
    font-size: 16px;
  }

  .badge {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .stat-groups {
    gap: 0.625rem;
    margin-top: 0.5rem;
  }

  .stat-label {
    font-size: 0.6rem;
    margin-bottom: 0.3rem;
  }

  .token {
    width: 34px;
    height: 34px;
  }

  .primary-btn--mobile {
    margin-top: 0.875rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
  }

  .hero-cta__art {
    min-height: 250px;
  }

  /* Уменьшение изображения с хешем на мобильных */
  img[src*="be13793a35343079feb79db8e1accb6d98caf969"],
  img[srcset*="be13793a35343079feb79db8e1accb6d98caf969"] {
    width: clamp(150px, 35vw, 300px) !important;
    max-width: 300px !important;
  }

  .table-shell {
    margin-top: 0 !important;
  }

  .table-card {
    padding: 1rem 0.75rem;
  }

  .table-card__head {
    font-size: 0.6rem;
  }

  tbody tr {
    padding: 0.65rem;
  }

  .avatar {
    width: 36px;
    height: 36px;
  }

  .player-name strong {
    font-size: 0.85rem;
  }

  .view-btn {
    width: 40px;
    height: 40px;
  }

  .table-card__head {
    font-size: 0.6rem;
  }

  tbody tr {
    padding: 0.65rem;
  }

  .avatar {
    width: 36px;
    height: 36px;
  }

  .player-name strong {
    font-size: 0.85rem;
  }

  .player-name span {
    font-size: 0.68rem;
  }

  .view-btn {
    width: 40px;
    height: 40px;
  }

  .view-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* Very Small Mobile Devices */
@media (max-width: 360px) {
  .hero {
    padding: 0 0.5rem;
  }

  .crest-card {
    padding: 1rem;
  }

  .crest-card__content h1 {
    font-size: 20px;
  }

  .badge {
    width: 40px;
    font-size: 1.4rem;
  }

  .token {
    width: 38px;
    height: 38px;
  }

  .table-card {
    padding: 0.875rem 0.5rem;
  }

  .table-card__action {
    padding: 0.8rem 1.25rem;
    font-size: 0.8rem;
  }

  .table-card__head {
    font-size: 0.58rem;
  }

  .avatar {
    width: 34px;
    height: 34px;
  }

  .player-name strong {
    font-size: 0.8rem;
  }

  .player-name span {
    font-size: 0.65rem;
  }

  .view-btn {
    width: 38px;
    height: 38px;
  }

  .view-btn svg {
    width: 16px;
    height: 16px;
  }

  .casino-header.topbar {
    padding: 6px 8px;
  }

  .back-link {
    padding: 6px 8px;
    font-size: 10px;
  }

  .header-circle {
    width: 26px;
    height: 26px;
  }

  .header-circle img {
    width: 26px;
    height: 26px;
  }
}

/* =========================================
   GIFT MODAL
   ========================================= */

.gift-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.gift-modal.active {
  display: flex;
  opacity: 1;
}

.gift-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.gift-modal__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  background: url("../img/extracted_images/bandana.png") center / cover no-repeat;
  border-radius: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3rem);
  box-shadow: 
    0 35px 70px rgba(0, 0, 0, 0.6),
    0 0 100px rgba(255, 140, 60, 0.4),
    inset 0 2px 6px rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
  animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform: scale(0.85) translateY(30px);
}

.gift-modal__content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 213, 116, 0.3) 0%,
    rgba(255, 195, 71, 0.2) 50%,
    rgba(255, 163, 66, 0.1) 100%
  );
  pointer-events: none;
  opacity: 0.4;
  border-radius: inherit;
}

.gift-modal__content::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 60%,
    rgba(0, 0, 0, 0.2) 100%
  );
  pointer-events: none;
  border-radius: inherit;
}

.gift-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 10;
  padding: 0;
}

.gift-modal__close svg {
  width: 20px;
  height: 20px;
}

.gift-modal__close:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: rotate(90deg) scale(1.1);
}

.gift-modal__header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.gift-modal__title {
  font-family: "Oswald", "Manrope", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: white;
  margin: 0;
  text-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 255, 255, 0.2);
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.gift-modal__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 600;
  color: white;
  margin: 0.5rem 0 1rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.gift-modal__bandana {
  position: relative;
  width: 240px;
  height: 260px;
  margin: 2.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.gift-modal__bandana-glow {
  position: absolute;
  inset: -50%;
  background: radial-gradient(
    circle,
    rgba(255, 240, 160, 0.9) 0%,
    rgba(255, 200, 100, 0.7) 25%,
    rgba(255, 160, 60, 0.4) 50%,
    rgba(255, 120, 30, 0.2) 75%,
    transparent 100%
  );
  animation: glowPulse 3s ease-in-out infinite;
  filter: blur(25px);
  z-index: 1;
}

.gift-modal__bandana-rays {
  position: absolute;
  inset: -40%;
  z-index: 0;
  pointer-events: none;
}

.gift-modal__bandana-rays .ray {
  position: absolute;
  width: 4px;
  height: 150px;
  background: linear-gradient(
    to bottom,
    rgba(255, 240, 180, 0.9) 0%,
    rgba(255, 200, 120, 0.6) 30%,
    rgba(255, 160, 60, 0.3) 60%,
    transparent 100%
  );
  border-radius: 2px;
  top: 50%;
  left: 50%;
  transform-origin: center bottom;
  filter: blur(2px);
  animation: rayPulse 2.5s ease-in-out infinite;
}

.gift-modal__bandana-rays .ray-1 {
  transform: translate(-50%, -50%) rotate(0deg) translateY(-80px);
  animation-delay: 0s;
}

.gift-modal__bandana-rays .ray-2 {
  transform: translate(-50%, -50%) rotate(45deg) translateY(-80px);
  animation-delay: 0.3s;
}

.gift-modal__bandana-rays .ray-3 {
  transform: translate(-50%, -50%) rotate(90deg) translateY(-80px);
  animation-delay: 0.6s;
}

.gift-modal__bandana-rays .ray-4 {
  transform: translate(-50%, -50%) rotate(135deg) translateY(-80px);
  animation-delay: 0.9s;
}

.gift-modal__bandana-rays .ray-5 {
  transform: translate(-50%, -50%) rotate(180deg) translateY(-80px);
  animation-delay: 1.2s;
}

.gift-modal__bandana-rays .ray-6 {
  transform: translate(-50%, -50%) rotate(225deg) translateY(-80px);
  animation-delay: 1.5s;
}

.gift-modal__bandana-rays .ray-7 {
  transform: translate(-50%, -50%) rotate(270deg) translateY(-80px);
  animation-delay: 1.8s;
}

.gift-modal__bandana-rays .ray-8 {
  transform: translate(-50%, -50%) rotate(315deg) translateY(-80px);
  animation-delay: 2.1s;
}

.gift-modal__bandana-image {
  width: 100%;
  height: 100%;
  max-width: 240px;
  max-height: 260px;
  object-fit: contain;
  position: relative;
  z-index: 4;
  animation: bandanaFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.6));
}

.gift-modal__sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}

.gift-modal__sparkles .sparkle {
  position: absolute;
  font-size: 1.75rem;
  animation: sparkleFloat 3s ease-in-out infinite;
  opacity: 0.9;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

.gift-modal__sparkles .sparkle-1 {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}

.gift-modal__sparkles .sparkle-2 {
  top: 30%;
  right: 15%;
  animation-delay: 0.6s;
}

.gift-modal__sparkles .sparkle-3 {
  bottom: 20%;
  left: 10%;
  animation-delay: 1.2s;
}

.gift-modal__sparkles .sparkle-4 {
  bottom: 15%;
  right: 25%;
  animation-delay: 1.8s;
}

.gift-modal__sparkles .sparkle-5 {
  top: 50%;
  left: 50%;
  animation-delay: 2.4s;
}

.gift-modal__item-name {
  text-align: center;
  font-family: "Oswald", "Manrope", sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #f6c05f;
  margin: 1.5rem 0 2rem;
  text-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(246, 192, 95, 0.7),
    0 0 40px rgba(246, 192, 95, 0.4);
  letter-spacing: 0.08em;
  position: relative;
  z-index: 2;
}

.gift-modal__upgrade-btn {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  display: block;
  padding: 1.1rem 2.5rem;
  background: linear-gradient(130deg, #e3940b 0%, #ffb74f 42%, #ff6418 85%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: white;
  font-family: "Oswald", "Manrope", sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  cursor: pointer;
  box-shadow: 
    0 12px 25px rgba(255, 111, 41, 0.5),
    inset 0 3px 8px rgba(255, 255, 255, 0.35),
    0 0 30px rgba(255, 140, 60, 0.4);
  transition: all var(--transition);
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.gift-modal__upgrade-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, #ffa420 0%, #ffc85f 42%, #ff7f28 85%);
  opacity: 0;
  transition: opacity var(--transition);
}

.gift-modal__upgrade-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 16px 35px rgba(255, 120, 50, 0.6),
    inset 0 4px 10px rgba(255, 255, 255, 0.4),
    0 0 40px rgba(255, 160, 80, 0.5);
}

.gift-modal__upgrade-btn:hover::before {
  opacity: 1;
}

.gift-modal__upgrade-btn:active {
  transform: translateY(-1px) scale(0.98);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.1);
  }
}

@keyframes bandanaFloat {
  0%, 100% {
    transform: rotate(-15deg) translateY(0);
  }
  50% {
    transform: rotate(-15deg) translateY(-10px);
  }
}

@keyframes sparkleFloat {
  0%, 100% {
    opacity: 0;
    transform: scale(0.5) translateY(0);
  }
  50% {
    opacity: 1;
    transform: scale(1.2) translateY(-15px);
  }
}

@keyframes rayPulse {
  0%, 100% {
    opacity: 0.4;
    transform: scaleY(0.8);
  }
  50% {
    opacity: 0.9;
    transform: scaleY(1.2);
  }
}

/* Mobile styles for gift modal */
@media (max-width: 720px) {
  .gift-modal__content {
    max-width: 90%;
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 1.5rem);
    border-radius: clamp(1.5rem, 3vw, 2rem);
  }

  .gift-modal__close {
    width: 36px;
    height: 36px;
    top: 0.75rem;
    right: 0.75rem;
  }

  .gift-modal__close svg {
    width: 18px;
    height: 18px;
  }

  .gift-modal__bandana {
    width: 160px;
    height: 180px;
    margin: 1.5rem auto;
  }

  .gift-modal__bandana-body {
    width: 130px;
    height: 150px;
  }

  .gift-modal__bandana-knot {
    width: 40px;
    height: 40px;
    top: -12px;
  }

  .gift-modal__bandana-knot::before {
    width: 24px;
    height: 24px;
  }

  .gift-modal__sparkles .sparkle {
    font-size: 1.2rem;
  }

  .gift-modal__upgrade-btn {
    padding: 1rem 2rem;
    font-size: 0.95rem;
  }
}

/* =============================================== */
/* HEADER STYLES для index_gil.html               */
/* =============================================== */

.topbar,
.casino-header.topbar {
  position: relative;
  width: 100%;
  margin: 0 0 0 0 !important;
  padding: 16px 24px !important;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  gap: 8px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  text-transform: uppercase;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  background-color: #151822;
  color: #fff;
  font-style: normal;
  text-decoration: none;
  transition: all 0.2s ease;
}

.back-link:hover {
  background-color: #1a1d2a;
}

.back-link img {
  width: 20px;
  height: 20px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-right-desktop {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-right-mobile {
  display: none;
  align-items: center;
  gap: 8px;
}

.header-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.9);
}

.header-circle:hover {
  opacity: 0.8;
}

.header-circle img {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

.header-circle--badge {
  position: relative;
}

.header-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  padding: 0 4px;
  height: 18px;
  border-radius: 999px;
  background: #ff4d4f;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* Desktop Header Right Section Styles */
.header-user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 20px;
  transition: background 0.2s;
}

.header-user-profile:hover {
  background: rgba(255, 255, 255, 0.05);
}

.header-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  background: #ff8a3c;
}

.header-username-text {
  font-size: 14px;
  font-weight: 600;
  color: #ff8a3c;
  font-family: "Manrope", system, sans-serif;
}

.header-dropdown-icon {
  flex-shrink: 0;
  margin-left: 2px;
}

.header-separator {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.header-currency {
  display: flex;
  align-items: center;
  gap: 10px;
}

.currency-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.currency-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.currency-icon--coin {
  filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.3));
}

.currency-icon--gem {
  filter: drop-shadow(0 2px 4px rgba(0, 200, 83, 0.3));
}

.currency-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.currency-label {
  font-size: 10px;
  color: #9ca0b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  font-weight: 500;
}

.currency-name {
  font-size: 12px;
  color: #ff8a3c;
  font-weight: 600;
  line-height: 1.2;
  font-family: "Manrope", system, sans-serif;
}

.currency-value {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.header-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
  flex-shrink: 0;
}

.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.header-icon-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.header-icon-btn--badge .header-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #4A90E2;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 12px;
  min-width: 24px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #000;
  box-shadow: 0 2px 4px rgba(74, 144, 226, 0.4);
}

.header-deposit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: linear-gradient(135deg, #ff8a3c, #ffc344);
  color: #2a1304;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 24px rgba(255, 138, 60, 0.35);
  white-space: nowrap;
  font-family: "Manrope", system, sans-serif;
}

.header-deposit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 138, 60, 0.5);
}

.header-deposit-btn svg {
  flex-shrink: 0;
}

.header-trophy {
  background: rgba(255, 255, 255, 0.06);
}

/* Bottom navigation (hidden by default, shown on mobile) */
.bottom-nav {
  display: none;
}

.bottom-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bottom-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.bottom-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #ff8a3c, #ffc344);
}

.bottom-btn.is-active img {
  opacity: 1;
  filter: brightness(0) invert(1);
}

/* Media Queries */
@media (max-width: 1000px) {
  .page-root {
    flex-direction: column;
  }

  .sidebar {
    display: none;
  }

  .page {
    padding: 0;
  }

  .topbar,
  .casino-header.topbar {
    position: relative;
    width: 100%;
    margin: 0 0 0 0 !important;
    padding: 12px 16px !important;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-sizing: border-box;
  }

  .topbar-right {
    display: none;
  }

  .header-right-desktop {
    display: none !important;
  }
  
  .header-right-mobile {
    display: flex !important;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
  }

  .header-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.9);
  }

  .header-circle img {
    width: 35px;
    height: 35px;
    object-fit: contain;
  }

  .header-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    padding: 0 4px;
    height: 18px;
    border-radius: 999px;
    background: #ff4d4f;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
  }
  
  /* Кнопка BACK для мобильных - увеличенная */
  .back-link {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
    white-space: nowrap;
    letter-spacing: 0.05em;
  }
  
  .back-link img {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }
  
  /* На очень маленьких экранах показываем только иконку */
  @media (max-width: 360px) {
    .back-link {
      padding: 10px;
      font-size: 0;
      gap: 0;
      width: 44px;
      height: 44px;
      justify-content: center;
    }
    
    .back-link img {
      width: 18px;
      height: 18px;
    }
  }

  /* Show bottom navigation on mobile */
  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    justify-content: space-around;
    gap: 6px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(7, 9, 16, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
  }
}

@media (min-width: 1024px) {
  .header-right-mobile {
    display: none !important;
  }

  .header-right-desktop {
    display: flex !important;
    gap: 16px;
  }

  .sidebar {
    display: flex !important;
  }
}

/* =========================================
   WELCOME CLUB POPUP
   ========================================= */

.welcome-club-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.welcome-club-popup.active {
  display: flex;
  opacity: 1;
}

.welcome-club-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.welcome-club-popup__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1000px;
  background: url("../img/bg-modal-gil.png") center / contain no-repeat;
  background-size: cover;
  border-radius: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3rem);
  box-shadow: 
    0 35px 70px rgba(0, 0, 0, 0.6),
    0 0 100px rgba(255, 140, 60, 0.4),
    inset 0 2px 6px rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
  animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform: scale(0.85) translateY(30px);
  min-height: 600px;
}

.welcome-club-popup__content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 213, 116, 0.3) 0%,
    rgba(255, 195, 71, 0.2) 50%,
    rgba(255, 163, 66, 0.1) 100%
  );
  pointer-events: none;
  opacity: 0.4;
  border-radius: inherit;
}

.welcome-club-popup__content::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 60%,
    rgba(0, 0, 0, 0.2) 100%
  );
  pointer-events: none;
  border-radius: inherit;
}

.welcome-club-popup__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 10;
  padding: 0;
}

.welcome-club-popup__close svg {
  width: 20px;
  height: 20px;
}

.welcome-club-popup__close:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: rotate(90deg) scale(1.1);
}


.welcome-club-popup__header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.welcome-club-popup__title {
  font-family: "Oswald", "Manrope", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: white;
  margin: 0;
  text-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 255, 255, 0.2);
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.welcome-club-popup__title-accent {
  color: #f6c05f;
  text-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(246, 192, 95, 0.5);
}

.welcome-club-popup__emblem {
  position: relative;
  width: 240px;
  height: 260px;
  margin: 2.5rem auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.welcome-club-popup__emblem-glow {
  position: absolute;
  inset: -50%;
  background: radial-gradient(
    circle,
    rgba(255, 240, 160, 0.9) 0%,
    rgba(255, 200, 100, 0.7) 25%,
    rgba(255, 160, 60, 0.4) 50%,
    rgba(255, 120, 30, 0.2) 75%,
    transparent 100%
  );
  animation: glowPulse 3s ease-in-out infinite;
  filter: blur(25px);
  z-index: 1;
}

.welcome-club-popup__emblem-rays {
  position: absolute;
  inset: -40%;
  z-index: 0;
  pointer-events: none;
}

.welcome-club-popup__emblem-rays .ray {
  position: absolute;
  width: 4px;
  height: 150px;
  background: linear-gradient(
    to bottom,
    rgba(255, 240, 180, 0.9) 0%,
    rgba(255, 200, 120, 0.6) 30%,
    rgba(255, 160, 60, 0.3) 60%,
    transparent 100%
  );
  border-radius: 2px;
  top: 50%;
  left: 50%;
  transform-origin: center bottom;
  filter: blur(2px);
  animation: rayPulse 2.5s ease-in-out infinite;
}

.welcome-club-popup__emblem-rays .ray-1 {
  transform: translate(-50%, -50%) rotate(0deg) translateY(-80px);
  animation-delay: 0s;
}

.welcome-club-popup__emblem-rays .ray-2 {
  transform: translate(-50%, -50%) rotate(45deg) translateY(-80px);
  animation-delay: 0.3s;
}

.welcome-club-popup__emblem-rays .ray-3 {
  transform: translate(-50%, -50%) rotate(90deg) translateY(-80px);
  animation-delay: 0.6s;
}

.welcome-club-popup__emblem-rays .ray-4 {
  transform: translate(-50%, -50%) rotate(135deg) translateY(-80px);
  animation-delay: 0.9s;
}

.welcome-club-popup__emblem-rays .ray-5 {
  transform: translate(-50%, -50%) rotate(180deg) translateY(-80px);
  animation-delay: 1.2s;
}

.welcome-club-popup__emblem-rays .ray-6 {
  transform: translate(-50%, -50%) rotate(225deg) translateY(-80px);
  animation-delay: 1.5s;
}

.welcome-club-popup__emblem-rays .ray-7 {
  transform: translate(-50%, -50%) rotate(270deg) translateY(-80px);
  animation-delay: 1.8s;
}

.welcome-club-popup__emblem-rays .ray-8 {
  transform: translate(-50%, -50%) rotate(315deg) translateY(-80px);
  animation-delay: 2.1s;
}

.welcome-club-popup__eagle {
  width: 100%;
  height: auto;
  max-width: 240px;
  max-height: 260px;
  object-fit: contain;
  position: relative;
  z-index: 4;
  animation: bandanaFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.6));
}

.welcome-club-popup__subtitle {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  color: white;
  margin: 0.25rem 0 1rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  text-align: center;
  position: relative;
  z-index: 2;
  font-family: "Oswald", "Manrope", sans-serif;
  letter-spacing: 0.1em;
}

.welcome-club-popup__currency {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  position: relative;
  z-index: 2;
}

.welcome-club-popup__coin-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.5));
}

.welcome-club-popup__amount {
  font-family: "Oswald", "Manrope", sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #f6c05f;
  text-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(246, 192, 95, 0.7),
    0 0 40px rgba(246, 192, 95, 0.4);
  letter-spacing: 0.05em;
}

.welcome-club-popup__btn {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  display: block;
  padding: 1.1rem 2.5rem;
  background: linear-gradient(130deg, #e3940b 0%, #ffb74f 42%, #ff6418 85%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: black !important;
  font-family: "Oswald", "Manrope", sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  cursor: pointer;
  box-shadow: 
    0 12px 25px rgba(255, 111, 41, 0.5),
    inset 0 3px 8px rgba(255, 255, 255, 0.35),
    0 0 30px rgba(255, 140, 60, 0.4);
  transition: all var(--transition);
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.welcome-club-popup__btn > * {
  position: relative;
  z-index: 1;
}

.welcome-club-popup__btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, #ffa420 0%, #ffc85f 42%, #ff7f28 85%);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: -1;
}

.welcome-club-popup__btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 16px 35px rgba(255, 120, 50, 0.6),
    inset 0 4px 10px rgba(255, 255, 255, 0.4),
    0 0 40px rgba(255, 160, 80, 0.5);
}

.welcome-club-popup__btn:hover::before {
  opacity: 1;
}

.welcome-club-popup__btn:active {
  transform: translateY(-1px) scale(0.98);
}



/* Mobile styles for welcome club popup */
@media (max-width: 720px) {
  .welcome-club-popup__content {
    max-width: 95%;
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 1.5rem);
    border-radius: clamp(1.5rem, 3vw, 2rem);
    min-height: 500px;
  }

  .welcome-club-popup__close {
    width: 36px;
    height: 36px;
    top: 1.25rem;
    right: 1.25rem;
  }

  .welcome-club-popup__close svg {
    width: 18px;
    height: 18px;
  }

  .welcome-club-popup__header {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .welcome-club-popup__title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    line-height: 1.3;
    padding: 0 3rem;
  }

  .welcome-club-popup__header {
    margin-top: 0;
  }

  .welcome-club-popup__emblem {
    width: 160px;
    height: 180px;
    margin: 1.5rem auto;
  }

  .welcome-club-popup__eagle {
    max-width: 160px;
    max-height: 180px;
  }

  .welcome-club-popup__btn {
    padding: 1rem 2rem;
    font-size: 0.95rem;
  }
}
