body.light {
  --bg: #f7f7f7;
  --card: #ffffff;
  --text: #111;
  --accent: #d4af37;
  --muted: #555;
}

:root {
  --bg: #0a0d1a;
  --card: #11152b;
  --accent: #d4af37;
  --text: #f5f5f5;
  --muted: #aaa;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Nastaliq Urdu', serif;
  line-height: 2.2;
  letter-spacing: 0.3px;
  transition: background 0.3s ease, color 0.3s ease;
}

/* *******************************Slider Style */
.slider {
  position: relative;
  width: 400px;
  margin: auto;
  overflow: hidden;
}

.slide {
  display: none;
  text-align: center;
}

.slide.active {
  display: inline;
}

.controls {
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: auto;
}

.controls button {
  color: white;
  margin: 10px;
  position: relative;
  top: 0px;
  border-radius: 50%;
  background: #11152b;
  border: 1px solid #d4af37;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 1.0rem;
}
/* Slider End */

.slide h1 {
  color: var(--accent);
  font-size: 2rem;
  margin-bottom: 10px;
}

.slide p {
  font-size: 1.2rem;
  color: var(--text);
}

.slide span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

header {
  flex-wrap: wrap;
  justify-content: space-between;
}

header nav {
  margin-top: 10px;
  width: 100%;
  text-align: center;
}

header nav a {
  display: inline-block;
  margin: 5px 10px;
}

.logo {
  text-align: center;
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: bold;
}

.logo a {
  text-decoration: none;
  color: #d4af37;
}

nav a {
  color: var(--text);
  margin: 0 12px;
  text-decoration: none;
  opacity: 0.8;
  transition: 0.3s;
}

nav a:hover {
  color: var(--accent);
  opacity: 1;
}

.hero {
  text-align: center;
  padding: 70px 20px 40px;
}

.hero h1 {
  color: var(--accent);
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.hero p {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 15px;
  padding: 20px;
}

.card {
  background: var(--card);
  padding: 22px;
  border-radius: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  font-size: 1.1rem;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(212, 175, 55, 0.2);
}

.poet {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

.categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 10px 0 10px;
}

.categories button {
  font-family: 'Noto Nastaliq Urdu', serif;
  background: var(--card);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.categories button,
.lang-btn,
.theme-btn,
.controls button {
  transition: 0.3s ease, box-shadow 0.3s ease;
}

.categories button:hover,
.lang-btn:hover,
.theme-btn:hover,
.controls button:hover {
  background-color: #d4af37;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.controls, .categories {
  flex-wrap: wrap;
  justify-content: center;
}

.search-box {
  display: flex;
  justify-content: center;
  margin: 30px 4px 10px;
}

.search-box input {
  width: 100%;
  max-width: 400px;
  padding: 12px 18px;
  border-radius: 30px;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1rem;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
}

.categories button:hover,
.categories button.active {
  background: var(--accent);
  color: #000;
}

footer {
  background: #050713;
  text-align: center;
  padding: 25px 15px;
  color: var(--muted);
  margin-top: 40px;
}

/* =================== FIXED GHAZAL STYLING =================== */
.poem-page-section {
  width: 100%;
  margin: 0 auto;
  padding: 20px 0;
}

.poem-page {
  white-space: pre-line;
  direction: rtl;
  margin: 0 auto;
  font-size: 22px;
  line-height: 2.8;
  text-align: justify; /* Changed from justify to right */
  padding: 0;
  font-family: 'Noto Nastaliq Urdu', serif;
  letter-spacing: normal;
  text-align-last: justify;
  word-spacing: normal;
  width: 100%;
  max-width: 600px; /* Fixed maximum width */
}

/* Default (desktop) - Fixed container */
.poem-page-section section {
  margin: 0 auto;
  width: 90%;
  max-width: 600px; /* Prevents excessive width on large screens */
}

/* =================== POEM ACTIONS =================== */
.poem-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
  margin: 25px auto;
  width: 90%;
  max-width: 600px;
}

.poem-actions button {
  background: var(--card);
  color: #f5f5f5;
  border: 1px solid var(--accent);
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.3s;
  font-family: 'Noto Nastaliq Urdu', serif;
  font-size: 16px;
  min-width: 120px;
}

.poem-actions button:hover {
  background: var(--accent);
  color: #000;
}

.share-buttons {
  display: flex;
  gap: 15px;
  align-items: center;
}

.share-buttons i {
  color: var(--accent);
  font-size: 22px;
  cursor: pointer;
  transition: 0.3s;
}

.share-buttons i:hover {
  color: #f5f5f5;
  transform: scale(1.1);
}

/* =================== RESPONSIVE ADJUSTMENTS =================== */
@media (max-width: 1024px) {
  .poem-page-section section {
    width: 80%;
  }
  .poem-page {
    font-size: 15.5px;
    line-height: 2.5;
  }
}

@media (max-width: 768px) {
  .slide h1 {
    font-size: 1.6rem;
  }
  .slide p {
    font-size: 1rem;
  }
  .slide span {
    font-size: 0.8rem;
  }
  
  .poem-page-section section {
    width: 90%;
  }
  .poem-page {
    font-size: 15px;
    line-height: 2.2;
  }
  
  .poem-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .poem-actions button {
    width: 100%;
    max-width: 200px;
  }
  
  .share-buttons {
    gap: 20px;
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.4rem;
  }
  .hero p {
    font-size: 0.9rem;
  }
  .card {
    font-size: 1rem;
    padding: 18px;
  }
  .categories button,
  .lang-btn,
  .theme-btn,
  .controls button {
    padding: 5px 10px;
    font-size: 0.9rem;
  }
  
  .poem-page-section section {
    width: 95%;
  }
  .poem-page {
    font-size: 14.5px;
    line-height: 2.0;
  }
}

/* =================== POET GHAZAL LIST =================== */
.poet-ghazal-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 20px;
  direction: rtl;
}

.ghazal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(145deg, #0b0f1a, #141a33);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
  min-height: 52px;
  color: #f5f5f5;
  font-family: "Noto Nastaliq Urdu", serif;
  transition: 0.3s ease;
}

.ghazal-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}

.ghazal-title {
  font-size: 16px;
  flex: 1;
  text-align: right;
  padding-left: 10px;
}

.ghazal-meta {
  font-size: 13px;
  color: #d4af37;
  margin-left: 12px;
  white-space: nowrap;
}

.open-btn {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid #d4af37;
  color: #d4af37;
  text-decoration: none;
  font-size: 13px;
  transition: 0.3s;
  white-space: nowrap;
}

.open-btn:hover {
  background: #d4af37;
  color: #000;
}

@media (max-width: 768px) {
  .poet-ghazal-list {
    grid-template-columns: 1fr;
  }

  .ghazal-title {
    font-size: 15px;
  }
}


/* Searching for poet and ghazal styling  */
/* ================= SEARCH STYLES ================= */
.search-box {
  position: relative;
  margin: 30px auto;
  max-width: 500px;
  padding: 0 20px;
}

.search-box input {
  width: 100%;
  padding: 15px 20px;
  font-size: 18px;
  border: 2px solid var(--accent);
  border-radius: 50px;
  background: var(--card);
  color: var(--text);
  font-family: 'Noto Nastaliq Urdu', serif;
  text-align: right;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3);
  border-color: var(--accent);
}

.search-box input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

/* Search Results Container */
.search-results-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 0 20px;
}

.search-section {
  margin-bottom: 40px;
}

.section-title {
  color: var(--accent);
  font-size: 22px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  font-size: 20px;
}

/* Poet Cards */
.poets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.search-poet-card {
  background: var(--card);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  display: block;
}

.search-poet-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.2);
  border-color: var(--accent);
}

.poet-card-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poet-name {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 5px;
}

.poet-bio {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  height: 40px;
  overflow: hidden;
}

.poet-link {
  font-size: 14px;
  color: var(--accent);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Search Items */
.search-item {
  text-decoration: none;
  color: inherit;
  display: block;
  margin-bottom: 15px;
}

.search-card {
  background: var(--card);
  border: 1px solid rgba(212, 175, 55, 0.1);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.search-card:hover {
  transform: translateX(-5px);
  border-color: var(--accent);
  box-shadow: 0 5px 20px rgba(212, 175, 55, 0.15);
}

.search-content {
  flex: 1;
  padding-left: 20px;
}

.search-content p {
  font-size: 18px;
  line-height: 2;
  margin-bottom: 10px;
  color: var(--text);
}

.search-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--muted);
}

.search-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.search-arrow {
  color: var(--accent);
  font-size: 20px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.search-card:hover .search-arrow {
  opacity: 1;
  transform: translateX(-5px);
}

/* Highlight */
.highlight {
  background-color: rgba(212, 175, 55, 0.3);
  color: var(--accent);
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: bold;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.no-results i {
  font-size: 60px;
  color: var(--accent);
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-results h3 {
  font-size: 24px;
  margin-bottom: 10px;
  color: var(--text);
}

.no-results p {
  font-size: 16px;
  margin-bottom: 10px;
}

.suggestion {
  font-size: 14px;
  color: var(--muted);
  margin-top: 20px;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--accent);
  font-size: 18px;
}

/* Error */
.error {
  text-align: center;
  padding: 40px;
  color: #ff6b6b;
  font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .poets-grid {
    grid-template-columns: 1fr;
  }
  
  .search-card {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .search-content {
    padding-left: 0;
    padding-bottom: 15px;
  }
  
  .search-arrow {
    align-self: flex-end;
  }
  
  .search-box input {
    font-size: 16px;
    padding: 12px 18px;
  }
  
  .section-title {
    font-size: 20px;
  }
  
  .search-content p {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .search-results-container {
    padding: 0 15px;
  }
  
  .search-card {
    padding: 15px;
  }
  
  .search-meta {
    flex-direction: column;
    gap: 10px;
  }
}

  .logo img {
    height: 100px;
    width: 100px;
    margin-top:25px;
    border-radius:100px;
  }