:root{
  --bg:#0b1220;
  --text:#e7eefc;
  --muted:#a9b8db;
  --accent:#2dd4bf;
  --accent2:#60a5fa;
  --border:rgba(255,255,255,.08);
  --shadow: 0 18px 60px rgba(0,0,0,.45);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 700px at 20% 0%, rgba(96,165,250,.18), transparent 60%),
              radial-gradient(900px 600px at 90% 10%, rgba(45,212,191,.16), transparent 55%),
              var(--bg);
  color:var(--text);
}

#app{
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}

.header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15,26,47,.7);
  backdrop-filter: blur(10px);
}

.brand{display:flex; gap:12px; align-items:center;}
.logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(96,165,250,.22), rgba(45,212,191,.18));
    border: 1px solid var(--border);
}

.logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.brandTitle{font-weight:900; line-height:1.1}
.brandSub{color:var(--muted); font-size:12px; margin-top:2px}

.secureBadge{
  display:flex; align-items:center; gap:8px;
  color:var(--muted);
  font-size:12px;
  border:1px solid var(--border);
  padding:8px 10px;
  border-radius: 999px;
  background: rgba(16,31,58,.6);
}
.secureBadge .dot{
  width:8px;height:8px;border-radius:50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(45,212,191,.12);
}

.main{padding: 16px 0 28px}
.hero{display:flex; flex-direction:column; gap:14px}

.handler{
  display:flex; gap:12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(16,31,58,.55);
  backdrop-filter: blur(10px);
}
.handlerAvatar{
  width:44px;height:44px;border-radius: 16px;
  display:grid;place-items:center;
  border:1px solid var(--border);
  background: linear-gradient(135deg, rgba(45,212,191,.20), rgba(96,165,250,.18));
  font-weight:900;
}
.handlerTitle{font-weight:900}
.handlerDesc{color:var(--muted); margin-top:4px; font-size:14px; line-height:1.35}

.infoGrid{
  display:grid;
  gap:12px;
}
.infoGrid2{
  grid-template-columns: repeat(2, 1fr);
}
.infoCard{
  border:1px solid var(--border);
  border-radius:18px;
  background: rgba(15,26,47,.55);
  padding: 12px 12px;
}
.infoTitle{font-weight:900; font-size:13px}
.infoText{color:var(--muted); font-size:13px; margin-top:6px; line-height:1.35}

.rouletteSection{margin-top: 14px;}
.rouletteCard{
  border:1px solid var(--border);
  border-radius: 22px;
  background: rgba(15,26,47,.65);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  padding: 14px;
}
.rouletteHeader{display:flex; flex-direction:column; gap:4px; margin-bottom:10px}
.rouletteTitle{font-weight:1000; font-size:18px}
.rouletteHint{color:var(--muted); font-size:13px}

.rouletteActions{
  display:flex;
  gap:10px;
  margin-top: 12px;
}
.btn{
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 14px;
  font-weight:900;
  cursor:pointer;
  width: 100%;
}
.btn:disabled{opacity:.55; cursor:not-allowed}
.btnPrimary{
  background: linear-gradient(135deg, rgba(45,212,191,.35), rgba(96,165,250,.25));
  border-color: rgba(45,212,191,.25);
}

.finePrint{
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

/* Winners */
.winnersSection{
  margin-top: 16px;
  border:1px solid var(--border);
  border-radius: 22px;
  background: rgba(15,26,47,.55);
  padding: 14px;
}
.winnersHeader{display:flex; align-items:baseline; justify-content:space-between; gap:10px}
.winnersTitle{font-weight:1000}
.winnersSub{color:var(--muted); font-size:12px}

.winnersListWrap{
  margin-top: 10px;
  border-radius: 18px;
  border:1px solid var(--border);
  overflow:hidden;
  background: rgba(16,31,58,.5);
  max-height: 240px;
}
.winnersList{
  list-style:none;
  margin:0;
  padding: 8px;
  display:flex;
  flex-direction:column;
  gap:8px;
  animation: scrollWinners 14s linear infinite;
}
.winnerItem{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
}
.winnerName{font-weight:900}
.winnerPrize{color:var(--muted); font-size:13px}

@keyframes scrollWinners{
  0% { transform: translateY(0); }
  100% { transform: translateY(-35%); }
}

.footer{
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  text-align:center;
  padding: 10px 0 4px;
}

/* Modal */
.modal.hidden{display:none}
.modal{
  position:fixed;
  inset:0;
  z-index:999;
}
.modalBackdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
}
.modalCard{
  position:relative;
  margin: 0 auto;
  top: 14vh;
  width: min(520px, calc(100% - 28px));
  border-radius: 22px;
  border:1px solid var(--border);
  background: rgba(15,26,47,.92);
  box-shadow: var(--shadow);
  padding: 16px;
}
.modalTop{display:flex; justify-content:flex-start}
.modalBadge{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(45,212,191,.25);
  background: rgba(45,212,191,.12);
}
.modalTitle{
  margin: 10px 0 6px;
  font-size: 22px;
  line-height: 1.15;
}
.modalText{margin:0 0 12px; color: var(--muted); line-height:1.4}
.modalActions{display:flex; flex-direction:column; gap:10px}
.modalFine{margin-top:10px; color: var(--muted); font-size:12px; line-height:1.35}

/* =========================
   HORIZONTAL ROULETTE
   ========================= */
.rouletteViewport.horiz{
  height: 255px;
  padding: 14px;
  border-radius: 18px;
  border:1px solid var(--border);
  overflow:hidden;
  background: linear-gradient(180deg, rgba(16,31,58,.95), rgba(15,26,47,.95));
}

.hFrame{
  height: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: radial-gradient(900px 260px at 30% 0%, rgba(96,165,250,.16), transparent 60%),
              radial-gradient(700px 260px at 90% 10%, rgba(45,212,191,.14), transparent 60%),
              rgba(255,255,255,.02);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.hHeader{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  padding: 10px 12px 6px;
}
.hLabel{
  font-weight: 1000;
  letter-spacing: .6px;
  font-size: 12px;
  color: rgba(255,255,255,.86);
  opacity:.9;
}
.hSub{color: var(--muted); font-size: 12px;}

.hWindow{
  position:relative;
  margin: 8px 10px 10px;
  height: 165px;
  border-radius: 18px;
  border: 1px solid rgba(45,212,191,.22);
  background: rgba(0,0,0,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  overflow:hidden;
}

/* затемнение краёв (погружение) */
.hGlow{
  position:absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.78), transparent 20%, transparent 80%, rgba(0,0,0,.78)),
    radial-gradient(700px 160px at 50% 50%, rgba(96,165,250,.12), transparent 55%);
  pointer-events:none;
}

/* акцентная рамка центральной зоны */
.hFocusBox{
  position:absolute;
  left:50%;
  top:50%;
  width: 250px;        /* чуть шире карточки */
  height: 126px;       /* чуть выше карточки */
  transform: translate(-50%,-50%);
  border-radius: 20px;
  border: 1px solid rgba(45,212,191,.55);
  box-shadow:
    0 0 0 6px rgba(45,212,191,.10),
    0 18px 40px rgba(0,0,0,.35),
    inset 0 0 0 1px rgba(255,255,255,.10);
  pointer-events:none;
}

/* центральная линия */
.hMarker{
  position:absolute;
  left: 50%;
  top: 10px;
  bottom: 10px;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(45,212,191,.95), transparent);
  box-shadow: 0 0 0 6px rgba(45,212,191,.10);
  border-radius: 2px;
  pointer-events:none;
}

.hReel{
  position:absolute;
  top: 0;
  bottom:0;
  left:0;
  display:flex;
  align-items:center;
  gap: 14px;
  padding: 0 60px; /* чтобы половинки слева/справа были видны */
  transform: translateX(0px);
  will-change: transform;
}

/* карточка приза — фиксированная ширина, аккуратный текст */
.prizeCard{
  width: 240px;
  height: 118px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  display:flex;
  gap: 12px;
  padding: 14px 14px;
  flex: 0 0 auto;
}

.prizeIcon{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(135deg, rgba(96,165,250,.20), rgba(45,212,191,.16));
  font-weight: 1000;
}

.prizeText{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
}

.prizeTitle{
  font-weight: 1000;
  font-size: 16px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prizeMeta{
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prizeTag{
  margin-top: 2px;
  align-self:flex-start;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(96,165,250,.10);
}

/* “главный приз” чуть выделим */
.prizeCard.isFinal{
  border-color: rgba(45,212,191,.55);
  background: linear-gradient(135deg, rgba(45,212,191,.10), rgba(96,165,250,.06));
}
.prizeCard.isFinal .prizeIcon{
  background: linear-gradient(135deg, rgba(45,212,191,.28), rgba(96,165,250,.22));
}

@media (max-width: 760px){
  .infoGrid2{grid-template-columns: 1fr;}
  .rouletteViewport.horiz{height: 250px;}
  .hWindow{height: 160px;}
  .prizeCard{width: 232px;}
  .hFocusBox{width: 242px; height: 126px;}
  .modalCard{top: 12vh;}
}
