/* src/styles/theme.css - mucahitarslan.com ile Senkronize Tasarım Dili */

:root {
  --paper: #f4f1e9;
  --ink: #151513;
  --muted: #67655e;
  --line: #c9c5ba;
  --accent: #d95d39;
  --lime: #c9d66b;
  --blue: #8fa9c6;
  --max: 1280px;
  --pad: clamp(1rem, 3.5vw, 3.5rem);
  --code-bg: #1e1e1e;
  --code-text: #d4d4d4;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

[data-theme="dark"] {
  --paper: #0e0f10;
  --ink: #e8e6df;
  --muted: #95938a;
  --line: #27282b;
  --accent: #e2633e;
  --lime: #9ec244;
  --blue: #405775;
  --code-bg: #161719;
  --code-text: #f0f0f0;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.2s ease;
}
.header-container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}
.wordmark {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.08em;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  white-space: nowrap;
}
.wordmark span { color: var(--accent); }
.wordmark-sub {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 0.5rem;
  margin-left: 0.25rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.8vw, 1.8rem);
}
.site-nav a {
  font-size: 0.9rem;
  font-weight: 700;
  transition: color 0.15s ease;
}
.site-nav a:hover, .site-nav a.active { color: var(--accent); }
.site-nav a.main-site-link {
  color: var(--muted);
  font-size: 0.85rem;
}
.site-nav a.main-site-link:hover { color: var(--ink); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* THEME TOGGLE (mucahitarslan.com ile Birebir Aynı Tasarım) */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: 2rem;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.theme-toggle-btn:hover,
.theme-toggle-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-label {
  font-size: 0.78rem;
  font-weight: 700;
}

/* Light modda: Güneş gösterilir, ay gizlenir */
:root:not([data-theme="dark"]) .dark-icon {
  display: none;
}

/* Dark modda: Ay gösterilir, güneş gizlenir */
[data-theme="dark"] .light-icon {
  display: none;
}

/* NAV TOGGLE (MOBİL MENÜ BUTONU - Her zaman görünür ve sabit) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.32rem 0.6rem;
  border-radius: 2rem;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: max-content;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* PWA INSTALL BUTTON (Header) */
.pwa-install-btn {
  display: none;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.32rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: 2rem;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.pwa-install-btn:hover,
.pwa-install-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.pwa-install-btn .pwa-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pwa-install-btn .pwa-label-mobile {
  display: none;
}

/* PWA INSTALL BUTTON (Mobile Nav Menüsü) */
.pwa-install-mobile-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px dashed var(--accent);
  color: var(--accent);
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: 2rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  width: auto;
  align-self: flex-start;
  margin-top: 0.25rem;
}
.pwa-install-mobile-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

/* PWA INSTALL LINK (Footer) */
.pwa-install-footer-link {
  display: none;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.18s ease;
}
.pwa-install-footer-link:hover {
  opacity: 0.8;
}

/* SEARCH BAR (Header Search) */
.search-form {
  position: relative;
  margin: 0;
  display: flex;
  align-items: center;
}
.search-input {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  height: 2.15rem;
  line-height: normal;
  margin: 0;
  padding: 0 0.85rem 0 2.2rem;
  font-size: 0.82rem;
  font-family: inherit;
  border-radius: 2rem;
  width: 170px;
  box-sizing: border-box;
  display: block;
  transition: width 0.25s ease, border-color 0.2s ease;
}
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration {
  display: none;
}
.search-input:focus {
  width: 210px;
  outline: none;
  border-color: var(--accent);
}
.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.mobile-search { display: none; }
.desktop-search { display: flex; }

/* LIVE SEARCH DROPDOWN RESULTS */
.live-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 380px;
  overflow-y: auto;
  min-width: 280px;
  text-align: left;
}
.desktop-search .live-search-results {
  right: 0;
  left: auto;
  width: 320px;
}
.live-search-item {
  display: block;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease;
}
.live-search-item:last-child {
  border-bottom: none;
}
.live-search-item:hover,
.live-search-item.is-selected {
  background: rgba(217, 93, 57, 0.08);
}
.live-search-item-title {
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.live-search-item-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
}
.live-search-item-meta span.category {
  color: var(--accent);
}
.live-search-item-summary {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.2rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.live-search-empty {
  padding: 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.live-search-view-all {
  display: block;
  padding: 0.65rem 1rem;
  background: rgba(0, 0, 0, 0.03);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
  border-top: 1px solid var(--line);
}
.live-search-view-all:hover {
  background: rgba(217, 93, 57, 0.1);
}

/* FOOTER CENTERED SEARCH */
.footer-search-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
  text-align: center;
}
.footer-search-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
}
.footer-search-form {
  position: relative;
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
}
.footer-search-input {
  -webkit-appearance: none;
  appearance: none;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  height: 2.75rem;
  line-height: 2.75rem;
  padding: 0 1.25rem 0 2.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  border-radius: 2rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.footer-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 93, 57, 0.15);
}
.footer-search-form .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.footer-search-form .live-search-results {
  top: calc(100% + 8px);
  width: 100%;
  left: 0;
  right: 0;
}

/* RESPONSIVE HEADER */
@media (max-width: 860px) {
  .desktop-search { display: none; }
  .nav-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }
  
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem var(--pad);
    gap: 1rem;
    z-index: 100;
  }
  .site-nav.is-open { display: flex; }
  
  .mobile-search {
    display: flex;
    width: 100%;
    margin-top: 0.5rem;
  }
  .mobile-search .search-input {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .pwa-install-btn .pwa-label-desktop {
    display: none;
  }
  .pwa-install-btn .pwa-label-mobile {
    display: inline;
  }
  .pwa-install-btn {
    padding: 0.3rem 0.48rem;
    font-size: 0.72rem;
  }
}

@media (max-width: 520px) {
  .header-container {
    padding: 0.7rem clamp(0.6rem, 2.5vw, 1rem);
    gap: 0.35rem;
  }
  .header-actions {
    gap: 0.3rem;
  }
  .wordmark {
    font-size: 1.22rem;
    gap: 0.2rem;
  }
  .wordmark-sub {
    font-size: 0.7rem;
    padding-left: 0.35rem;
    margin-left: 0.15rem;
  }
  .theme-toggle-btn .theme-label {
    display: none;
  }
  .theme-toggle-btn {
    padding: 0.32rem 0.45rem;
  }
}

@media (max-width: 380px) {
  .pwa-install-btn .pwa-label-mobile {
    display: none;
  }
  .pwa-install-btn {
    padding: 0.32rem 0.42rem;
  }
  .wordmark-sub {
    display: none;
  }
}

/* SECTION & TYPOGRAPHY */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) var(--pad);
  width: 100%;
  box-sizing: border-box;
}
.eyebrow {
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--accent);
}
h1, h2, h3, h4 {
  margin-top: 0;
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3.8vw, 2.8rem); }
h3 { font-size: 1.4rem; }

/* HERO BANNER */
.blog-hero {
  border-bottom: 1px solid var(--line);
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
}
.blog-hero h1 em {
  font-family: Georgia, serif;
  font-weight: 400;
  color: var(--accent);
  font-style: italic;
}
.blog-lead {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 48rem;
  margin: 1rem 0 0;
  line-height: 1.6;
}

/* FILTER PILLS */
.filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 2.5rem;
  max-width: 100%;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 2rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.filter-pill:hover, .filter-pill.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.filter-pill .count {
  font-size: 0.7rem;
  opacity: 0.75;
}

/* POSTS GRID */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  width: 100%;
}
@media (max-width: 580px) {
  .posts-grid { grid-template-columns: 1fr; }
}

.post-card {
  border-top: 1px solid var(--ink);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease;
}
.post-card:hover { transform: translateY(-3px); }
.post-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.post-card-meta .category-badge { color: var(--accent); }
.post-card-title {
  font-size: 1.4rem;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}
.post-card-summary {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}
.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
  margin-top: auto;
}
.read-more-link {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* BUTTONS */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 0.15rem;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
  box-sizing: border-box;
  font-family: inherit;
}
.button:hover { transform: translateY(-2px); }
.button-dark { background: var(--ink); color: var(--paper); }
.button-light { background: transparent; color: var(--ink); }
.button-accent { background: var(--accent); color: #fff; border-color: var(--accent); }

/* NEWSLETTER BANNER (Masaüstü ve Mobilde Kusursuz Ortalanmış) */
.newsletter-card {
  border: 1px solid var(--line);
  background: rgba(217, 93, 57, 0.05);
  padding: clamp(1.8rem, 4vw, 3.2rem);
  margin: 3.5rem 0;
  border-radius: 0.2rem;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.newsletter-card .eyebrow {
  margin-bottom: 0.5rem;
  text-align: center;
}
.newsletter-card h2, .newsletter-card h3 {
  margin-bottom: 0.5rem;
  text-align: center;
}
.newsletter-card p {
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto 1.5rem auto;
  text-align: center;
  font-size: 0.95rem;
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 480px;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  margin: 0 auto;
}
.newsletter-input-group {
  display: flex;
  gap: 0.6rem;
  width: 100%;
  box-sizing: border-box;
}
.newsletter-input {
  flex: 1;
  min-width: 0;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.95rem;
  border-radius: 0.15rem;
  box-sizing: border-box;
  font-family: inherit;
}
.newsletter-input:focus { outline: none; border-color: var(--accent); }
.newsletter-btn {
  flex-shrink: 0;
  white-space: nowrap;
}
.newsletter-turnstile-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 580px) {
  .newsletter-input-group {
    flex-direction: column;
  }
  .newsletter-btn {
    width: 100%;
  }
  .filter-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.4rem;
    margin: 1.25rem calc(var(--pad) * -1) 2rem;
    padding: 0.1rem var(--pad) 0.4rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .filter-strip::-webkit-scrollbar { display: none; }
  .filter-pill {
    flex: 0 0 auto;
    justify-content: center;
    padding: 0.4rem 0.8rem;
    font-size: 0.78rem;
    scroll-snap-align: start;
  }
}

/* POST DETAIL VIEW */
.post-detail-header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2rem;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}
.post-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 1.25rem;
}
.post-featured-image {
  display: block;
  width: 100%;
  max-width: 52rem;
  max-height: 520px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  margin: 2.5rem auto;
  box-sizing: border-box;
}
.post-content {
  font-size: 1.12rem;
  line-height: 1.8;
  max-width: 52rem;
  margin: 0 auto;
  overflow-wrap: break-word;
}
.post-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.post-content h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.post-content p { margin-bottom: 1.5rem; }
.post-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.4rem;
  margin: 2rem 0;
  background: rgba(217, 93, 57, 0.05);
  border-radius: 0 0.25rem 0.25rem 0;
  color: var(--ink);
}
.post-content blockquote p {
  margin: 0;
  line-height: 1.7;
}
.post-content blockquote p + p {
  margin-top: 0.75rem;
}

.post-content ul,
.post-content ol {
  margin: 1.5rem 0;
  padding-left: 1.75rem;
}
.post-content li {
  margin-bottom: 0.45rem;
  line-height: 1.7;
}

/* POST CONTENT TABLES (Duyarlı ve Temiz Çerçeveli Tablolar) */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 2.2rem 0;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  background: var(--paper);
  -webkit-overflow-scrolling: touch;
}
.post-table,
.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.55;
  text-align: left;
  margin: 0;
}
.post-table th,
.post-content table th {
  background: rgba(0, 0, 0, 0.035);
  color: var(--ink);
  font-weight: 800;
  padding: 0.85rem 1.1rem;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
[data-theme="dark"] .post-table th,
[data-theme="dark"] .post-content table th {
  background: rgba(255, 255, 255, 0.05);
}
.post-table td,
.post-content table td {
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}
.post-table tr:last-child td,
.post-content table tr:last-child td {
  border-bottom: none;
}
.post-table tr:hover,
.post-content table tr:hover {
  background: rgba(217, 93, 57, 0.04);
}
.post-table code,
.post-content table code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  padding: 0.15rem 0.35rem;
  border-radius: 0.2rem;
  background: rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] .post-table code,
[data-theme="dark"] .post-content table code {
  background: rgba(255, 255, 255, 0.08);
}

/* POST FIGURES & IMAGES (Otomatik Ortalanmış ve İnce Çerçeveli) */
.post-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 2.5rem auto;
  max-width: 100%;
  text-align: center;
  padding: 0;
}
.post-figure img,
.post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  box-sizing: border-box;
  background: var(--paper);
}
.post-figure figcaption {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  font-style: italic;
  max-width: 90%;
  line-height: 1.4;
}

/* CODE BLOCKS WITH COPY BUTTON */
.code-block-wrapper {
  position: relative;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 0.35rem;
  margin: 2rem 0;
  overflow: hidden;
  border: 1px solid var(--line);
  max-width: 100%;
}
.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
}
.copy-code-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  border-radius: 0.2rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.copy-code-btn:hover { background: var(--accent); }
.code-block-wrapper pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem var(--pad) 3rem;
  max-width: var(--max);
  margin: 4rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-sizing: border-box;
  width: 100%;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  width: 100%;
  box-sizing: border-box;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  align-items: center;
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 2.5rem var(--pad) 2rem;
    margin: 2.5rem auto 0;
  }
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    width: 100%;
    justify-content: flex-start;
  }
}

/* ADMIN PANEL STYLES */
.admin-container {
  max-width: var(--max);
  margin: 2rem auto;
  padding: 0 var(--pad);
  box-sizing: border-box;
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.admin-nav {
  display: flex;
  gap: 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  flex-wrap: wrap;
}
.admin-nav a.active { color: var(--accent); border-bottom: 2px solid var(--accent); padding-bottom: 0.25rem; }

/* MEDIUM STYLE EDITOR */
.editor-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  min-height: 650px;
}
@media (max-width: 900px) {
  .editor-container { grid-template-columns: 1fr; }
}
.editor-sidebar {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.editor-pane, .preview-pane {
  display: flex;
  flex-direction: column;
}
.editor-textarea {
  width: 100%;
  flex: 1;
  min-height: 500px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  border-radius: 0.2rem;
  box-sizing: border-box;
}
.editor-textarea:focus { outline: none; border-color: var(--accent); }
.preview-box {
  border: 1px solid var(--line);
  padding: 1.5rem;
  min-height: 500px;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 0.2rem;
}

/* TABLES IN ADMIN */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 1.5rem;
}
.data-table th, .data-table td {
  padding: 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.data-table th {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

/* STATS CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.stat-card {
  border: 1px solid var(--line);
  padding: 1.5rem;
  border-radius: 0.2rem;
  background: rgba(255, 255, 255, 0.02);
}
.stat-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1.1;
  margin: 0.5rem 0 0;
}

/* GÜNCELLEME BİLDİRİM TOAST ÇUBUĞU */
.update-toast-banner {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10001;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.update-toast-banner:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.update-toast-content {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--accent);
  padding: 0.7rem 1.2rem;
  border-radius: 2rem;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.update-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: spinSync 2s linear infinite;
}
@keyframes spinSync {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@media (max-width: 600px) {
  .update-toast-banner {
    bottom: 1.25rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: center;
  }
  .update-toast-content {
    width: 100%;
    justify-content: center;
    text-align: center;
    font-size: 0.78rem;
    padding: 0.65rem 1rem;
  }
}

