@keyframes flip {
  0% {
    transform: rotateX(0);
  }
  50% {
    transform: rotateX(-90deg);
    opacity: 0.5;
  }
  100% {
    transform: rotateX(0);
  }
}

@keyframes pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

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

.shake {
  animation: shake 0.5s ease-in-out;
}

.flip {
  animation: flip 0.6s cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.app-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  animation: fadeIn 0.8s ease-out;
  position: relative;
  overflow: hidden;
}

header {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 0;
  position: relative;
  background: rgba(3, 7, 18, 0.4);
  backdrop-filter: blur(0.75rem);
  border-bottom: 0.0625rem solid var(--glass-border);
  margin-bottom: 0.5rem;
  z-index: 10;
}

.header-actions {
  position: absolute;
  right: 0.625rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

h1 {
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  font-weight: 800;
  letter-spacing: 0.0625rem;
  background: linear-gradient(to bottom, #fff, #9ca3af);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 0.625rem rgba(99, 102, 241, 0.3));
}

@media (max-width: 30rem) {
  header {
    padding: 0.5rem 0;
    margin-bottom: 0.25rem;
  }
  .header-actions {
    right: 0.3125rem;
  }
  .icon-button {
    padding: 0.5rem;
  }
  .icon-button svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

.icon-button {
  background: rgba(255, 255, 255, 0.03);
  border: 0.0625rem solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  transform: translateY(-0.125rem);
  border-color: rgba(255, 255, 255, 0.2);
}

.version-display {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.5rem;
  margin-top: auto;
  width: 100%;
  opacity: 0.6;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(-50%) translateY(-1.25rem);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.toast {
  position: fixed;
  top: 2.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-1.25rem);
  background: rgba(255, 255, 255, 0.95);
  color: #020617;
  padding: 0.875rem 1.75rem;
  border-radius: 6.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  box-shadow: 0 0.625rem 1.5rem rgba(0, 0, 0, 0.5);
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
