/**
 * JeNNa - Bileşen Stilleri (components.css)
 * Okuma alanı, yorumlar, OTP modalı, Admin paneli, arama ve post-it notları
 */

/* ==========================================================
   SOL SAYFA: İNDEKS & ARAMA & KATEGORİLER
   ========================================================== */
.page-inner-header {
  margin-bottom: 24px;
}

.page-title {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--title-navy, #182e4e);
  margin: 0 0 6px 0;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* Arama Kutusu */
.search-box-wrapper {
  margin-bottom: 20px;
  position: relative;
}

.notebook-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 16px 10px 38px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(180, 160, 140, 0.4);
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.notebook-search-input:focus {
  background: #ffffff;
  border-color: var(--brand-terracotta);
  box-shadow: 0 0 0 3px rgba(184, 93, 56, 0.1);
}

.search-box-wrapper::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 9px;
  font-size: 13px;
  opacity: 0.6;
}

/* Kategori Filtresi Bildirimi */
.filter-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(82, 121, 111, 0.1);
  border-left: 3px solid var(--brand-sage);
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 12.5px;
}

.filter-clear-btn {
  background: none;
  border: none;
  color: var(--brand-sage);
  font-weight: 700;
  cursor: pointer;
  font-size: 12px;
}

/* İndeks Yazı Listesi */
.articles-index-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.index-item {
  display: flex;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.index-item:hover {
  background: #ffffff;
  border-color: rgba(184, 93, 56, 0.3);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.index-item.selected {
  background: #ffffff;
  border-left: 4px solid var(--brand-terracotta);
  box-shadow: 0 6px 16px rgba(184, 93, 56, 0.12);
}

.index-number {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.6;
  min-width: 24px;
}

.index-item.selected .index-number {
  color: var(--brand-terracotta);
  opacity: 1;
}

.index-content {
  flex: 1;
}

.index-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.index-cat {
  font-weight: 600;
  color: var(--brand-terracotta);
}

.index-title {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.3;
  margin: 0 0 4px 0;
  color: var(--title-navy, #182e4e);
  transition: color 0.2s ease;
}

.index-item:hover .index-title {
  color: var(--title-navy-hover, #234975);
}

.index-excerpt {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* Kategoriler Izgarası */
.categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

.category-card {
  background: #ffffff;
  padding: 18px 14px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-sage);
  box-shadow: 0 6px 16px rgba(82, 121, 111, 0.15);
}

.cat-icon {
  font-size: 26px;
  margin-bottom: 6px;
}

.cat-name {
  font-family: var(--font-serif);
  font-size: 15px;
  margin: 0 0 4px 0;
  color: var(--title-navy, #182e4e);
}

.cat-count {
  font-size: 11.5px;
  color: var(--brand-sage);
  font-weight: 600;
}

/* Son Yorumlar Zaman Tüneli */
.recent-notes-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recent-note-item {
  background: #ffffff;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  cursor: pointer;
  transition: all 0.2s ease;
}

.recent-note-item:hover {
  transform: translateX(4px);
  border-color: var(--brand-blue);
}

.note-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.avatar-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.note-date {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
}

.note-snippet {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0 0 6px 0;
  font-style: italic;
}

.note-post-ref {
  font-size: 11px;
  color: var(--brand-blue);
}

/* JeNNa Yazar Kartı */
.author-profile-card {
  background: #ffffff;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  text-align: center;
  margin-bottom: 24px;
}

.author-avatar-large {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--brand-plum);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 4px 12px rgba(122, 79, 109, 0.3);
}

.author-name {
  font-family: var(--font-serif);
  font-size: 22px;
  margin: 0 0 4px;
  color: var(--title-navy, #182e4e);
}

.author-tagline {
  font-family: var(--font-hand);
  font-size: 18px;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.author-bio-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.author-details-list {
  text-align: left;
  font-size: 12.5px;
  color: var(--text-muted);
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ==========================================================
   SAĞ SAYFA: YAZI OKUMA ALANI & TİPOGRAFİ
   ========================================================== */
.article-reader {
  max-width: 600px;
  margin: 0 auto;
}

.article-cat-badge {
  display: inline-block;
  background: rgba(184, 93, 56, 0.1);
  color: var(--brand-terracotta);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.article-title {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1.25;
  color: var(--title-navy, #182e4e);
  margin: 0 0 12px 0;
}

.article-meta-row {
  display: flex;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-muted);
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(180, 160, 140, 0.3);
  margin-bottom: 24px;
}

.article-body-content {
  font-size: 16px;
  line-height: 1.8;
  color: #2c2520;
}

.article-body-content h1,
.article-body-content h2,
.article-body-content h3,
.article-body-content h4 {
  font-family: var(--font-serif);
  color: var(--title-navy, #182e4e);
  margin: 28px 0 12px 0;
}

.article-body-content p {
  margin: 0 0 18px 0;
}

.article-body-content blockquote {
  margin: 24px 0;
  padding: 16px 20px 16px 24px;
  border-left: 3px solid var(--brand-terracotta);
  background: rgba(184, 93, 56, 0.04);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.6;
  color: #3d312a;
}

.article-footer-tags {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
}

.article-divider {
  text-align: center;
  margin: 36px 0 28px;
  color: var(--brand-terracotta);
  opacity: 0.5;
  letter-spacing: 6px;
}

/* ==========================================================
   YORUMLAR BÖLÜMÜ
   ========================================================== */
.comments-section {
  border-top: 2px dashed rgba(180, 160, 140, 0.4);
  padding-top: 24px;
}

.comments-section-header h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--title-navy, #182e4e);
  margin: 0 0 4px 0;
}

.comments-section-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 20px 0;
}

/* Giriş Yapmamış Ziyaretçi İçin Kilitli Yorum Alanı */
.comment-box-locked {
  background: #ffffff;
  border: 2px dashed rgba(184, 93, 56, 0.35);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 24px;
}

.comment-box-locked:hover {
  border-color: var(--brand-terracotta);
  background: rgba(254, 243, 199, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(184, 93, 56, 0.12);
}

.lock-icon {
  font-size: 28px;
  margin-bottom: 8px;
  display: inline-block;
}

.lock-overlay-content h4 {
  font-family: var(--font-serif);
  font-size: 18px;
  margin: 0 0 6px 0;
  color: var(--text-primary);
}

.lock-overlay-content p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.btn-notebook-login {
  background: var(--brand-terracotta);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(184, 93, 56, 0.25);
  transition: all 0.2s ease;
}

.btn-notebook-login:hover {
  background: #9c4c2a;
}

/* Giriş Yapmış Kullanıcı Yorum Kutusu */
.comment-box-active {
  background: #ffffff;
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.logged-in-user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-text-logout {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.notebook-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(180, 160, 140, 0.4);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  resize: vertical;
  min-height: 90px;
  outline: none;
  transition: all 0.2s ease;
}

.notebook-textarea:focus {
  background: #fff;
  border-color: var(--brand-terracotta);
  box-shadow: 0 0 0 3px rgba(184, 93, 56, 0.1);
}

.comment-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.char-count {
  font-size: 11.5px;
  color: var(--text-muted);
}

.btn-notebook-action {
  background: var(--brand-terracotta);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(184, 93, 56, 0.3);
  transition: all 0.2s ease;
}

.btn-notebook-action:hover {
  background: #9c4c2a;
}

/* Yorum Listesi Kartları */
.comments-list-stream {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-card {
  background: #ffffff;
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.comment-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1eae2;
  color: var(--brand-terracotta);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border: 1px solid rgba(184, 93, 56, 0.2);
}

.comment-author-name {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
}

.comment-time {
  font-size: 11px;
  color: var(--text-muted);
}

.comment-like-btn {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.comment-like-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.comment-like-btn.liked {
  background: #fee2e2;
  border-color: #f87171;
  color: #ef4444;
}

.comment-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.empty-comments-box {
  background: rgba(0, 0, 0, 0.02);
  border: 1px dashed rgba(180, 160, 140, 0.4);
  padding: 24px;
  text-align: center;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* ==========================================================
   POST-IT VE YAPIŞKAN NOTLAR
   ========================================================== */
.post-it-note {
  padding: 16px 20px;
  border-radius: 4px;
  box-shadow: 3px 5px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  font-family: var(--font-hand);
}

.post-it-yellow {
  background: #fef08a;
  color: #451a03;
  transform: rotate(-1.5deg);
}

.post-it-pink {
  background: #fbcfe8;
  color: #701a75;
  transform: rotate(1.5deg);
}

.post-it-note h5 {
  font-size: 17px;
  margin: 0 0 6px 0;
}

.post-it-note p {
  font-size: 19px;
  line-height: 1.35;
  margin: 0;
}

/* İletişim Kağıdı */
.contact-paper-container {
  max-width: 500px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.notebook-input {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid rgba(180, 160, 140, 0.4);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}

.notebook-input:focus {
  border-color: var(--brand-terracotta);
}

/* ==========================================================
   MODAL PENCERELERİ (OTP & ADMIN)
   ========================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(14, 12, 11, 0.75);
  backdrop-filter: blur(5px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-overlay.active {
  display: flex;
}

/* OTP Modal Kartı */
.otp-modal-card {
  background: #fdfbf7;
  border-radius: 14px;
  width: 100%;
  max-width: 440px;
  padding: 32px 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid #e2d8ca;
  position: relative;
  box-sizing: border-box;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-close-btn:hover {
  color: #000;
}

.modal-header-icon {
  font-size: 38px;
  text-align: center;
  margin-bottom: 12px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 24px;
  text-align: center;
  color: var(--title-navy, #182e4e);
  margin: 0 0 8px 0;
}

.modal-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  text-align: center;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

/* 6 Haneli OTP Kod Kutuları */
.otp-digit-group {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}

.otp-digit-input {
  width: 44px;
  height: 52px;
  border: 2px solid rgba(180, 160, 140, 0.5);
  border-radius: 8px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-sans);
  background: #ffffff;
  outline: none;
  transition: all 0.2s ease;
}

.otp-digit-input:focus {
  border-color: var(--brand-terracotta);
  box-shadow: 0 0 0 3px rgba(184, 93, 56, 0.15);
}

.modal-feedback-error {
  color: #dc2626;
  font-size: 12.5px;
  text-align: center;
  margin-top: 10px;
}

/* ==========================================================
   ADMIN PANELİ MODALI
   ========================================================== */
.admin-modal-card {
  background: #1e1b18;
  color: #ede5da;
  border-radius: 16px;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.admin-modal-header {
  padding: 20px 28px;
  background: #141210;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-modal-header h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin: 0;
  color: #f7ede2;
}

.admin-modal-nav {
  display: flex;
  background: #181513;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-tab-btn {
  background: none;
  border: none;
  color: #a89f91;
  padding: 14px 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.admin-tab-btn:hover {
  color: #fff;
}

.admin-tab-btn.active {
  color: #f7ede2;
  border-bottom-color: var(--brand-terracotta);
}

.admin-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}

.admin-tab-pane {
  display: none;
}

.admin-tab-pane.active {
  display: block;
}

/* Admin Tabloları */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table th {
  background: rgba(255, 255, 255, 0.03);
  color: #bfaea0;
  font-weight: 600;
}

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

.btn-sm {
  padding: 4px 10px;
  font-size: 11.5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
}

.btn-sm:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-delete {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

.btn-delete:hover {
  background: rgba(248, 113, 113, 0.15);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* Admin Formu */
.admin-form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-form-group label {
  font-size: 12.5px;
  color: #d1b89d;
  font-weight: 600;
}

.admin-input {
  background: #141210;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13.5px;
  outline: none;
}

.admin-input:focus {
  border-color: var(--brand-terracotta);
}

/* Toast Bildirimi */
.jenna-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #2b2520;
  color: #fdfbf7;
  padding: 14px 22px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-left: 4px solid var(--brand-terracotta);
  font-size: 13.5px;
  z-index: 200;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.jenna-toast.visible {
  transform: translateY(0);
  opacity: 1;
}
