/* ================================================================
   daily_styles.css — DinoCoins: ежедневные награды, DinoSpin, обмен
   ================================================================ */

/* ── Оверлей-экран ── */
#screen-daily {
  overflow-y: auto;
  padding-bottom: calc(var(--nav-h, 60px) + var(--safe-bottom, 0px) + 8px);
}

/* ── Hero-блок ── */
.daily-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 12px 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid rgba(100,140,255,.2);
  box-shadow: 0 4px 20px rgba(0,0,50,.25);
}

.daily-hero-dino {
  font-size: 40px;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(100,200,100,.3));
}

.daily-hero-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(180,210,255,.5);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 3px;
}

.daily-hero-balance {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -.02em;
}

/* ── Шапка экрана (sticky) ── */
.daily-screen-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
}

.daily-screen-title {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
}

/* ── Таб-бар ── */
.daily-tabs {
  display: flex;
  gap: 6px;
  margin: 10px 12px 0;
}

.daily-tab-btn {
  flex: 1;
  padding: 8px 4px;
  border: 1px solid var(--border2);
  border-radius: 10px;
  background: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.daily-tab-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ── Карточки ── */
.daily-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 10px 12px 0;
}

.daily-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* ── Стрик ── */
.streak-badge {
  background: rgba(234,88,12,.1);
  border: 1px solid rgba(234,88,12,.25);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #ea580c;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Streak info row (вместо дней) ── */
.daily-streak-info {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.daily-streak-info-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  gap: 3px;
}

.daily-streak-info-num {
  font-size: 16px;
  font-weight: 800;
  color: var(--txt);
  line-height: 1;
}

.daily-streak-info-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
}

.daily-streak-info-sep {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Большая награда ── */
.reward-big {
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}

/* ── Кнопка: Забрать ── */
.btn-daily-claim {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 11px;
  background: var(--green);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .12s, transform .1s;
}
.btn-daily-claim:active { transform: scale(.98); opacity: .9 }

/* ── Получено ── */
.claimed-badge {
  display: inline-block;
  background: var(--green-bg, #f0fdf4);
  border: 1px solid var(--green-border, #bbf7d0);
  border-radius: 20px;
  padding: 6px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
}

/* ── Подсказка ── */
.daily-hint {
  margin: 10px 12px 0;
  background: var(--blue-bg, #eff6ff);
  border: 1px solid var(--blue-border, #bfdbfe);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 12px;
  color: var(--blue);
  font-weight: 500;
  line-height: 1.5;
}

/* ── Ввод ставки / обмена ── */
.amount-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border2);
  border-radius: 9px;
  background: var(--bg);
  font-size: 20px;
  font-weight: 700;
  color: var(--txt);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .12s, transform .1s;
  font-family: 'Inter', sans-serif;
}
.qty-btn:active { background: var(--border2); transform: scale(.94); }

.qty-inp {
  flex: 1;
  height: 40px;
  border: 1px solid var(--border2);
  border-radius: 9px;
  background: var(--bg);
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--txt);
  outline: none;
  -moz-appearance: textfield;
}
.qty-inp::-webkit-outer-spin-button,
.qty-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-inp:focus { border-color: var(--blue); }

.presets {
  display: flex;
  gap: 6px;
}

.preset-btn {
  flex: 1;
  height: 34px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--bg);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.preset-btn:active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ── DinoSpin: дисплей ── */
.spin-display {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  border: 2px solid var(--border2);
  border-radius: 14px;
  padding: 22px 16px;
  text-align: center;
  margin: 0 0 14px;
  transition: border-color .3s, background .3s;
}
.spin-display.win  { border-color: var(--green); background: var(--green-bg, #f0fdf4) }
.spin-display.lose { border-color: var(--red);   background: var(--red-bg, #fef2f2) }

.spin-mult {
  font-size: 52px;
  font-weight: 900;
  line-height: 1;
  color: var(--txt);
  letter-spacing: -.03em;
  position: relative;
  z-index: 1;
}
.spin-display.win  .spin-mult { color: var(--green) }
.spin-display.lose .spin-mult { color: var(--red) }

@keyframes spinFlicker { 0%,100%{opacity:1} 50%{opacity:.35} }
.spin-mult.spinning { animation: spinFlicker .08s steps(1) infinite }

/* Анимация победного числа */
@keyframes winPop {
  0%   { transform: scale(0.5);  opacity: 0 }
  55%  { transform: scale(1.25); opacity: 1 }
  75%  { transform: scale(0.95) }
  90%  { transform: scale(1.07) }
  100% { transform: scale(1);    opacity: 1 }
}
.spin-mult.win-pop {
  animation: winPop .55s cubic-bezier(.22,1,.36,1) forwards;
}

/* Анимация проигрыша */
@keyframes loseShake {
  0%,100% { transform: translateX(0) }
  18%     { transform: translateX(-6px) }
  36%     { transform: translateX(6px) }
  54%     { transform: translateX(-4px) }
  72%     { transform: translateX(4px) }
  88%     { transform: translateX(-2px) }
}
.spin-mult.lose-shake {
  animation: loseShake .45s ease forwards;
}

/* Победный фон-вспышка */
@keyframes winGlow {
  0%   { box-shadow: inset 0 0 0px rgba(22,163,74,0) }
  40%  { box-shadow: inset 0 0 40px rgba(22,163,74,.25) }
  100% { box-shadow: inset 0 0 0px rgba(22,163,74,0) }
}
.spin-display.win {
  animation: winGlow .8s ease forwards;
}

/* ── Частицы ── */
.spin-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.spin-particle {
  position: absolute;
  bottom: 50%;
  display: block;
  border-radius: 50%;
  opacity: 0;
}

@keyframes particleFly {
  0%   { transform: translateY(0) scale(1);    opacity: 1 }
  80%  { opacity: .8 }
  100% { transform: translateY(-110px) scale(0); opacity: 0 }
}

.spin-particle {
  animation: particleFly .75s ease-out both;
}

.spin-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 5px;
  position: relative;
  z-index: 1;
}

/* ── DinoCoins balance chip (в шапке DinoSpin) ── */
.dino-bal-chip {
  background: rgba(217,119,6,.1);
  border: 1px solid rgba(217,119,6,.3);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

/* ── Кнопка: SPIN ── */
.btn-spin {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: .05em;
  transition: opacity .15s, transform .1s;
  box-shadow: 0 4px 14px rgba(124,58,237,.3);
}
.btn-spin:active   { transform: scale(.98) }
.btn-spin:disabled { opacity: .4; pointer-events: none }

/* ── Курс: стрелка ── */
.rate-arrow {
  font-size: 14px;
  font-weight: 800;
}
.rate-arrow.up   { color: var(--green) }
.rate-arrow.down { color: var(--red) }

/* ── Preview обмена ── */
.exchange-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
  text-align: center;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Кнопка: Обменять ── */
.btn-exchange {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 11px;
  background: var(--gold);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .12s, transform .1s;
}
.btn-exchange:active { transform: scale(.98) }

/* ── Кнопка «Ежедневный подарок» в маркете ── */
.daily-gift-btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(124,58,237,.1);
  border: 1px solid rgba(124,58,237,.3);
  border-radius: 11px;
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  color: #7c3aed;
  cursor: pointer;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.daily-gift-btn:active { transform: scale(.97) }

/* ── Бейдж «1» на кнопке ── */
.daily-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn .25s ease;
  border: 2px solid var(--white);
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0 }
  to   { transform: scale(1); opacity: 1 }
}