:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --bg-gradient-start: #0f172a;
  --bg-gradient-end: #1e1b4b;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --error: #ef4444;
  --success: #22c55e;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background: linear-gradient(
    135deg,
    var(--bg-gradient-start),
    var(--bg-gradient-end)
  );
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* Glassmorphism Containers */
.glass-container {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  width: 100%;
  max-width: 420px;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Background Effects */
body::before,
body::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
}

body::before {
  background: rgba(99, 102, 241, 0.3);
  top: -100px;
  left: -100px;
}

body::after {
  background: rgba(236, 72, 153, 0.2);
  bottom: -100px;
  right: -100px;
}

/* Typography */
h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(to right, #fff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-green {
  background: var(--success);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(34, 197, 94, 0.39);
}

.btn-green:hover {
  background: #15803d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Inputs */
.input-group {
  margin-bottom: 20px;
  text-align: left;
}

.input-group label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.input-group input {
  width: 100%;
  padding: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: white;
  font-size: 14px;
  transition: all 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Custom Radio Group (Icons) */
.radio-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 24px;
}

.radio-group label {
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  width: 80px;
  height: 80px;
}

.radio-group input[type="radio"] {
  display: none;
}

.radio-group input[type="radio"]:checked + label {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.2);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.radio-group label svg {
  margin-bottom: 8px;
  fill: var(--text-secondary);
  transition: all 0.3s ease;
}

.radio-group input[type="radio"]:checked + label svg {
  fill: var(--primary);
}

.radio-group label span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.radio-group input[type="radio"]:checked + label span {
  color: white;
}

/* Social Login Providers */
.provider-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--glass-border);
  margin: 0 10px;
}

/* Tabs */
.tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 32px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: var(--glass-bg);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

/* Alerts / States */
#error-msg {
  color: var(--error);
  font-size: 12px;
  margin-top: 10px;
  display: none;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

@keyframes fadeInSlow {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-slow {
  animation: fadeInSlow 1.5s ease forwards;
  opacity: 0;
}

@keyframes pulsate {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
  }
}

.btn-pulsate {
  animation: pulsate 2.5s infinite ease-in-out;
}

@keyframes pulsate-green {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 14px 0 rgba(34, 197, 94, 0.39);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 6px 20px 0 rgba(34, 197, 94, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 14px 0 rgba(34, 197, 94, 0.39);
  }
}

.btn-green-pulsating {
  animation: pulsate-green 2.5s infinite ease-in-out;
}

.fade-in-pulsate {
  animation:
    fadeInSlow 1.5s ease forwards,
    pulsate 2.5s 1.5s infinite ease-in-out;
  opacity: 0;
}

.animation-delay-1 {
  animation-delay: 0.1s;
}
.animation-delay-2 {
  animation-delay: 0.2s;
}
.animation-delay-3 {
  animation-delay: 0.3s;
}

/* Language Page Specific */
.lang-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.flag {
  font-size: 20px;
}

/* Breathing Circle */
.breathing-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.4) 0%,
    rgba(79, 70, 229, 0.8) 100%
  );
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  transition:
    transform 3s ease-in-out,
    opacity 2s ease;
  transform: scale(0.4);
}

.breathing-circle.expand {
  transform: scale(1.6);
}

@keyframes fadeOutSlow {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.fade-out-slow {
  animation: fadeOutSlow 2s ease forwards;
}

/* Utility */
.hidden {
  display: none !important;
}

/* Voice Recording Styles */
@keyframes record-pulsate-green {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    transform: scale(1);
  }
}

@keyframes record-pulsate-red {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    transform: scale(1);
  }
}

.record-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.record-btn-pulsating {
  animation: record-pulsate-green 2s infinite;
  color: var(--success);
}

.record-btn-recording {
  animation: record-pulsate-red 1.5s infinite;
  color: var(--error);
}

.quest-input-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}
.quest-input-wrap textarea {
  flex: 1;
  width: 100%;
  padding: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  color: white;
  font-size: 14px;
  transition: all 0.3s ease;
  resize: none;
  overflow: hidden;
  line-height: 1.5;
}
.quest-input-wrap textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
