/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a, a:link, a:visited, a:hover, a:active {
  color: inherit;
  text-decoration: none;
}

/* ── Base ── */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  background: #000;
  color: #fff;
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Container ── */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 64px 32px;
}

/* ── Landing ── */
.site-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.subtitle {
  font-size: 1.05rem;
  color: #7d7d7d;
  font-weight: 400;
  margin-bottom: 4px;
}

.daily-note {
  font-size: 0.75rem;
  color: #6e6e6e;
  font-weight: 400;
  margin-bottom: 10px;
}

.share-hadith {
  font-size: 0.7rem;
  color: #666;
  font-style: italic;
  margin: 10px auto 14px;
  max-width: 500px;
  text-align: center;
}

.header-divider {
  height: 1px;
  background: #1a1a1a;
  margin-bottom: 36px;
}

/* ── Search Bar ── */
.search-wrap {
  margin-bottom: 20px;
}

.search-bar {
  width: 100%;
  padding: 8px 12px;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.12s;
}

.search-bar::placeholder {
  color: #333;
}

.search-bar:focus {
  border-color: #333;
}

.search-bar:focus::placeholder {
  color: #555;
}

/* ── Channel Label ── */
.channel-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #1a1a1a;
  font-size: 0.85rem;
  font-weight: 500;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.channel-label .hash {
  color: #333;
  font-size: 1rem;
}

/* ── Forum List ── */
.forum-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.forum-card {
  display: block;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  padding: 18px 22px;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
  width: 100%;
}

.forum-card:hover {
  background: #111;
  border-color: #333;
}

.forum-card:active {
  background: #141414;
}

.forum-card .forum-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.new-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #1a3a1a;
  color: #4ade80;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1;
}

.forum-card .forum-desc {
  font-size: 0.825rem;
  color: #444;
}

/* ── Lesson View ── */
.lesson-view {
  display: none;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #555;
  cursor: pointer;
  font-size: 0.85rem;
  margin-bottom: 28px;
  transition: color 0.1s;
}

.back-btn:hover {
  color: #fff;
}

.lesson-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
  line-height: 1.25;
}

/* ── Markdown Content Styling ── */
.lesson-content {
  font-size: 0.95rem;
  line-height: 1.85;
  color: #bbb;
}

/* Paragraphs */
.lesson-content p {
  margin-bottom: 18px;
}

/* Bold / Italic */
.lesson-content strong {
  color: #fff;
  font-weight: 600;
}

.lesson-content em {
  color: #888;
  font-style: italic;
}

/* Blockquote */
.lesson-content blockquote {
  border-left: 2px solid #333;
  padding: 12px 16px;
  margin: 20px 0;
  background: #0a0a0a;
  border-radius: 0 4px 4px 0;
  color: #777;
  font-style: italic;
}

.lesson-content blockquote strong {
  color: #999;
}

/* Headings */
.lesson-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 36px 0 14px 0;
  letter-spacing: -0.01em;
  color: #fff;
}

.lesson-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 24px 0 10px 0;
  color: #ddd;
}

/* Horizontal rule */
.lesson-content hr {
  border: none;
  border-top: 1px solid #1a1a1a;
  margin: 28px 0;
}

/* Tables */
.lesson-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.88rem;
}

.lesson-content th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid #333;
  color: #fff;
  font-weight: 600;
  background: #0a0a0a;
}

.lesson-content td {
  padding: 10px 14px;
  border-bottom: 1px solid #1a1a1a;
  color: #aaa;
}

.lesson-content tbody tr:hover td {
  background: #0f0f0f;
}

/* Lists */
.lesson-content ul,
.lesson-content ol {
  margin: 10px 0 18px 22px;
  color: #aaa;
}

.lesson-content li {
  margin-bottom: 6px;
}

/* Inline code */
.lesson-content code {
  background: #111;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.85em;
  color: #777;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Bottom line box */
.lesson-content .bottom-line {
  margin-top: 40px;
  padding: 16px 20px;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #888;
}

.lesson-content .bottom-line strong {
  color: #fff;
}

/* ── Step boxes (for numbered steps) ── */
.lesson-content .step-box {
  margin: 16px 0;
  padding: 14px 18px;
  background: #0a0a0a;
  border-left: 2px solid #333;
  border-radius: 0 4px 4px 0;
}

.lesson-content .step-box strong {
  color: #fff;
}

/* ── Loading Screen ── */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.4s ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #111;
  border-top: 3px solid #fff;
  border-left: 3px solid #444;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: #444;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #000;
}

::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #333;
}

/* ── Honeypot (bot trap, hidden from humans) ── */
.hp-field {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  opacity: 0;
  overflow: hidden;
}

/* ── Daily Lesson Card ── */
.daily-card {
  background: linear-gradient(135deg, #0f0f12 0%, #0a0a0f 100%);
  border: 1px solid #1e1e2a;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

.daily-card:hover {
  border-color: #2a2a3a;
}

.daily-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6b6b7a;
  font-weight: 500;
  margin-bottom: 8px;
}

.daily-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: #e0e0e8;
}

.daily-desc {
  font-size: 0.82rem;
  color: #6b6b7a;
  line-height: 1.5;
  margin-bottom: 12px;
}

.daily-actions {
  display: flex;
  gap: 8px;
}

.daily-read-btn,
.daily-random-btn {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  font-family: inherit;
}

.daily-read-btn {
  background: #fff;
  color: #000;
}

.daily-read-btn:hover {
  background: #ddd;
}

.daily-random-btn {
  background: transparent;
  color: #6b6b7a;
  border: 1px solid #1e1e2a;
}

.daily-random-btn:hover {
  border-color: #3a3a4a;
  color: #aaa;
}

/* ── AI Widget (Hakeem) ── */
@media (max-width: 600px) {
  .container {
    padding: 36px 18px;
  }

  .site-title {
    font-size: 2rem;
  }

  .lesson-title {
    font-size: 1.5rem;
  }

  .forum-card {
    padding: 14px 16px;
  }
}
