:root {
  --glass: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Sora", "Poppins", "Segoe UI", sans-serif;
  min-height: 100vh;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.blob {
  position: absolute;
  filter: blur(56px);
  opacity: 0.35;
  border-radius: 9999px;
  animation: drift 15s ease-in-out infinite;
}

.blob-a {
  width: 380px;
  height: 380px;
  top: -120px;
  left: -80px;
  background: #6c63ff;
}

.blob-b {
  width: 330px;
  height: 330px;
  right: 10%;
  top: 22%;
  background: #47f6d6;
  animation-delay: 2s;
}

.blob-c {
  width: 420px;
  height: 420px;
  right: -120px;
  bottom: -150px;
  background: #ff6b4a;
  animation-delay: 4s;
}

.glass-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
}

.glass-strip {
  background: rgba(9, 12, 23, 0.92);
  backdrop-filter: blur(12px);
}

.label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  color: rgba(255, 255, 255, 0.74);
}

.input {
  width: 100%;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 0.75rem 0.85rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.input:focus {
  outline: none;
  border-color: #47f6d6;
  box-shadow: 0 0 0 3px rgba(71, 246, 214, 0.15);
  transform: translateY(-1px);
}

.input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.btn-primary,
.btn-ghost,
.btn-danger,
.btn-icon {
  border-radius: 0.8rem;
  font-weight: 700;
  transition: all 180ms ease;
}

.btn-primary {
  background: linear-gradient(95deg, #6c63ff 0%, #47f6d6 120%);
  color: #070b14;
  border: 1px solid transparent;
  padding: 0.7rem 1rem;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 10px 26px rgba(71, 246, 214, 0.32);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.7rem 1rem;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(90deg, #ff6b4a, #ff3f7a);
  color: white;
  border: 1px solid transparent;
  padding: 0.7rem 1rem;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 74, 0.32);
}

.btn-icon {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 0.45rem;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.16);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.75);
  padding: 0.68rem 0.75rem;
  border-radius: 0.8rem;
  border: 1px solid transparent;
  transition: all 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

.progress-gradient {
  background: linear-gradient(90deg, #47f6d6 0%, #6c63ff 65%, #ff6b4a 100%);
}

.subject-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1rem;
  padding: 1rem;
  transition: transform 180ms ease, border-color 180ms ease;
}

.subject-card:hover {
  transform: translateY(-4px);
  border-color: rgba(71, 246, 214, 0.45);
}

.chip {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
}

.toast {
  position: fixed;
  z-index: 80;
  top: 1rem;
  right: 1rem;
  max-width: 360px;
  padding: 0.7rem 0.9rem;
  border-radius: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  animation: slideIn 180ms ease;
}

.toast-success {
  background: rgba(71, 246, 214, 0.2);
  color: #d8fffa;
}

.toast-error {
  background: rgba(255, 107, 74, 0.2);
  color: #ffe6e0;
}

.animate-rise {
  animation: rise 450ms ease both;
}

.animate-rise-delay {
  animation: rise 550ms ease both;
}

#onboarding-modal .glass-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
}

#profile-name-input {
  min-width: 200px;
}

#profile-edit-btn {
  padding: 0.55rem 0.9rem;
}

.animate-rise-delay-2 {
  animation: rise 650ms ease both;
}

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

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(15px, -20px) scale(1.05); }
}

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