/* ==========================================================================
   AnupSagar Pro - UI Components & Glassmorphism Styles
   ========================================================================== */

/* ----------------- 1. Top Header Bar ----------------- */
.top-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 0.45rem 0;
  transition: var(--transition);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.top-date i {
  color: var(--primary);
}

.top-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.top-links a:hover {
  color: var(--primary);
}

/* ----------------- 2. Sticky Glass Navbar ----------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.35rem;
  box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
}

.brand-badge {
  font-size: 0.65rem;
  background: linear-gradient(135deg, #ff5722, #f59e0b);
  color: #fff;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 800;
  margin-left: 0.25rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  position: relative;
  transition: var(--transition);
}

.btn-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #ff5722 0%, #ff7a00 100%);
  color: #ffffff;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 18px rgba(255, 87, 34, 0.35);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 87, 34, 0.5);
  color: #ffffff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ----------------- 3. Trending News Ticker ----------------- */
.news-ticker-bar {
  background: var(--bg-ticker);
  border-bottom: 1px solid var(--border-color);
  padding: 0.55rem 0;
  font-size: 0.88rem;
}

.news-ticker-bar .container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}

.ticker-pulse {
  width: 7px;
  height: 7px;
  background: #ffffff;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
  100% { transform: scale(0.9); opacity: 1; }
}

.ticker-track {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
}

.ticker-items {
  display: inline-flex;
  gap: 2.5rem;
  animation: ticker-scroll 30s linear infinite;
}

.ticker-items:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.ticker-item:hover {
  color: var(--primary);
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ----------------- 4. Hero Section ----------------- */
.hero-section {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  position: relative;
}

.hero-tagline {
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2.25rem;
}

/* Live Search Box */
.search-container {
  max-width: 740px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.5rem 0.6rem 0.5rem 1.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.search-icon {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-right: 0.75rem;
}

.search-input {
  flex: 1;
  font-size: 1.05rem;
  color: var(--text-primary);
  background: transparent;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-shortcut {
  background: var(--bg-input);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-color);
  margin-right: 0.5rem;
}

.quick-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.quick-tag-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: var(--transition);
}

.quick-tag-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-badge);
}

/* Stat Counters */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  max-width: 800px;
  margin: 0 auto;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
}

.stat-icon {
  font-size: 1.8rem;
  color: var(--primary);
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ----------------- 5. Filter Bar & Category Pills ----------------- */
.filter-section {
  padding: 1.5rem 0;
  margin-bottom: 2rem;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.category-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  list-style: none;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: var(--transition);
}

.pill-btn:hover {
  color: var(--primary);
  border-color: var(--border-glow);
}

.pill-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.35);
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.select-engine {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.select-engine:focus {
  border-color: var(--primary);
}

/* ----------------- 6. Card Grid & Prompt Cards ----------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.75rem;
  margin-bottom: 3.5rem;
}

.prompt-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  backdrop-filter: var(--glass-blur);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.prompt-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(255, 87, 34, 0.15);
}

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #0f172a;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.prompt-card:hover .card-img {
  transform: scale(1.05);
}

.card-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 2;
}

.card-favorite-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(14, 22, 38, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  z-index: 2;
  transition: var(--transition);
}

.card-favorite-btn:hover, .card-favorite-btn.favorited {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.1);
}

.card-engine-tag {
  position: absolute;
  bottom: 0.85rem;
  left: 1rem;
  background: rgba(7, 11, 20, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 2;
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.card-category {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.card-title {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a:hover {
  color: var(--primary);
}

/* Prompt Box inside card */
.prompt-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 1rem;
  position: relative;
}

.prompt-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  user-select: all;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: auto;
}

.btn-copy {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #ff5722, #ff7a00);
  color: #ffffff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  transition: var(--transition);
}

.btn-copy:hover {
  box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
  transform: translateY(-1px);
}

.btn-copy.copied {
  background: #10b981;
}

.btn-view {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-view:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-capcut {
  background: linear-gradient(135deg, #000000, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  flex: 1;
}

/* ----------------- 7. Interactive Live Prompt Customizer Studio ----------------- */
.customizer-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin: 4rem 0;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.customizer-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.customizer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.customizer-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-input, .form-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(255, 87, 34, 0.2);
}

.customizer-preview-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.preview-output {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  min-height: 180px;
  margin-bottom: 1.25rem;
  user-select: all;
  white-space: pre-wrap;
}

.preview-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ----------------- 8. Interactive Before/After Image Comparison Slider ----------------- */
.comparison-section {
  padding: 3rem 0;
}

.comparison-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.comparison-wrapper {
  position: relative;
  width: 100%;
  max-width: 840px;
  height: 480px;
  margin: 1.5rem auto;
  overflow: hidden;
  border-radius: var(--radius-md);
  user-select: none;
  box-shadow: var(--shadow-lg);
}

.comparison-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comparison-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
  border-right: 2px solid #ffffff;
}

.comparison-after .comparison-img {
  width: 840px;
  max-width: none;
}

.comparison-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 40px;
  height: 100%;
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.handle-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.comparison-label {
  position: absolute;
  bottom: 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-xs);
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  z-index: 4;
}

.label-before { right: 1rem; }
.label-after { left: 1rem; }

/* ----------------- 9. Bookmarks Slide-Over Drawer ----------------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-overlay.open .drawer-panel {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.drawer-body {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
}

/* ----------------- 10. FAQ Accordion & Footer ----------------- */
.faq-section {
  padding: 4rem 0;
}

.faq-list {
  max-width: 800px;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
}

.faq-answer {
  padding: 0 1.5rem 1.2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ----------------- 11. Toast Notifications ----------------- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  border-left: 4px solid var(--primary);
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  animation: toast-slide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toast-slide {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
