/* Vishnu Sahasranama - Modern Classical Theme */
:root {
  --bg-base: #0a0b0e;
  --bg-surface: #12141a;
  --bg-surface-raised: #181b22;
  --bg-surface-hover: #1e222b;
  --bg-input: #151821;
  --border-subtle: #242938;
  --border-focus: #e5a93c;
  --border-hover: rgba(229, 169, 60, 0.4);
  
  --text-main: #f8f9fa;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  
  --gold-primary: #e5a93c;
  --gold-light: #f6c86a;
  --gold-dim: rgba(229, 169, 60, 0.12);
  --gold-border: rgba(229, 169, 60, 0.25);
  
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Cinzel', Georgia, serif;
  --font-deva: 'Noto Serif Devanagari', 'Noto Sans Devanagari', serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Hero Header */
.hero-header {
  background: radial-gradient(circle at 50% 0%, #201a10 0%, var(--bg-base) 75%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 56px 20px 36px;
  text-align: center;
}

.hero-content {
  max-width: 860px;
  margin: 0 auto;
}

.tradition-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-dim);
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.tradition-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-primary);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #ffffff;
  margin-bottom: 14px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.65;
}

.hero-subtitle strong {
  color: var(--gold-light);
  font-weight: 600;
}

/* Main Content */
.main-wrapper {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 60px;
  flex: 1;
}

/* Sticky Controls Panel */
.controls-panel {
  position: sticky;
  top: 16px;
  z-index: 100;
  background: rgba(10, 11, 14, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 14px 0 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(36, 41, 56, 0.8);
}

.search-container {
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 18px;
  color: var(--text-faint);
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  font-size: 1.05rem;
  padding: 16px 85px 16px 50px;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.search-input-wrapper input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(229, 169, 60, 0.22), var(--shadow-md);
  background-color: var(--bg-surface);
}

.search-input-wrapper input::placeholder {
  color: var(--text-faint);
  font-size: 0.95rem;
}

.clear-button {
  position: absolute;
  right: 46px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-button:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.keyboard-hint {
  position: absolute;
  right: 18px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  pointer-events: none;
}

.filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding: 0 4px;
}

.status-counter {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.quick-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.chips-label {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-right: 2px;
}

.chip {
  background-color: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: var(--border-hover);
}

.chip.active {
  background-color: var(--gold-dim);
  color: var(--gold-light);
  border-color: var(--gold-border);
  font-weight: 600;
}

/* Names Grid */
.names-grid {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.name-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.name-card:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.title-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.id-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-light);
  background: var(--gold-dim);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--gold-border);
  letter-spacing: 0.04em;
}

.sanskrit-title {
  font-family: var(--font-deva);
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.english-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.01em;
}

.copy-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transition: all 0.2s;
}

.name-card:hover .copy-btn {
  opacity: 1;
  border-color: var(--border-subtle);
  background: var(--bg-surface-raised);
}

.copy-btn:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
  background: var(--gold-dim);
}

.meaning-body {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 2px;
}

.meaning-body mark, .sanskrit-title mark, .english-title mark {
  background: rgba(229, 169, 60, 0.3);
  color: #ffffff;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-family: var(--font-deva);
  font-size: 3.5rem;
  color: var(--gold-primary);
  opacity: 0.6;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.3rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 1rem;
  margin-bottom: 20px;
}

.reset-button {
  background: var(--gold-primary);
  color: #0b0c10;
  font-weight: 700;
  border: none;
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(229, 169, 60, 0.3);
}

.reset-button:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

/* Scroll To Top */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 99;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  background: var(--gold-primary);
  color: #000;
  transform: translateY(-2px);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background: #1e222b;
  color: #ffffff;
  border: 1px solid var(--gold-border);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  background-color: #07080a;
  padding: 40px 20px 60px;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.92rem;
}

.footer-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-inner strong {
  color: var(--gold-light);
}

.footer-sub {
  font-size: 0.85rem;
  color: var(--text-faint);
}

.footer-link {
  margin-top: 12px;
}

.footer-link a {
  color: var(--gold-primary);
  text-decoration: none;
  font-weight: 500;
}

.footer-link a:hover {
  text-decoration: underline;
}

/* Responsive Breakpoints */
@media (max-width: 640px) {
  .hero-header {
    padding: 40px 16px 28px;
  }
  .main-wrapper {
    padding: 16px 12px 48px;
  }
  .controls-panel {
    top: 8px;
    padding: 10px 0 14px;
  }
  .search-input-wrapper input {
    font-size: 0.98rem;
    padding: 14px 75px 14px 44px;
  }
  .search-icon {
    left: 14px;
  }
  .keyboard-hint {
    display: none;
  }
  .clear-button {
    right: 14px;
  }
  .filter-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .name-card {
    padding: 16px 18px;
  }
  .sanskrit-title {
    font-size: 1.3rem;
  }
  .english-title {
    font-size: 1.05rem;
  }
  .copy-btn {
    opacity: 1;
    font-size: 0.7rem;
    padding: 2px 8px;
  }
}
