:root {
  --ink: #0b0b14;
  --card: rgba(17, 24, 39, 0.85);
  --line: rgba(148, 163, 184, 0.2);
  --accent: #f97316;
  --accent-dark: #ea580c;
  --muted: #94a3b8;
  --success: #22c55e;
  --danger: #f43f5e;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.15), transparent 50%),
    radial-gradient(circle at 20% 20%, rgba(244, 114, 182, 0.12), transparent 40%),
    var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.font-display {
  font-family: 'Playfair Display', serif;
}

.aurora {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 70% 10%, rgba(251, 146, 60, 0.12), transparent 40%),
    radial-gradient(circle at 30% 80%, rgba(45, 212, 191, 0.12), transparent 45%);
  z-index: -1;
}

.logo-mark {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}

.nav-link {
  color: #e2e8f0;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: white;
}

.btn-primary,
.btn-ghost,
.btn-danger {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-compact {
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
}

.btn-primary {
  background: var(--accent);
  color: #0b0b14;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: #e2e8f0;
}

.btn-ghost:hover {
  border-color: rgba(248, 250, 252, 0.5);
}

.profile-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e2e8f0;
  transition: all 0.2s ease;
}

.profile-btn:hover {
  border-color: rgba(248, 250, 252, 0.6);
  color: white;
}

.profile-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.lang-toggle {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e2e8f0;
  transition: all 0.2s ease;
  padding: 0.45rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  width: auto;
  height: auto;
  gap: 0.35rem;
}

.lang-toggle:hover {
  border-color: rgba(248, 250, 252, 0.65);
  color: #ffffff;
}

.lang-toggle.is-open {
  border-color: rgba(248, 250, 252, 0.75);
  color: #ffffff;
}

.lang-toggle-icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

.lang-dropdown {
  position: relative;
}

@media (hover: hover) and (pointer: fine) {
  .lang-dropdown:focus-within .mobile-lang-menu,
  .lang-dropdown:hover .mobile-lang-menu {
    display: block;
  }
}

.mobile-getstart {
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
}

.mobile-lang-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  min-width: 200px;
  z-index: 50;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(11, 11, 20, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  border-radius: 16px;
}

.mobile-lang-menu-inner {
  max-width: 240px;
  margin: 0 auto;
  padding: 0.85rem 1rem 1rem;
  display: grid;
  gap: 0.75rem;
}

.mobile-lang-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.mobile-lang-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}


.mobile-lang {
  display: grid;
  gap: 0.55rem;
}

.mobile-lang form {
  width: 100%;
}

@media (max-width: 640px) {
  .logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
  }

  .profile-btn {
    width: 36px;
    height: 36px;
  }

  .lang-toggle {
    font-size: 0.82rem;
    padding: 0.45rem 0.85rem;
    min-height: 40px;
  }

  .mobile-lang-menu {
    min-width: 220px;
  }
}

@media (max-width: 480px) {
  .nav-shell {
    gap: 0.45rem;
    align-items: center;
  }

  .nav-brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.45rem;
  }

  .brand-title {
    font-size: 1rem;
  }

  .nav-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
  }

  .nav-actions .lang-toggle,
  .nav-actions .mobile-getstart {
    width: auto;
    justify-content: center;
  }

  .nav-actions .lang-toggle {
    min-height: 34px;
    padding: 0.3rem 0.55rem;
    font-size: 0.72rem;
    gap: 0.25rem;
  }

  .mobile-getstart {
    min-height: 34px;
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .mobile-lang-menu {
    left: auto;
    right: 0;
    min-width: 180px;
  }
}

.lang-btn {
  border: 1px solid var(--line);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
}


.lang-btn:hover {
  border-color: rgba(248, 250, 252, 0.6);
  color: white;
}

.lang-btn.is-active {
  border-color: rgba(248, 250, 252, 0.8);
  background: rgba(248, 250, 252, 0.12);
  color: #ffffff;
}

.lang-btn:focus-visible {
  outline: 2px solid rgba(248, 250, 252, 0.7);
  outline-offset: 2px;
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.card-glow {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.85));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #cbd5f5;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 1.4rem;
  font-family: 'Playfair Display', serif;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  width: fit-content;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #e2e8f0;
  font-size: 0.85rem;
}

.chip:hover {
  border-color: rgba(248, 250, 252, 0.6);
}

.lang-pill {
  border: 1px solid rgba(248, 250, 252, 0.2);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #fde68a;
}

.toast {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #bbf7d0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

.footer-link {
  color: #cbd5f5;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #f8fafc;
}

.input,
.card input,
.card select,
.card textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
  padding: 0.6rem 0.8rem;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 5.2rem;
}

.password-toggle {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 2;
}

.password-toggle:hover {
  color: #ffffff;
  border-color: rgba(248, 250, 252, 0.6);
}

.password-toggle.is-visible {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.6);
}

.password-toggle-icon {
  width: 20px;
  height: 20px;
}

.input:focus,
.card input:focus,
.card select:focus,
.card textarea:focus {
  outline: none;
  border-color: rgba(248, 250, 252, 0.6);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.filter-form {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
}

.shayari-scroll-grid {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

@media (min-width: 1024px) {
  .shayari-scroll-grid {
    max-height: 560px;
  }
}

.btn-like,
.btn-save,
.btn-translate,
.btn-copy,
.btn-share {
  border: 1px solid var(--line);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #e2e8f0;
  background: transparent;
  transition: all 0.2s ease;
}

.btn-like:hover,
.btn-save:hover,
.btn-translate:hover,
.btn-copy:hover,
.btn-share:hover {
  border-color: rgba(248, 250, 252, 0.6);
}

.btn-like.active {
  border-color: rgba(248, 113, 113, 0.8);
  color: #fda4af;
}

.translation-output {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  color: #f8fafc;
  font-style: italic;
}

@media (max-width: 768px) {
  .filter-form {
    grid-template-columns: 1fr;
  }
}
