:root {
  --macaron-blue: #a8d8ea;
  --macaron-pink: #f8b4c4;
  --macaron-green: #b8e0d2;
  --macaron-purple: #d4b8e8;
  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.4);
  --text-primary: #4a5568;
  --text-secondary: #718096;
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--macaron-blue) 0%, var(--macaron-pink) 50%, var(--macaron-green) 100%);
  background-size: 400% 400%;
  animation: gradientFlow 15s ease infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  padding: 40px;
  width: 100%;
  max-width: 480px;
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 32px;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5);
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  border: none;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  outline: none;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-input:focus {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05), 0 0 0 3px rgba(168, 216, 234, 0.4);
}

.form-input::placeholder {
  color: var(--text-secondary);
}

.preset-links {
  margin-top: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.preset-link {
  font-size: 12px;
  color: var(--text-primary);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

.preset-link:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.form-select {
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  border: none;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.form-select:focus {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(168, 216, 234, 0.4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--macaron-blue) 0%, var(--macaron-purple) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(168, 216, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 216, 234, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-group .btn {
  flex: 1;
}

.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-link {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-primary);
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-soft);
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left: 4px solid var(--macaron-green);
}

.toast.error {
  border-left: 4px solid var(--macaron-pink);
}

.toast-message {
  font-size: 14px;
  color: var(--text-primary);
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .glass-card {
    padding: 24px;
    border-radius: 20px;
  }

  .page-title {
    font-size: 24px;
  }

  .btn-group {
    flex-direction: column;
  }
}