/**
 * ShayariVerse Pro 2.0 - Luxury Dark Design System
 * Inspired by Apple, Notion, Spotify, Medium & Pinterest
 *
 * @package ShayariVerse_Pro
 */

:root {
  --sv-primary: #6366f1;
  --sv-primary-hover: #4f46e5;
  --sv-secondary: #ec4899;
  --sv-accent: #10b981;
  --sv-neon-purple: #8b5cf6;
  --sv-neon-cyan: #06b6d4;
  --sv-bg: #090d16;
  --sv-card-bg: #111827;
  --sv-text: #f8fafc;
  --sv-text-muted: #94a3b8;
  --sv-border: #1e293b;
  --sv-glass-bg: rgba(17, 24, 39, 0.75);
  --sv-glass-border: rgba(255, 255, 255, 0.08);
  --sv-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --sv-shadow-hover: 0 20px 40px -10px rgba(99, 102, 241, 0.3);
  --sv-radius: 18px;
  --sv-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
[data-theme='light'] {
  --sv-bg: #f8fafc;
  --sv-card-bg: #ffffff;
  --sv-text: #0f172a;
  --sv-text-muted: #64748b;
  --sv-border: #e2e8f0;
  --sv-glass-bg: rgba(255, 255, 255, 0.85);
  --sv-glass-border: rgba(0, 0, 0, 0.06);
  --sv-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06);
  --sv-shadow-hover: 0 20px 35px -10px rgba(99, 102, 241, 0.15);
}

/* Global Reset & Base */
body {
  background-color: var(--sv-bg);
  color: var(--sv-text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Typography Scripts */
.font-urdu {
  font-family: 'Noto Nastaliq Urdu', serif;
  line-height: 2.6;
  font-size: 1.45rem;
  direction: rtl;
  text-align: right;
  word-spacing: 2px;
}
.font-hindi {
  font-family: 'Poppins', sans-serif;
  line-height: 2.1;
  font-size: 1.25rem;
}
.font-poetic {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.9;
  font-size: 1.25rem;
}
.text-rtl { direction: rtl; text-align: right; }

/* Sticky Reading Progress Bar */
.sv-reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sv-primary), var(--sv-secondary), var(--sv-neon-cyan));
  z-index: 99999;
  width: 0%;
  transition: width 0.1s ease-out;
}

/* ==========================================================================
   Header, Navigation & Mega Menu
   ========================================================================== */
.sv-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--sv-glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--sv-glass-border);
  transition: var(--sv-transition);
}
.sv-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.sv-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.sv-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--sv-text);
  text-decoration: none;
}
.sv-brand span.highlight {
  background: linear-gradient(135deg, var(--sv-primary), var(--sv-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sv-nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 28px;
  align-items: center;
}
.sv-nav-menu > li {
  position: relative;
}
.sv-nav-menu > li > a {
  color: var(--sv-text);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 8px 0;
  transition: var(--sv-transition);
}
.sv-nav-menu > li > a:hover {
  color: var(--sv-primary);
}

/* Mega Menu Dropdown */
.sv-has-mega-menu:hover .sv-mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.sv-mega-menu {
  position: absolute;
  top: 100%;
  left: -200px;
  width: 780px;
  background: var(--sv-card-bg);
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: var(--sv-transition);
  z-index: 1040;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.sv-mega-col h5 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--sv-primary);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
.sv-mega-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sv-mega-list li {
  margin-bottom: 8px;
}
.sv-mega-list a {
  color: var(--sv-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sv-mega-list a:hover {
  color: var(--sv-primary);
}

/* Header Buttons & Neon Highlights */
.sv-btn-ai-studio {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.35);
  transition: var(--sv-transition);
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sv-btn-ai-studio:hover {
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.55);
  transform: translateY(-2px);
}

.sv-btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--sv-border);
  background: var(--sv-card-bg);
  color: var(--sv-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--sv-transition);
}
.sv-btn-icon:hover {
  border-color: var(--sv-primary);
  color: var(--sv-primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   Modern Cards (Glassmorphic + Subtle Glow)
   ========================================================================== */
.sv-card-shayari {
  background: var(--sv-card-bg);
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius);
  padding: 30px;
  position: relative;
  transition: var(--sv-transition);
  box-shadow: var(--sv-shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.sv-card-shayari:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: var(--sv-shadow-hover);
}

.sv-card-watermark {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 5rem;
  line-height: 1;
  color: var(--sv-text);
  opacity: 0.05;
  pointer-events: none;
}

/* Social Multi-Reactions Bar */
.sv-reactions-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.sv-reaction-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--sv-border);
  border-radius: 50px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: var(--sv-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
  transition: var(--sv-transition);
}
.sv-reaction-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--sv-primary);
  border-color: var(--sv-primary);
  transform: scale(1.05);
}
.sv-reaction-btn.reacted {
  border-color: var(--sv-secondary);
  color: var(--sv-secondary);
}

@keyframes burstFloat {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-30px) scale(1.6); opacity: 0; }
}
.sv-reaction-burst {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  animation: burstFloat 0.8s ease-out forwards;
  pointer-events: none;
  font-size: 1.2rem;
}

/* Collection Card (Pinterest/Goodreads Board Style) */
.sv-card-collection {
  background: var(--sv-card-bg);
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius);
  padding: 24px;
  transition: var(--sv-transition);
  box-shadow: var(--sv-shadow);
  text-decoration: none;
  color: var(--sv-text);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.sv-card-collection:hover {
  transform: translateY(-5px);
  border-color: var(--sv-primary);
  box-shadow: var(--sv-shadow-hover);
  color: var(--sv-text);
}
.sv-collection-preview-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 6px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  background: rgba(99, 102, 241, 0.08);
}
.sv-collection-preview-grid .col-thumb-main {
  background: linear-gradient(135deg, var(--sv-primary), var(--sv-secondary));
}
.sv-collection-preview-grid .col-thumb-sub {
  background: rgba(255, 255, 255, 0.05);
}

/* Voice Search Animation */
@keyframes voicePulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.sv-voice-search-btn.is-listening {
  color: #ef4444 !important;
  animation: voicePulse 1.4s infinite;
}

/* Toast */
.sv-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #ffffff;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 999999;
  transition: var(--sv-transition);
  opacity: 0;
  pointer-events: none;
}
.sv-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Skeleton Loader */
.sv-skeleton {
  background: linear-gradient(90deg, var(--sv-card-bg) 25%, rgba(255, 255, 255, 0.05) 50%, var(--sv-card-bg) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   Site Layout Structure (Fix empty void & sticking footers)
   ========================================================================== */
#page.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-main {
  flex: 1 0 auto;
  min-height: 60vh;
}
.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: var(--sv-card-bg);
  border-top: 1px solid var(--sv-border);
}

/* ==========================================================================
   Interactive Modals System (Must be hidden by default!)
   ========================================================================== */
.sv-modal {
  display: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.82) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 999999 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.sv-modal.is-open,
.sv-modal.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.sv-modal-content {
  background: var(--sv-card-bg, #111827) !important;
  color: var(--sv-text, #f3f4f6) !important;
  border: 1px solid var(--sv-border, rgba(255, 255, 255, 0.1)) !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6) !important;
  width: 100% !important;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  margin: auto;
  animation: svModalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes svModalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-15px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.sv-modal-close {
  background: transparent !important;
  border: none !important;
  font-size: 28px !important;
  line-height: 1 !important;
  color: var(--sv-text-muted, #94a3b8) !important;
  cursor: pointer !important;
  padding: 4px 10px !important;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.sv-modal-close:hover {
  color: var(--sv-primary, #6366f1) !important;
  transform: scale(1.1);
}

/* Search Modal Inner */
.sv-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--sv-border);
}
.sv-search-input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 1.1rem;
  color: var(--sv-text) !important;
}
.sv-search-filters {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--sv-border);
  overflow-x: auto;
}
.sv-filter-chip {
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid var(--sv-border);
  background: transparent;
  color: var(--sv-text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.sv-filter-chip.active {
  background: var(--sv-primary);
  border-color: var(--sv-primary);
  color: #fff;
}
.sv-search-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 16px 20px;
}
.sv-search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--sv-text);
  transition: background 0.2s ease;
  margin-bottom: 6px;
}
.sv-search-result-item:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--sv-primary);
}

/* ==========================================================================
   Responsive Navigation
   ========================================================================== */
.sv-nav-wrap {
  display: flex;
  align-items: center;
}
.sv-mobile-toggle {
  display: none;
}

@media (max-width: 991.98px) {
  .sv-mobile-toggle {
    display: inline-flex !important;
  }
  .sv-nav-menu {
    display: none !important;
  }
  .sv-nav-menu.active {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--sv-card-bg);
    border-bottom: 1px solid var(--sv-border);
    padding: 20px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 1050;
    gap: 16px;
    align-items: flex-start;
  }
  .sv-nav-menu.active > li {
    width: 100%;
  }
  .sv-nav-menu.active > li > a {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .sv-nav-menu.active .sv-mega-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    background: transparent;
  }
}

@media (min-width: 992px) {
  .sv-mobile-toggle {
    display: none !important;
  }
  .sv-nav-menu {
    display: flex !important;
  }
}

/* ==========================================================================
   Card Styling: Shayari, Quote, Poetry, Author & Badges
   ========================================================================== */
.sv-card-shayari {
  background: var(--sv-card-bg);
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sv-shadow);
  transition: var(--sv-transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.sv-card-shayari:hover {
  transform: translateY(-4px);
  box-shadow: var(--sv-shadow-hover);
  border-color: rgba(99, 102, 241, 0.4);
}
.sv-card-watermark {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 5rem;
  line-height: 1;
  color: var(--sv-primary);
  opacity: 0.08;
  font-family: serif;
  pointer-events: none;
}
.sv-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}
.sv-card-body {
  position: relative;
  z-index: 2;
  margin-bottom: 24px;
}
.sv-poetry-lines {
  font-size: 1.35rem;
  line-height: 2.2;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--sv-text);
}
.sv-card-poet {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sv-primary);
}
.sv-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--sv-border);
  position: relative;
  z-index: 2;
}
.sv-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sv-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--sv-border);
  background: transparent;
  color: var(--sv-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--sv-transition);
  font-size: 13px;
  padding: 0;
  text-decoration: none;
}
.sv-action-btn:hover {
  border-color: var(--sv-primary);
  color: var(--sv-primary);
  transform: translateY(-2px);
}
.sv-action-btn.sv-btn-copy {
  width: auto;
  border-radius: 50px;
  padding: 4px 12px;
  gap: 4px;
}
.sv-share-dropdown {
  position: relative;
}
.sv-share-dropdown:hover .sv-share-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.sv-share-menu {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--sv-card-bg);
  border: 1px solid var(--sv-border);
  border-radius: 50px;
  padding: 4px 8px;
  display: flex;
  gap: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 10;
  margin-bottom: 8px;
}
.sv-share-link {
  color: var(--sv-text);
  font-size: 14px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 50%;
  transition: color 0.2s ease;
}
.sv-share-link:hover {
  color: var(--sv-primary);
}

/* Quote Cards & Gradients */
.sv-card-quote {
  border-radius: var(--sv-radius);
  padding: 36px 30px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-shadow: var(--sv-shadow);
  transition: var(--sv-transition);
  position: relative;
  overflow: hidden;
}
.sv-card-quote:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.sv-card-quote.gradient-sunset {
  background: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
}
.sv-card-quote.gradient-royal {
  background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
}
.sv-card-quote.gradient-emerald {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}
.sv-card-quote.gradient-midnight {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.sv-card-quote.gradient-crimson {
  background: linear-gradient(135deg, #991b1b 0%, #ef4444 100%);
}
.sv-quote-text {
  font-size: 1.25rem;
  line-height: 1.8;
  font-weight: 600;
  font-style: italic;
  font-family: 'Playfair Display', serif;
}
.sv-quote-author {
  font-weight: 700;
  font-size: 1.05rem;
}
.sv-quote-source {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Author / Poet Card */
.sv-card-author {
  background: var(--sv-card-bg);
  border: 1px solid var(--sv-border);
  border-radius: var(--sv-radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--sv-shadow);
  transition: var(--sv-transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.sv-card-author:hover {
  transform: translateY(-4px);
  box-shadow: var(--sv-shadow-hover);
  border-color: rgba(99, 102, 241, 0.4);
}
.sv-author-avatar-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 16px;
  overflow: hidden;
  border: 3px solid var(--sv-primary);
}
.sv-author-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sv-author-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.sv-author-era {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sv-primary);
  font-weight: 600;
  margin-bottom: 6px;
}

/* Badges */
.badge-pill-mood {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: var(--badge-color, var(--sv-primary));
  border: 1px solid var(--badge-color, var(--sv-primary));
}
.badge-pill-lang {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--sv-border);
  color: var(--sv-text-muted);
}


