/* ═══════════════════════════════════════════════════════════════════════════
   SPLASH SCREEN — Premium Animated
   ═══════════════════════════════════════════════════════════════════════════ */

/* === OVERRIDE: splash всегда видим если active, даже до JS === */
#screen-splash.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: opacity 0.6s ease, visibility 0s linear 0s !important;
}

#screen-splash {
  background: linear-gradient(145deg, #5047E5 0%, #635CFB 45%, #8B7FFF 100%);
  overflow: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* === Animated background blobs === */
.splash-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.splash-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
}

.splash-blob-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #A89BFF, transparent);
  top: -80px;
  right: -60px;
  animation: blobFloat1 6s ease-in-out infinite;
}

.splash-blob-2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, #4A3FE7, transparent);
  bottom: -60px;
  left: -80px;
  animation: blobFloat2 7s ease-in-out infinite;
}

.splash-blob-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #B8A0FF, transparent);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: blobFloat3 5s ease-in-out infinite;
}

@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, 20px) scale(1.1); }
}
@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -15px) scale(1.08); }
}
@keyframes blobFloat3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.35; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.2; }
}

/* === Center logo area === */
.splash-center {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: splashCenterIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

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

/* === Paw icon === */
.splash-paw-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-paw-glow {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  animation: pawGlowPulse 2.5s ease-in-out 0.5s infinite;
}

@keyframes pawGlowPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50%       { transform: scale(1.15); opacity: 0.4; }
}

.splash-paw-icon {
  width: 88px;
  height: 88px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.2));
  animation: pawBounce 2s ease-in-out 0.8s infinite;
}

@keyframes pawBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* === Brand name === */
.splash-brand {
  font-family: var(--font);
  font-size: 52px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -2px;
  line-height: 1;
  text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.splash-brand-p {
  display: inline-block;
  animation: letterPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

.splash-brand-rest {
  display: inline-block;
  animation: letterPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.55s both;
}

@keyframes letterPop {
  from { opacity: 0; transform: scale(0.5) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* === Tagline === */
.splash-tagline {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: -8px 0 0;
  animation: taglineFade 0.6s ease 0.7s both;
}

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

/* === Bottom loader === */
.splash-bottom {
  position: absolute;
  bottom: 52px;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: bottomIn 0.5s ease 0.9s both;
}

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

.splash-loader {
  width: 120px;
}

.splash-loader-track {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.25);
  border-radius: 100px;
  overflow: hidden;
}

.splash-loader-bar {
  height: 100%;
  width: 40%;
  background: rgba(255,255,255,0.9);
  border-radius: 100px;
  animation: loaderSlide 1.4s cubic-bezier(0.4, 0, 0.6, 1) 0.8s infinite;
}

@keyframes loaderSlide {
  0%   { transform: translateX(-100%) scaleX(0.5); }
  50%  { transform: translateX(150%) scaleX(1.2); }
  100% { transform: translateX(320%) scaleX(0.5); }
}

.splash-version {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.5px;
  margin: 0;
}

/* === Fade out when hiding === */
#screen-splash:not(.active) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s !important;
}

@keyframes splashOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   LANGUAGE SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */
#screen-language {
  background: #FFFFFF;
  align-items: stretch;
  justify-content: flex-start;
}

.lang-page {
  width: 100%;
  height: 100%;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 0 30px;
  overflow: hidden;
}

/* Иллюстрация — 363×363, почти во всю ширину (боковые поля ~6px).
   margin-top:auto + margin-bottom:auto на тексте центрируют блок
   картинка+заголовок в свободной зоне над кнопками на любом росте экрана. */
.lang-image-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 24px 6px 0;
  margin-top: auto;
  box-sizing: border-box;
}

.lang-image {
  width: 100%;
  max-width: 363px;
  height: auto;
  display: block;
}

/* Заголовок + подзаголовок */
.lang-text-block {
  text-align: center;
  padding: 0 16px;
  margin-bottom: auto;
}

.lang-title {
  font-size: 16px;
  font-weight: 600;
  color: #000000;
  line-height: 22px;
  margin-bottom: 8px;
}

.lang-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: #8E8E93;
  line-height: 22px;
  margin: 0;
}

/* Кнопки — прижаты к низу */
.lang-buttons {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0 16px;
}

.lang-btn {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  background: rgba(99, 92, 251, 0.12);
  color: #635CFB;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.lang-btn:active { transform: scale(0.97); background: rgba(99, 92, 251, 0.22); }
.lang-btn.selected {
  background: #635CFB;
  color: #FFFFFF;
}

