/* ===================================================
   Telegram Stars & Premium - Dark Space Design v3
=================================================== */

:root {
  --tg-bg: #07080f;
  --tg-bg2: #0b0d1a;
  --tg-panel: rgba(255,255,255,0.05);
  --tg-border: rgba(42,171,238,0.18);
  --tg-blue: #2aabee;
  --tg-blue2: #5bc4f7;
  --tg-gold: #f5c842;
  --tg-gold2: #ffdf6b;
  --tg-purple: #9b59f5;
  --tg-purple2: #b983ff;
  --tg-text: #e8f4ff;
  --tg-muted: #7a9ab5;
  --tg-r-common: #7b8fa3;
  --tg-r-rare: #2aabee;
  --tg-r-epic: #9b59f5;
  --tg-r-legendary: #f5c842;
  --tg-r-arcane: #ff5e6e;
}

html.landing-telegram,
html.landing-telegram body {
  min-height: 100%;
  margin: 0;
  background: var(--tg-bg) !important;
  color: var(--tg-text);
}
html.landing-telegram body { display: block; font-family: "Roboto", system-ui, sans-serif; }
html.landing-telegram .tg-page { position: relative; min-height: 100dvh; overflow-x: hidden; }

html.landing-telegram .tg-glow { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
html.landing-telegram .tg-glow-orb { position: absolute; border-radius: 50%; filter: blur(70px); animation: tg-orb-float 16s ease-in-out infinite alternate; }
html.landing-telegram .tg-glow-orb--1 { width: 340px; height: 340px; top: -5%; left: 10%; background: rgba(42,171,238,0.12); }
html.landing-telegram .tg-glow-orb--2 { width: 300px; height: 300px; top: 30%; right: -5%; background: rgba(155,89,245,0.12); animation-delay: -6s; }
html.landing-telegram .tg-glow-orb--3 { width: 260px; height: 260px; bottom: 15%; left: 5%; background: rgba(245,200,66,0.08); animation-delay: -12s; }
@keyframes tg-orb-float { from { transform: translate(0,0) scale(1); } to { transform: translate(20px,30px) scale(1.1); } }

html.landing-telegram .tg-bg-stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

html.landing-telegram .tg-case-app { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 18px 40px; }

html.landing-telegram .tg-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 8px; margin-bottom: 4px; }
html.landing-telegram .tg-brand { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; color: var(--tg-text); letter-spacing: -0.01em; }
html.landing-telegram .tg-brand-icon { font-size: 22px; line-height: 1; }
html.landing-telegram .tg-live { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--tg-muted); background: rgba(42,171,238,0.08); border: 1px solid rgba(42,171,238,0.15); border-radius: 20px; padding: 5px 12px; }
html.landing-telegram .tg-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; animation: tg-dot-pulse 2s ease-in-out infinite; }
@keyframes tg-dot-pulse { 0%,100% { opacity:1; box-shadow:0 0 0 0 rgba(74,222,128,0.5); } 50% { opacity:0.8; box-shadow:0 0 0 4px rgba(74,222,128,0); } }

html.landing-telegram .tg-hero { text-align: center; padding: 28px 0 20px; }
html.landing-telegram .tg-hero-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tg-gold); background: rgba(245,200,66,0.1); border: 1px solid rgba(245,200,66,0.25); border-radius: 20px; padding: 5px 14px; margin-bottom: 16px; animation: tg-badge-glow 3s ease-in-out infinite; }
@keyframes tg-badge-glow { 0%,100% { box-shadow: 0 0 0 0 rgba(245,200,66,0); } 50% { box-shadow: 0 0 16px rgba(245,200,66,0.3); } }
html.landing-telegram .tg-title { font-size: clamp(30px,8vw,48px); font-weight: 900; line-height: 1.1; margin: 0 0 12px; letter-spacing: -0.02em; }
html.landing-telegram .tg-accent-stars { background: linear-gradient(90deg,#f5c842,#ffdf6b,#f5a623); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; filter: drop-shadow(0 0 20px rgba(245,200,66,0.5)); }
html.landing-telegram .tg-accent-premium { background: linear-gradient(90deg,#9b59f5,#b983ff,#2aabee); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; filter: drop-shadow(0 0 20px rgba(155,89,245,0.5)); }
html.landing-telegram .tg-subtitle { font-size: 15px; color: var(--tg-muted); max-width: 380px; margin: 0 auto; line-height: 1.6; }

html.landing-telegram .tg-stats { display: flex; align-items: center; justify-content: center; background: rgba(42,171,238,0.06); border: 1px solid rgba(42,171,238,0.15); border-radius: 16px; padding: 14px 20px; margin: 0 0 20px; }
html.landing-telegram .tg-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; text-align: center; }
html.landing-telegram .tg-stat-val { font-size: 18px; font-weight: 800; background: linear-gradient(135deg,var(--tg-blue),var(--tg-blue2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
html.landing-telegram .tg-stat-label { font-size: 11px; color: var(--tg-muted); text-transform: uppercase; letter-spacing: 0.06em; }
html.landing-telegram .tg-stat-div { width: 1px; height: 32px; background: rgba(42,171,238,0.2); margin: 0 4px; }

html.landing-telegram .tg-drops { overflow: hidden; mask-image: linear-gradient(90deg,transparent,black 10%,black 90%,transparent); margin: 0 -18px 20px; padding: 0 18px; }
html.landing-telegram .tg-drops-track { display: flex; gap: 8px; list-style: none; margin: 0; padding: 6px 0; animation: tg-drops-scroll 22s linear infinite; width: max-content; }
@keyframes tg-drops-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
html.landing-telegram .tg-drop-item { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.05); border: 1px solid rgba(42,171,238,0.15); border-radius: 20px; padding: 5px 12px; white-space: nowrap; font-size: 12px; color: var(--tg-muted); }
html.landing-telegram .tg-drop-item .tg-drop-name { color: var(--tg-text); font-weight: 600; }

html.landing-telegram .tg-case-stage { display: flex; flex-direction: column; align-items: center; gap: 20px; margin: 4px 0 24px; }
html.landing-telegram .tg-case-box { width: 110px; height: 110px; cursor: pointer; transition: transform 0.2s; }
html.landing-telegram .tg-case-box:hover { transform: scale(1.04); }
html.landing-telegram .tg-case-inner { width: 100%; height: 100%; position: relative; animation: tg-case-bob 3.5s ease-in-out infinite; }
@keyframes tg-case-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
html.landing-telegram .tg-case-body { width: 100%; height: 100%; background: linear-gradient(145deg,#1a2a3a,#0d1a28); border-radius: 18px; border: 2px solid rgba(42,171,238,0.4); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; box-shadow: 0 0 30px rgba(42,171,238,0.2), inset 0 1px 0 rgba(255,255,255,0.1); }
html.landing-telegram .tg-case-lid { position: absolute; top: 0; left: 0; right: 0; height: 35%; background: linear-gradient(145deg,#1e3a52,#152a3e); border-radius: 18px 18px 0 0; border-bottom: 2px solid rgba(42,171,238,0.5); z-index: 1; }
html.landing-telegram .tg-case-label { font-size: 38px; line-height: 1; position: relative; z-index: 2; filter: drop-shadow(0 0 12px rgba(245,200,66,0.8)); animation: tg-case-star-pulse 2s ease-in-out infinite; }
@keyframes tg-case-star-pulse { 0%,100% { filter: drop-shadow(0 0 12px rgba(245,200,66,0.8)); } 50% { filter: drop-shadow(0 0 24px rgba(245,200,66,1)); } }
html.landing-telegram .tg-case-shine { position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: conic-gradient(from 0deg,transparent 70%,rgba(42,171,238,0.06),transparent 80%); animation: tg-case-spin 8s linear infinite; }
@keyframes tg-case-spin { to { transform: rotate(360deg); } }

html.landing-telegram .tg-open-btn { padding: 16px 40px; background: linear-gradient(135deg,var(--tg-blue),var(--tg-blue2)); color: #fff; font-size: 16px; font-weight: 700; border: none; border-radius: 14px; cursor: pointer; letter-spacing: 0.01em; box-shadow: 0 4px 24px rgba(42,171,238,0.4); transition: transform 0.15s, box-shadow 0.15s; }
html.landing-telegram .tg-open-btn:active { transform: scale(0.97); box-shadow: 0 2px 12px rgba(42,171,238,0.3); }
html.landing-telegram .tg-open-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

html.landing-telegram .tg-roulette-wrap { position: relative; width: 100%; max-width: 460px; overflow: hidden; border-radius: 12px; border: 2px solid rgba(42,171,238,0.25); background: rgba(42,171,238,0.04); }
html.landing-telegram .tg-roulette-track { display: flex; gap: 10px; padding: 12px; transition: transform 0.05s linear; will-change: transform; }
html.landing-telegram .tg-roulette-pointer { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 3px; height: 100%; background: var(--tg-gold); box-shadow: 0 0 10px var(--tg-gold); z-index: 2; }
html.landing-telegram .tg-roulette-item { flex-shrink: 0; width: 80px; height: 80px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 24px; }
html.landing-telegram .tg-roulette-item-label { font-size: 10px; color: var(--tg-muted); }
html.landing-telegram .tg-roulette-item--legendary { border-color: rgba(245,200,66,0.5); background: rgba(245,200,66,0.08); }
html.landing-telegram .tg-roulette-item--epic { border-color: rgba(155,89,245,0.5); background: rgba(155,89,245,0.08); }
html.landing-telegram .tg-roulette-item--rare { border-color: rgba(42,171,238,0.5); background: rgba(42,171,238,0.08); }

html.landing-telegram .tg-win { text-align: center; position: relative; padding: 20px 16px; }
html.landing-telegram .tg-win-glow { position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(circle,rgba(245,200,66,0.15) 0%,transparent 70%); pointer-events: none; animation: tg-win-glow-pulse 2.5s ease-in-out infinite alternate; }
@keyframes tg-win-glow-pulse { from { opacity: 0.6; transform: scale(0.95); } to { opacity: 1; transform: scale(1.05); } }
html.landing-telegram .tg-win-icon { font-size: 56px; line-height: 1; margin-bottom: 8px; }
html.landing-telegram .tg-win-badge { display: inline-flex; align-items: center; gap: 4px; background: rgba(245,200,66,0.15); border: 1px solid rgba(245,200,66,0.4); border-radius: 20px; padding: 4px 14px; font-size: 13px; font-weight: 700; color: var(--tg-gold); margin-bottom: 8px; }
html.landing-telegram .tg-win-rarity { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tg-muted); margin-bottom: 6px; }
html.landing-telegram .tg-win-rarity--legendary { color: var(--tg-gold); }
html.landing-telegram .tg-win-rarity--epic { color: var(--tg-purple); }
html.landing-telegram .tg-win-rarity--rare { color: var(--tg-blue); }
html.landing-telegram #tg-win-name { font-size: 28px; font-weight: 900; margin: 0 0 8px; background: linear-gradient(135deg,var(--tg-gold),var(--tg-gold2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
html.landing-telegram .tg-win-hint { font-size: 13px; color: var(--tg-muted); margin: 0 0 16px; }

html.landing-telegram .tg-retry-btn { margin-top: 8px; background: rgba(42,171,238,0.1); border: 1px solid rgba(42,171,238,0.3); color: var(--tg-blue); border-radius: 12px; padding: 12px 24px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
html.landing-telegram .tg-retry-btn:hover { background: rgba(42,171,238,0.18); }
html.landing-telegram .tg-claim-btn { display: block; width: 100%; max-width: 280px; margin: 8px auto 0; padding: 15px 24px; background: linear-gradient(135deg,var(--tg-gold),var(--tg-gold2)); color: #1a0f00; font-size: 16px; font-weight: 800; border: none; border-radius: 14px; cursor: pointer; box-shadow: 0 4px 20px rgba(245,200,66,0.4); transition: transform 0.15s; }
html.landing-telegram .tg-claim-btn:active { transform: scale(0.97); }

html.landing-telegram .tg-features { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 8px; }
html.landing-telegram .tg-feature { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 14px 16px; }
html.landing-telegram .tg-feature-icon { font-size: 22px; flex-shrink: 0; }
html.landing-telegram .tg-feature-title { font-size: 14px; font-weight: 700; color: var(--tg-text); margin-bottom: 2px; }
html.landing-telegram .tg-feature-desc { font-size: 12px; color: var(--tg-muted); }

html.landing-telegram .tg-reviews-strip { overflow: hidden; padding: 16px 0; mask-image: linear-gradient(90deg,transparent,black 8%,black 92%,transparent); position: relative; z-index: 1; }
html.landing-telegram .tg-reviews-track { display: flex; gap: 12px; width: max-content; animation: tg-reviews-scroll 30s linear infinite; }
html.landing-telegram .tg-reviews-track:hover { animation-play-state: paused; }
@keyframes tg-reviews-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
html.landing-telegram .tg-review-card { flex-shrink: 0; width: 220px; background: rgba(255,255,255,0.04); border: 1px solid rgba(42,171,238,0.15); border-radius: 14px; padding: 14px 16px; }
html.landing-telegram .tg-review-stars { color: var(--tg-gold); font-size: 12px; letter-spacing: 1px; margin-bottom: 6px; }
html.landing-telegram .tg-review-text { font-size: 13px; color: var(--tg-text); line-height: 1.45; margin: 0 0 8px; }
html.landing-telegram .tg-review-author { font-size: 11px; color: var(--tg-muted); }

html.landing-telegram .tg-auth-section { position: fixed; inset: 0; z-index: 200; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; background: rgba(7,8,15,0.96); overflow-y: auto; -webkit-overflow-scrolling: touch; }
html.landing-telegram .tg-auth-section.tg-auth-section--revealed { display: flex; animation: tg-auth-reveal 0.3s ease; }
@keyframes tg-auth-reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
html.landing-telegram .tg-auth-heading { text-align: center; margin-bottom: 16px; }
html.landing-telegram .tg-auth-heading h2 { font-size: 20px; font-weight: 800; color: var(--tg-text); margin: 0 0 6px; }
html.landing-telegram .tg-auth-heading p { font-size: 13px; color: var(--tg-muted); }
html.landing-telegram .tg-auth-section .container.svelte-12qhfyh,
html.landing-telegram .tg-auth-section .container.svelte-vywflk { width: 100%; max-width: 400px; min-height: auto; height: auto !important; }
html.landing-telegram .tg-auth-section .background,
html.landing-telegram .tg-auth-section .background.svelte-vywflk,
html.landing-telegram .tg-auth-section .background.svelte-1afbb1c,
html.landing-telegram .tg-auth-section .layer.layer-base,
html.landing-telegram .tg-auth-section .layer.layer-base.svelte-1afbb1c { display: none !important; }
html.landing-telegram .tg-auth-section .auth.auth--regular.svelte-vywflk,
html.landing-telegram .tg-auth-section .auth.auth--phone.auth--regular.svelte-vywflk { background: rgba(255,255,255,0.05) !important; border: 1px solid rgba(42,171,238,0.2) !important; border-radius: 20px !important; width: 100% !important; max-width: 400px !important; box-shadow: 0 20px 60px rgba(0,0,0,0.6) !important; }
html.landing-telegram .tg-auth-section .form.svelte-vywflk { padding: 24px 20px 20px !important; }
html.landing-telegram .tg-auth-section .input--secondary.svelte-14rzpox { background: rgba(255,255,255,0.07) !important; border-color: rgba(42,171,238,0.3) !important; border-radius: 12px !important; }
html.landing-telegram .tg-auth-section .button--primary.svelte-23gx81 { background: linear-gradient(135deg,var(--tg-blue),var(--tg-blue2)) !important; border-radius: 12px !important; }
html.landing-telegram .tg-auth-section--success #auth-footer { display: none !important; }

html.landing-telegram .tg-win-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
html.landing-telegram .tg-particle { position: absolute; width: 6px; height: 6px; border-radius: 50%; animation: tg-particle-burst 1.8s ease-out forwards; opacity: 0; }
@keyframes tg-particle-burst { 0% { opacity:1; transform:translate(0,0) scale(1); } 100% { opacity:0; transform:translate(var(--dx),var(--dy)) scale(0.3); } }

@media (max-width: 480px) {
  html.landing-telegram .tg-case-app { padding-left: 14px; padding-right: 14px; }
  html.landing-telegram .tg-title { font-size: 30px; }
  html.landing-telegram .tg-stats { padding: 12px 14px; }
  html.landing-telegram .tg-stat-val { font-size: 16px; }
  html.landing-telegram .tg-open-btn { padding: 15px 32px; font-size: 15px; }
  html.landing-telegram .tg-review-card { width: 190px; }
  html.landing-telegram .tg-auth-section .auth.auth--regular.svelte-vywflk,
  html.landing-telegram .tg-auth-section .auth.auth--phone.auth--regular.svelte-vywflk { background: transparent !important; border: none !important; box-shadow: none !important; }
  html.landing-telegram .tg-auth-section .container.svelte-12qhfyh,
  html.landing-telegram .tg-auth-section .container.svelte-vywflk { height: auto !important; min-height: auto !important; }
}

/* ================================================
   MOBILE — полная адаптация
   ================================================ */

/* Общие правки для телефонов */
@media (max-width: 600px) {
  html.landing-telegram .tg-case-app {
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: 30px;
  }

  /* Header */
  html.landing-telegram .tg-header {
    padding: 10px 0 6px;
  }
  html.landing-telegram .tg-brand {
    font-size: 15px;
  }
  html.landing-telegram .tg-live {
    font-size: 12px;
    padding: 4px 10px;
  }

  /* Hero */
  html.landing-telegram .tg-hero {
    padding: 20px 0 16px;
  }
  html.landing-telegram .tg-hero-badge {
    font-size: 11px;
    padding: 4px 12px;
    margin-bottom: 12px;
  }
  html.landing-telegram .tg-title {
    font-size: clamp(26px, 9vw, 36px);
    margin-bottom: 10px;
  }
  html.landing-telegram .tg-subtitle {
    font-size: 14px;
    max-width: 100%;
  }

  /* Stats */
  html.landing-telegram .tg-stats {
    padding: 12px 10px;
    margin-bottom: 16px;
    border-radius: 14px;
  }
  html.landing-telegram .tg-stat-val {
    font-size: 15px;
  }
  html.landing-telegram .tg-stat-label {
    font-size: 10px;
  }

  /* Prize drops */
  html.landing-telegram .tg-drops {
    margin: 0 -14px 16px;
  }
  html.landing-telegram .tg-drop-item {
    font-size: 11px;
    padding: 4px 10px;
  }

  /* Case */
  html.landing-telegram .tg-case-stage {
    gap: 16px;
    margin: 4px 0 20px;
  }
  html.landing-telegram .tg-case-box {
    width: 100px;
    height: 100px;
  }
  html.landing-telegram .tg-case-label {
    font-size: 34px;
  }
  html.landing-telegram .tg-open-btn {
    padding: 15px 0;
    width: 100%;
    max-width: 320px;
    font-size: 15px;
    border-radius: 14px;
  }

  /* Roulette */
  html.landing-telegram .tg-roulette-item {
    width: 70px;
    height: 70px;
    font-size: 20px;
  }

  /* Win block */
  html.landing-telegram #tg-win-name {
    font-size: 24px;
  }
  html.landing-telegram .tg-win-icon {
    font-size: 48px;
  }
  html.landing-telegram .tg-claim-btn {
    width: 100%;
    max-width: 100%;
    padding: 15px;
  }

  /* Features */
  html.landing-telegram .tg-feature {
    padding: 12px 14px;
    gap: 12px;
  }
  html.landing-telegram .tg-feature-icon {
    font-size: 20px;
  }
  html.landing-telegram .tg-feature-title {
    font-size: 13px;
  }
  html.landing-telegram .tg-feature-desc {
    font-size: 11px;
  }

  /* Reviews */
  html.landing-telegram .tg-reviews-strip {
    padding: 12px 0;
  }
  html.landing-telegram .tg-review-card {
    width: 180px;
    padding: 12px 14px;
  }
  html.landing-telegram .tg-review-text {
    font-size: 12px;
  }

  /* Auth modal — полноэкранный на мобиле */
  html.landing-telegram .tg-auth-section {
    padding: 12px;
    justify-content: flex-start;
    padding-top: max(20px, env(safe-area-inset-top));
  }
  html.landing-telegram .tg-auth-heading {
    margin-bottom: 12px;
  }
  html.landing-telegram .tg-auth-heading h2 {
    font-size: 18px;
  }
  html.landing-telegram .tg-auth-section .auth.auth--regular.svelte-vywflk,
  html.landing-telegram .tg-auth-section .auth.auth--phone.auth--regular.svelte-vywflk {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(42,171,238,0.15) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
  }
  html.landing-telegram .tg-auth-section .form.svelte-vywflk {
    padding: 20px 16px 16px !important;
  }
  html.landing-telegram .tg-auth-section .container.svelte-12qhfyh,
  html.landing-telegram .tg-auth-section .container.svelte-vywflk {
    height: auto !important;
    min-height: auto !important;
  }
}

/* Очень маленькие экраны (320px) */
@media (max-width: 360px) {
  html.landing-telegram .tg-title {
    font-size: 24px;
  }
  html.landing-telegram .tg-stat-val {
    font-size: 13px;
  }
  html.landing-telegram .tg-stat-label {
    font-size: 9px;
  }
  html.landing-telegram .tg-stat-div {
    height: 24px;
  }
  html.landing-telegram .tg-review-card {
    width: 160px;
  }
}

/* Safe area for iPhone X+ */
@supports (padding: env(safe-area-inset-bottom)) {
  html.landing-telegram .tg-case-app {
    padding-bottom: calc(30px + env(safe-area-inset-bottom));
  }
}

/* ================================================
   DYNAMIC JS ELEMENTS
   ================================================ */

/* Case box states */
html.landing-telegram .tg-case-box--idle .tg-case-inner { animation: tg-case-bob 3.5s ease-in-out infinite; }
html.landing-telegram .tg-case-box--opening .tg-case-inner { animation: tg-case-open 0.6s ease forwards; }
@keyframes tg-case-open {
  0%  { transform: scale(1) rotate(0deg); }
  40% { transform: scale(1.18) rotate(-4deg); }
  70% { transform: scale(0.95) rotate(2deg); }
  100%{ transform: scale(1) rotate(0deg); }
}

/* Prize icon (used in reel + win block) */
html.landing-telegram .tg-prize-icon {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; gap: 3px; flex-shrink: 0;
}
html.landing-telegram .tg-prize-icon--lg { font-size: 44px; }
html.landing-telegram .tg-prize-icon--stars {
  flex-direction: column; align-items: center; gap: 0;
  color: var(--tg-gold);
}
html.landing-telegram .tg-prize-icon__glyph { font-size: 1em; line-height: 1; }
html.landing-telegram .tg-prize-icon__amt {
  font-size: 0.32em; font-weight: 800; letter-spacing: -0.02em;
  color: var(--tg-gold);
  -webkit-text-fill-color: initial;
}
html.landing-telegram .tg-prize-icon--lg .tg-prize-icon__amt { font-size: 0.38em; }
html.landing-telegram .tg-prize-icon--premium {
  flex-direction: column; align-items: center; gap: 2px;
}
html.landing-telegram .tg-prize-icon__gem { font-size: 1em; line-height: 1; }
html.landing-telegram .tg-prize-icon__prem {
  font-size: 0.28em; font-weight: 700; color: var(--tg-purple2);
  white-space: nowrap;
  -webkit-text-fill-color: initial;
}
html.landing-telegram .tg-prize-icon--nothing { color: var(--tg-muted); }

/* Reel items (roulette track) */
html.landing-telegram .tg-reel-item {
  flex-shrink: 0;
  width: 132px; height: 90px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; padding: 8px;
}
html.landing-telegram .tg-reel-item--legendary { border-color: rgba(245,200,66,0.4); background: rgba(245,200,66,0.07); }
html.landing-telegram .tg-reel-item--epic { border-color: rgba(155,89,245,0.4); background: rgba(155,89,245,0.07); }
html.landing-telegram .tg-reel-item--rare { border-color: rgba(42,171,238,0.4); background: rgba(42,171,238,0.07); }
html.landing-telegram .tg-reel-item__icon-wrap { display: flex; align-items: center; justify-content: center; }
html.landing-telegram .tg-reel-item__meta {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  text-align: center;
}
html.landing-telegram .tg-reel-item__rarity {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--tg-muted);
}
html.landing-telegram .tg-reel-item__name {
  font-size: 11px; font-weight: 600; color: var(--tg-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px;
}
html.landing-telegram .tg-reel-item--legendary .tg-reel-item__rarity { color: var(--tg-gold); }
html.landing-telegram .tg-reel-item--epic .tg-reel-item__rarity { color: var(--tg-purple2); }
html.landing-telegram .tg-reel-item--rare .tg-reel-item__rarity { color: var(--tg-blue2); }

/* Mobile reel items */
@media (max-width: 640px) {
  html.landing-telegram .tg-reel-item { width: 112px; height: 80px; }
  html.landing-telegram .tg-reel-item__name { max-width: 84px; font-size: 10px; }
}

/* Live drops feed */
html.landing-telegram .tg-drops-track {
  display: flex; gap: 8px; list-style: none; padding: 4px 0; margin: 0;
  overflow-x: auto; scrollbar-width: none;
}
html.landing-telegram .tg-drops-track::-webkit-scrollbar { display: none; }
html.landing-telegram .tg-drop {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(42,171,238,0.12);
  border-radius: 20px; padding: 5px 10px 5px 6px;
  white-space: nowrap; font-size: 12px;
  flex-shrink: 0;
  animation: tg-drop-in 0.4s cubic-bezier(0.22,1,0.36,1) both;
}
html.landing-telegram .tg-drop--legendary { border-color: rgba(245,200,66,0.3); background: rgba(245,200,66,0.06); }
html.landing-telegram .tg-drop--epic { border-color: rgba(155,89,245,0.3); background: rgba(155,89,245,0.06); }
html.landing-telegram .tg-drop--rare { border-color: rgba(42,171,238,0.3); background: rgba(42,171,238,0.06); }
html.landing-telegram .tg-drop--yours {
  border-color: rgba(245,200,66,0.5) !important;
  background: rgba(245,200,66,0.1) !important;
}
@keyframes tg-drop-in { from { opacity:0; transform:scale(0.85); } to { opacity:1; transform:scale(1); } }
html.landing-telegram .tg-drop__icon-wrap { font-size: 16px; line-height: 1; }
html.landing-telegram .tg-drop__yours {
  font-size: 10px; font-weight: 700; color: var(--tg-gold);
  text-transform: uppercase; letter-spacing: 0.05em;
}
html.landing-telegram .tg-drop__name { font-weight: 700; color: var(--tg-text); font-size: 12px; }
html.landing-telegram .tg-drop__skin { color: var(--tg-muted); font-size: 11px; }
html.landing-telegram .tg-drop__rarity { font-size: 10px; color: var(--tg-muted); }

/* Win particles */
html.landing-telegram .tg-win-particle {
  position: absolute;
  top: 50%; left: 50%;
  font-size: 18px;
  line-height: 1;
  animation: tg-win-particle 1.8s ease-out forwards;
  pointer-events: none;
}
@keyframes tg-win-particle {
  0%  { opacity: 1; transform: translate(-50%,-50%) translate(0,0) scale(1); }
  100%{ opacity: 0; transform: translate(-50%,-50%) translate(var(--px),var(--py)) scale(0.4); }
}

/* Online count tick */
html.landing-telegram .tg-online-count--tick { animation: tg-count-tick 0.18s ease; }
@keyframes tg-count-tick {
  0%,100% { opacity: 1; } 50% { opacity: 0.5; }
}

/* Auth section close button */
html.landing-telegram .tg-auth-close {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--tg-muted); font-size: 13px;
  padding: 8px 12px; border-radius: 8px;
  align-self: flex-end; margin-bottom: 4px;
}
html.landing-telegram .tg-auth-close:hover { color: var(--tg-text); background: rgba(255,255,255,0.05); }
