:root {
  --bg: #0b0e14;
  --surface: #151b26;
  --surface-hover: #1e2636;
  --primary: #38bdf8;
  --secondary: #818cf8;
  --accent: #c084fc;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #2d3748;
  --card-bg: rgba(21, 27, 38, 0.9);
  --card-border: rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  padding: 0;
  margin: 0;
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(11, 14, 20, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
  padding: 1rem 0;
}

}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #fff;
}

/* Hero */
.hero {
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4rem;
  margin-bottom: 1rem;
  color: #fff;
  line-height: 1.1;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Background Blobs (Adjusted for new theme) */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: float 15s infinite ease-in-out alternate;
}

.blob-1 {
  top: 10%;
  left: 10%;
  width: 500px;
  height: 500px;
  background: var(--primary);
}

.blob-2 {
  bottom: 10%;
  right: 10%;
  width: 600px;
  height: 600px;
  background: var(--secondary);
}

.blob-3 {
  top: 40%;
  left: 40%;
  width: 400px;
  height: 400px;
  background: var(--accent);
}

@keyframes float {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(30px, 50px);
  }
}

/* Typography */
h2,
h3,
h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: #fff;
}

label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* Input Section */
.input-section {
  max-width: 800px;
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--glass-shadow);
}

textarea.form-control {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 1rem;
  font-size: 1rem;
}

textarea.form-control:focus {
  background: rgba(0, 0, 0, 0.3);
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(56, 189, 248, 0.2);
  color: #fff;
}

textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 50px;
  padding: 0.8rem 2rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.4);
}

/* Flashcard Container */
.card-container {
  perspective: 1000px;
  margin-top: 4rem;
}

.flashcard {
  width: 100%;
  max-width: 1000px;
  margin: auto;
  border: none;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  position: relative;
  cursor: pointer;
  margin-bottom: 100px;
}

.flip {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  min-height: 500px;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.front {
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--surface) 0%, #1a202c 100%);
}

.back {
  transform: rotateY(180deg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  justify-content: start;
  font-size: 1rem;
  color: var(--text);
  overflow-y: auto;
  text-align: left;
}

/* Card Content Styling */
.pos-section {
  width: 100%;
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.02);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  height: 100%;
}

.pos-section h4 {
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.definition {
  margin-bottom: 1.5rem;
}

.definition b {
  color: #fff;
}

.examples-section {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border-left: 4px solid var(--accent);
}

.examples-section h4 {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.examples-section em {
  color: var(--text-muted);
  font-style: italic;
}

/* Controls */
.btn-group {
  margin-bottom: 2rem;
  background: var(--surface);
  padding: 0.5rem;
  border-radius: 50px;
  border: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.btn-outline-secondary {
  color: var(--text-muted);
  border-color: transparent;
  border-radius: 50px;
}

.btn-outline-secondary:hover {
  background: var(--surface-hover);
  color: #fff;
  border-color: transparent;
}

.btn-outline-danger {
  color: #ef4444;
  border-color: transparent;
  border-radius: 50px;
}

.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: transparent;
}

#status {
  color: var(--text-muted);
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 4rem 0;
  margin-top: 6rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--surface-hover);
}