:root {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1b2733;
  background-color: #0088cc;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #0088cc;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.app {
  position: relative;
  width: 100%;
  height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.loading-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, #22a6ff, #0088cc 60%);
  animation: subtle-float 4s ease-in-out infinite;
  z-index: 1;
}

.loading-screen__icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  backdrop-filter: blur(6px);
}

.telegram-logo {
  width: clamp(64px, 20vw, 96px);
  height: clamp(64px, 20vw, 96px);
  object-fit: contain;
  animation: pulse 3s ease-in-out infinite;
}

.loading-screen__spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: spin 1.4s linear infinite;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.modal {
  position: relative;
  z-index: 2;
  width: min(90%, 360px);
  margin: 0 auto;
  padding: 24px 20px 20px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
  text-align: center;
  animation: fade-up 0.8s ease;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 136, 204, 0.1);
  color: #0088cc;
  font-size: 20px;
  cursor: pointer;
}

.modal__close:hover,
.modal__close:focus-visible {
  background: rgba(0, 136, 204, 0.2);
}

.modal h1 {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  margin: 0 0 8px;
  color: #0f172a;
}

.modal p {
  margin: 0 0 24px;
  color: #405066;
  font-size: 1rem;
}

.modal__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  flex: 1 1 120px;
  padding: 14px 12px;
  border-radius: 16px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: linear-gradient(145deg, #00a4ff, #0088cc);
  color: #fff;
  box-shadow: 0 10px 20px rgba(0, 136, 204, 0.35);
}

.btn--ghost {
  background: rgba(0, 136, 204, 0.08);
  color: #0088cc;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  body {
    min-height: 100vh;
  }

  .app {
    height: 100vh;
  }

  .modal {
    padding: 32px 28px 28px;
  }
}
