/* ===== НИЖНЯЯ НАВИГАЦИЯ ===== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 390px;
  background: var(--tab-bg);
  border-top: 0.5px solid rgba(253,200,108,0.1);
  min-height: calc(64px + env(safe-area-inset-bottom, 0px));
  height: auto;
  padding-bottom: env(safe-area-inset-bottom, 8px);
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  z-index: 100;
}
.tabbar .tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--muted2);
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 0;
  text-transform: lowercase;
}
.tabbar .tab .ic { font-size: 20px; line-height: 1; }
.tabbar .tab.active { color: var(--gold); }

.tab-content-pad { padding-bottom: 80px; }

/* ===== ТОСТ ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card2);
  border: 0.5px solid var(--gold);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
  max-width: 340px;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== АНИМАЦИИ ЭКРАНОВ ===== */
@keyframes screenIn {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes screenInBack {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: translateX(0); }
}
.screen.active { animation: screenIn 0.22s ease both; }
.screen.active.back { animation: screenInBack 0.22s ease both; }

/* Уважение к настройке "уменьшить движение" */
@media (prefers-reduced-motion: reduce) {
  .screen.active, .screen.active.back { animation: none; }
  * { transition-duration: 0.001s !important; animation-duration: 0.001s !important; }
}

/* ===== RIPPLE-ЭФФЕКТ ===== */
.ripple-host { position: relative; overflow: hidden; }
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: ripple-anim 0.6s ease-out;
  pointer-events: none;
}
.cta-btn .ripple { background: rgba(0,0,0,0.18); }
@keyframes ripple-anim {
  to { transform: scale(2.4); opacity: 0; }
}

/* ===== SKELETON LOADERS ===== */
.skel {
  background: linear-gradient(90deg,
    var(--bg-card) 0%,
    var(--bg-card2) 50%,
    var(--bg-card) 100%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
  color: transparent !important;
}
@keyframes skel-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skel-line { height: 14px; margin-bottom: 8px; }
.skel-line.short { width: 60%; }
.skel-block { height: 60px; margin-bottom: 12px; border-radius: 16px; }
.skel-circle { width: 60px; height: 60px; border-radius: 50%; flex-shrink: 0; }

/* мягкое появление реального контента после скелетонов */
.fade-in { animation: fadeIn 0.35s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== CONFETTI ===== */
.confetti-host {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 300;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  width: 8px;
  height: 12px;
  top: -20px;
  will-change: transform, opacity;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0%   { transform: translate3d(0, -20px, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate3d(var(--dx, 0px), 110vh, 0) rotate(var(--rot, 720deg)); opacity: 0.9; }
}

/* ===== PULL-TO-REFRESH ===== */
.ptr {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 100%;
  max-width: 390px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  pointer-events: none;
}
.ptr .ring {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2.5px solid var(--gold-border);
  border-top-color: var(--gold);
  opacity: 0;
  transform: rotate(0deg);
  transition: opacity 0.15s ease;
}
.ptr.refreshing .ring {
  opacity: 1;
  animation: ptr-spin 0.9s linear infinite;
}
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* ===== МОДАЛКА ТЕЛЕФОНА ===== */
.phone-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.phone-modal {
  background: var(--bg-card);
  border: 0.5px solid var(--gold-border);
  border-radius: 24px;
  padding: 28px 24px;
  width: 100%;
  max-width: 340px;
  position: relative;
  animation: modalIn 0.2s ease both;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.phone-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.phone-title {
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 8px 0;
  padding-right: 24px;
}
.phone-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px 0;
  line-height: 1.4;
}
.phone-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--pill-bg);
  border: 0.5px solid var(--gold-border2);
  border-radius: 16px;
  padding: 4px 16px;
  margin-bottom: 16px;
}
.phone-prefix {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}
.phone-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-family: inherit;
  font-size: 20px;
  font-weight: 600;
  padding: 12px 0;
}
.phone-input::placeholder { color: var(--muted2); }
.phone-code-wrap {
  margin-bottom: 12px;
}
.phone-code-input {
  width: 100%;
  background: var(--pill-bg);
  border: 0.5px solid var(--gold-border2);
  border-radius: 16px;
  padding: 16px;
  color: var(--white);
  font-family: inherit;
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 12px;
  outline: none;
}
.phone-code-input:focus { border-color: var(--gold); }
.phone-code-input::placeholder { color: var(--muted2); letter-spacing: 4px; }
.phone-hint {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin: 0 0 16px 0;
}
.phone-resend {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  padding: 12px 0;
  cursor: pointer;
  text-align: center;
  margin-top: 8px;
}
.phone-resend:disabled { color: var(--muted2); cursor: default; }
.phone-resend:not(:disabled):hover { color: var(--gold); }

