/* =========================
   🔄 RESET (Normalize default browser styles)
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* =========================
   🌙 BODY (Dark mode base)
========================= */
body {
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  min-height: 100vh;

  /* Center content */
  display: flex;
  align-items: center;
  justify-content: center;

  color: #fdf4ff;
  background: #0f001a;

  overflow-x: hidden;
  transition: all 0.4s ease;
}


/* =========================
   ✨ BACKGROUND GLOW (Dark)
========================= */
.background {
  position: fixed;
  inset: 0;

  /* Multiple radial gradients for glow effect */
  background:
    radial-gradient(circle at 15% 20%, rgba(168,85,247,0.35), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(244,114,182,0.3), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(99,102,241,0.15), transparent 60%);

  filter: blur(50px);
  z-index: -1;

  /* Subtle animation */
  animation: floatBg 12s ease-in-out infinite alternate;
}

/* Background animation */
@keyframes floatBg {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}


/* =========================
   📦 MAIN WRAPPER
========================= */
.container {
  width: 100%;
  max-width: 680px;
  padding: 20px;

  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}


/* =========================
   🧾 HEADER
========================= */
.header {
  text-align: center;
}

/* Gradient title */
.header h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, #a855f7, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Subtitle text */
.subtitle {
  font-size: 0.95rem;
  margin-top: 6px;
  opacity: 0.9;
}

/* Subtitle gradient (dark mode) */
body:not(.light) .subtitle {
  background: linear-gradient(135deg, #c084fc, #f9a8d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Subtitle gradient (light mode) */
body.light .subtitle {
  background: linear-gradient(135deg, #7c3aed, #db2777);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* =========================
   🪟 CARD (Main UI panel)
========================= */
.card {
  width: 100%;
  padding: 2rem;
  border-radius: 22px;

  /* Glassmorphism effect */
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);

  border: 1px solid rgba(244, 114, 182, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);

  display: flex;
  flex-direction: column;
  gap: 14px;
}


/* =========================
   📝 FORM
========================= */
.form {
  display: flex;
  gap: 10px;
}

/* Input field */
.search-input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;

  border: 1px solid rgba(255,255,255,0.15);
  outline: none;

  font-size: 1rem;

  background: rgba(255, 255, 255, 0.95);
  color: #111;

  transition: 0.25s ease;
}

/* Input focus state */
.search-input:focus {
  border-color: #f472b6;
  box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.25);
}


/* =========================
   🔘 BUTTONS
========================= */
.submit-button {
  padding: 14px 18px;
  border: none;
  border-radius: 14px;

  cursor: pointer;

  background: linear-gradient(135deg, #a855f7, #f472b6);
  color: #fff;
  font-weight: 700;

  transition: all 0.25s ease;
  white-space: nowrap;
}

/* Hover effect */
.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(244, 114, 182, 0.35);
}


/* =========================
   🎛 CONTROLS (language + theme)
========================= */
.controls {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.controls select,
.controls button {
  padding: 10px 12px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.15);
  background: #7c3aed;
  color: white;

  cursor: pointer;
  transition: 0.2s ease;
}

.controls button:hover,
.controls select:hover {
  transform: translateY(-1px);
}


/* =========================
   ⚡ ACTION BUTTONS
========================= */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

.actions button {
  padding: 10px 14px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);

  color: inherit;
  cursor: pointer;

  transition: 0.2s ease;
}

.actions button:hover {
  background: rgba(244,114,182,0.15);
  transform: translateY(-2px);
}


/* =========================
   💬 QUOTE DISPLAY
========================= */
.quote {
  margin-top: 10px;
  padding: 20px;
  border-radius: 16px;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(244,114,182,0.2);

  text-align: center;
  font-size: 1.25rem;
  line-height: 1.7;

  color: #fce7f3;
}


/* =========================
   🧠 EXPLANATION BOX
========================= */
.explanation {
  margin-top: 10px;
  padding: 14px;
  border-radius: 12px;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}


/* =========================
   🕘 HISTORY
========================= */
.history {
  font-size: 0.8rem;
  opacity: 0.7;
}


/* =========================
   📊 DASHBOARD
========================= */
.dashboard {
  margin-top: 10px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
}

.stats {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.9rem;
}


/* =========================
   ⭐ FAVORITES
========================= */

/* NOTE: You had both `.favourite-item` and `.favorite-item`
   → keeping both but ideally standardise spelling */

.favorite-item,
.favourite-item {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 10px;
  padding: 10px;
  margin: 8px 0;

  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
}

.favorite-item p,
.favourite-item p {
  flex: 1;
  font-size: 0.9rem;
}

/* Delete button */
.delete-fav {
  background: crimson;
  border: none;
  color: white;

  padding: 6px 10px;
  border-radius: 8px;

  cursor: pointer;
  transition: 0.2s;
}

.delete-fav:hover {
  transform: scale(1.05);
}


/* =========================
   ⚠️ ALERT
========================= */
.alert {
  padding: 12px;
  border-radius: 12px;

  background: rgba(255, 200, 0, 0.15);
  border: 1px solid rgba(255, 200, 0, 0.35);

  font-size: 0.9rem;
  text-align: center;
}


/* =========================
   ⚡ QUICK TOPICS
========================= */
.quick-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.quick-topics button {
  padding: 6px 10px;
  border-radius: 10px;
  border: none;

  cursor: pointer;

  background: rgba(255,255,255,0.1);
  color: inherit;
}

/* =========================
   💡 AI SUGGESTIONS
========================= */
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.suggestion-item {
  padding: 6px 10px;
  border-radius: 10px;

  background: rgba(255,255,255,0.1);

  cursor: pointer;
  font-size: 0.85rem;

  transition: 0.2s ease;
}

.suggestion-item:hover {
  background: rgba(244,114,182,0.25);
  transform: translateY(-1px);
}


/* =========================
   🌞 LIGHT MODE OVERRIDES
========================= */
body.light {
  background: #f7f5ff;
  color: #1a1a1a;
}

/* Background (light) */
body.light .background {
  background:
    radial-gradient(circle at 15% 20%, rgba(168,85,247,0.18), transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(244,114,182,0.18), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(99,102,241,0.12), transparent 65%);
  filter: blur(60px);
}

/* Card (light) */
body.light .card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(168, 85, 247, 0.15);
  box-shadow: 0 20px 50px rgba(20, 10, 40, 0.08);
  color: #1a1a1a;
}

/* Input (light) */
body.light .search-input {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
}

/* Quote (light) */
body.light .quote {
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  border: 1px solid rgba(236, 72, 153, 0.15);
}

/* Explanation (light) */
body.light .explanation {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0,0,0,0.08);
}

/* Footer (light) */
body.light .footer {
  color: #4b5563;
}


/* =========================
   🔗 FOOTER
========================= */
.footer {
  font-size: 0.85rem;
  text-align: center;
  opacity: 0.85;
  color: #e9d5ff;
}

.footer a {
  color: #f472b6;
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  color: #a855f7;
}