/* === RESET & VARIABLES === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {

  --accent: #6c7bd8;  /* Ana renk */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth animations */

  --bg-primary: #0f1724;
  --bg-secondary: #1a1f3a;
  --bg-card: rgba(255, 255, 255, 0.02);
  --text-primary: #e6eef8;
  --text-muted: #9fb0c8;
  --accent: #6c7bd8;
  --accent-light: #8b5cf6;
  --success: #10b981;
  --border: rgba(255, 255, 255, 0.05);
  --shadow: rgba(0, 0, 0, 0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === LIGHT MODE === */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #e2e8f0;
  --bg-card: rgba(0, 0, 0, 0.02);
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --accent: #4f46e5;
  --accent-light: #7c3aed;
  --success: #059669;
  --border: rgba(0, 0, 0, 0.1);
  --shadow: rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* === CONTAINER === */
.container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 20px;
  overflow-x: hidden;
}


/* === MODERN COMPACT HEADER === */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px var(--shadow);
  position: relative;
  transition: var(--transition);
}

[data-theme="light"] .header {
  background: rgba(0, 0, 0, 0.02);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  margin: 0;
}

.stats {
  display: flex;
  gap: 8px;
}

.stat-badge {
  background: rgba(108, 123, 216, 0.15);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  border: 1px solid rgba(108, 123, 216, 0.3);
  white-space: nowrap;
  transition: var(--transition);
}

[data-theme="light"] .stat-badge {
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.25);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* === SEARCH BAR === */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search {
  padding: 8px 36px 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  width: 220px;
  font-size: 13px;
  transition: all 0.3s ease;
}

.search:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(108, 123, 216, 0.1);
  width: 280px;
  box-shadow: 0 0 0 3px rgba(108, 123, 216, 0.1);
}

[data-theme="light"] .search {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .search:focus {
  background: rgba(79, 70, 229, 0.05);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-icon {
  position: absolute;
  right: 10px;
  opacity: 0.5;
  pointer-events: none;
  font-size: 14px;
}

/* === ICON BUTTONS === */
.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 8px;
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 18px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  will-change: transform, background-color;
}

.icon-btn:hover {
  background: rgba(108, 123, 216, 0.2);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.icon-btn:active {
  transform: translateY(0);
}

.icon-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[data-theme="light"] .icon-btn {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .icon-btn:hover {
  background: rgba(79, 70, 229, 0.15);
}

/* === ACTIONS MENU (Dropdown) === */
.actions-menu {
  position: relative;
}

.menu-btn {
  background: linear-gradient(135deg, rgba(108, 123, 216, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(108, 123, 216, 0.4);
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.menu-btn:hover {
  background: linear-gradient(135deg, rgba(108, 123, 216, 0.3), rgba(139, 92, 246, 0.3));
  transform: translateY(-2px);
}

.menu-btn:active {
  transform: translateY(0);
}

.menu-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[data-theme="light"] .menu-btn {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(124, 58, 237, 0.15));
  border: 1px solid rgba(79, 70, 229, 0.3);
}

[data-theme="light"] .menu-btn:hover {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.25), rgba(124, 58, 237, 0.25));
}

.menu-text {
  font-weight: 600;
}

.menu-arrow {
  font-size: 10px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.actions-menu.active .menu-arrow {
  transform: rotate(180deg);
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  min-width: 200px;
  box-shadow: 0 8px 32px var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.actions-menu.active .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(108, 123, 216, 0.15);
}

[data-theme="light"] .dropdown-item:hover {
  background: rgba(79, 70, 229, 0.1);
}

.dropdown-item span:first-child {
  font-size: 16px;
  flex-shrink: 0;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* === HEADER RESPONSIVE === */
@media (max-width: 1200px) {
  .header {
    padding: 14px 20px;
  }
}

@media (max-width: 900px) {
  .stats {
    display: none;
  }

  .search {
    width: 160px;
  }

  .search:focus {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 12px 16px;
    gap: 12px;
  }

  .logo {
    font-size: 18px;
  }

  .header-right {
    gap: 8px;
  }

  .icon-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
}

@media (max-width: 600px) {
  .search-wrapper {
    display: none; /* Mobilde sidebar'da arama */
  }

  .menu-text {
    display: none; /* Sadece ikon */
  }

  .menu-btn {
    padding: 6px 12px;
    gap: 8px;
  }

  .dropdown {
    min-width: 180px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 10px 12px;
  }

  .logo {
    font-size: 16px;
  }

  .header-right {
    gap: 6px;
  }

  .icon-btn {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .menu-btn {
    padding: 6px 10px;
  }

  .menu-arrow {
    display: none;
  }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  .header,
  .icon-btn,
  .menu-btn,
  .dropdown,
  .dropdown-item,
  .menu-arrow {
    transition: none !important;
  }

  .icon-btn:hover,
  .menu-btn:hover {
    transform: none;
  }
}

/* === HIGH CONTRAST MODE === */
@media (prefers-contrast: high) {
  .header {
    border-width: 2px;
  }

  .icon-btn,
  .menu-btn {
    border-width: 2px;
  }
}


/* === LAYOUT === */
.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  min-height: calc(100vh - 250px);
}

/* === SIDEBAR === */
/* .sidebar { */
  /* background: var(--bg-card); */
  /* border-radius: 16px; */
  /* border: 1px solid var(--border); */
  /* padding: 20px; */
  /* max-height: calc(100vh - 200px); */
  /* overflow-y: auto; */
  /* position: sticky; */
  /* top: 20px; */
  /* transition: var(--transition); */
  /* will-change: transform; */
/* } */


/* === SIDEBAR === */
.sidebar {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  transition: var(--transition);
  will-change: transform;
}

.sidebar.collapsed {
  transform: translateX(-100%);
  position: fixed;
  left: -350px;
}

.sidebar-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.sidebar-header h4 {
  color: var(--accent);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* === NAVIGATION === */
.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category {
  margin-bottom: -2px;
}

.category-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  font-size: 12px;
  list-style: none;
  will-change: background-color, border-color;
}

.category-link:hover {
  /* background: rgba(108, 123, 216, 0.15); */
  background: rgba(108, 123, 216, 0.3);
  border-left-color: var(--accent);
}

[data-theme="light"] .category-link {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .category-link:hover {
  background: rgba(79, 70, 229, 0.1);
}

.category-name {
  flex: 1;
}

.badge {
  background: rgba(108, 123, 216, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

[data-theme="light"] .badge {
  background: rgba(79, 70, 229, 0.2);
}

.category-content {
  padding-left: 16px;
  margin-top: 8px;
}

.subcategory {
  margin-bottom: 6px;
}

.subcat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  list-style: none;
}

.subcat-link:hover {
  background: rgba(108, 123, 216, 0.1);
}

[data-theme="light"] .subcat-link:hover {
  background: rgba(79, 70, 229, 0.08);
}

.badge-sm {
  background: rgba(139, 92, 246, 0.3);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
}

[data-theme="light"] .badge-sm {
  background: rgba(124, 58, 237, 0.2);
}

.file-list {
  list-style: none;
  margin-top: 6px;
  padding-left: 8px;
}

.file-list li {
  margin-bottom: 2px;
}

.file-link {
  display: block;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-muted);
  border-radius: 6px;
  text-decoration: none;
  transition: var(--transition);
  will-change: background-color, color;
}

.file-link:hover {
  background: rgba(108, 123, 216, 0.1);
  color: var(--text-primary);
}

.file-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.file-link.active {
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-light);
  font-weight: 600;
}

.file-link.hidden {
  display: none;
}

[data-theme="light"] .file-link:hover {
  background: rgba(79, 70, 229, 0.08);
}

[data-theme="light"] .file-link.active {
  background: rgba(124, 58, 237, 0.15);
  color: var(--accent-light);
}

/* === CONTENT === */
.content {
  background: var(--bg-card);
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--border);
  min-height: 600px;
  overflow-x: hidden;
  max-width: 100%;
  transition: var(--transition);
}

/* === BREADCRUMB === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(108, 123, 216, 0.05);
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--accent-light);
}

[data-theme="light"] .breadcrumb {
  background: rgba(79, 70, 229, 0.05);
}

/* === META === */
.meta {
  margin-bottom: 32px;
  padding: 24px;
  border-radius: 12px;
  background: rgba(108, 123, 216, 0.05);
  border: 1px solid rgba(108, 123, 216, 0.2);
  transition: var(--transition);
}

.meta-title {
  color: var(--accent);
  font-size: 25px;
  font-weight: 700;
  margin-bottom: 12px;
}

.meta-desc {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 16px;
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  transition: var(--transition);
}

.tag:hover {
  background: rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .meta {
  background: rgba(79, 70, 229, 0.05);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

[data-theme="light"] .tag {
  background: rgba(124, 58, 237, 0.15);
  color: var(--accent-light);
  border: 1px solid rgba(124, 58, 237, 0.3);
}
/* === CODE BLOCK WRAPPER - YENİ YAPI === */
.code-block-wrapper {
  position: relative;
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(108, 123, 216, 0.2);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .code-block-wrapper {
  border: 1px solid rgba(79, 70, 229, 0.15);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* === CODE HEADER */

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--glass-border);
}

[data-theme="light"] .code-header {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(124, 58, 237, 0.08));
  border-bottom: 2px solid rgba(79, 70, 229, 0.2);
}

/* === LANGUAGE BADGE === */
.code-lang-badge {
  background: rgba(108, 123, 216, 0.4);
  color: #c4b5fd;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(108, 123, 216, 0.5);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .code-lang-badge {
  background: rgba(79, 70, 229, 0.2);
  color: #6366f1;
  border: 1px solid rgba(79, 70, 229, 0.3);
}

/* === COPY BUTTON === */
.code-block-wrapper .copy-btn {
  padding: 6px 16px;
  background: rgba(108, 123, 216, 0.5);
  border: 1px solid rgba(108, 123, 216, 0.6);
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.code-block-wrapper .copy-btn:hover {
  background: rgba(108, 123, 216, 0.7);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 123, 216, 0.3);
}

.code-block-wrapper .copy-btn:active {
  transform: translateY(0);
}

[data-theme="light"] .code-block-wrapper .copy-btn {
  background: rgba(79, 70, 229, 0.3);
  color: #4f46e5;
  border: 1px solid rgba(79, 70, 229, 0.4);
}

[data-theme="light"] .code-block-wrapper .copy-btn:hover {
  background: rgba(79, 70, 229, 0.4);
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.2);
}

/* === PRE & CODE === */
.code-block-wrapper pre {
  margin: 0;
  padding: 20px;
  background: #0a0e27;
  border: none;
  border-radius: 0 0 12px 12px;
  overflow-x: auto;
}

[data-theme="light"] .code-block-wrapper pre {
  background: #f8fafc;
}

.code-block-wrapper pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.7;
}

[data-theme="light"] .code-block-wrapper pre code {
  color: #1e293b;
}

/* Scrollbar styling */
.code-block-wrapper pre::-webkit-scrollbar {
  height: 8px;
}

.code-block-wrapper pre::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.code-block-wrapper pre::-webkit-scrollbar-thumb {
  background: rgba(108, 123, 216, 0.3);
  border-radius: 4px;
}

.code-block-wrapper pre::-webkit-scrollbar-thumb:hover {
  background: rgba(108, 123, 216, 0.5);
}

[data-theme="light"] .code-block-wrapper pre::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .code-block-wrapper pre::-webkit-scrollbar-thumb {
  background: rgba(79, 70, 229, 0.3);
}

[data-theme="light"] .code-block-wrapper pre::-webkit-scrollbar-thumb:hover {
  background: rgba(79, 70, 229, 0.5);
}

/* === MARKDOWN BODY === */
.markdown-body {
  color: var(--text-primary);
}

.markdown-body h1 {
  color: var(--accent);
  font-size: 25px;
  margin: 32px 0 16px;
  border-bottom: 3px solid rgba(108, 123, 216, 0.3);
  padding-bottom: 12px;
}

.markdown-body h2 {
  color: var(--accent);
  font-size: 26px;
  margin: 28px 0 14px;
  border-bottom: 2px solid rgba(108, 123, 216, 0.2);
  padding-bottom: 10px;
}

.markdown-body h3 {
  color: var(--accent-light);
  font-size: 22px;
  margin: 24px 0 12px;
}

.markdown-body h4 {
  color: var(--text-muted);
  font-size: 18px;
  margin: 20px 0 10px;
}

.markdown-body p {
  margin: 12px 0;
  line-height: 1.8;
}

.markdown-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  word-break: break-word;
  overflow-wrap: break-word;
  transition: color 0.2s, border-color 0.2s;
}

.markdown-body a:hover {
  color: var(--accent-light);
  border-bottom-color: var(--accent-light);
}

.markdown-body ul, .markdown-body ol {
  margin: 16px 0;
  padding-left: 32px;
}

.markdown-body li {
  margin: 8px 0;
}

.markdown-body blockquote {
  border-left: 4px solid var(--accent);
  background: rgba(108, 123, 216, 0.1);
  padding: 16px 20px;
  margin: 16px 0;
  border-radius: 8px;
}

[data-theme="light"] .markdown-body blockquote {
  background: rgba(79, 70, 229, 0.05);
  border-left-color: var(--accent);
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

.markdown-body th {
  background: rgba(108, 123, 216, 0.1);
  color: var(--accent);
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid rgba(108, 123, 216, 0.3);
}

[data-theme="light"] .markdown-body th {
  background: rgba(79, 70, 229, 0.08);
  border-bottom: 2px solid rgba(79, 70, 229, 0.3);
}

.markdown-body td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.markdown-body tr:hover {
  background: rgba(108, 123, 216, 0.05);
}

[data-theme="light"] .markdown-body tr:hover {
  background: rgba(79, 70, 229, 0.03);
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

.markdown-body hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 32px 0;
}

/* Inline code (kod içinde değil normal metinde) */
.markdown-body code:not(.code-block-wrapper code) {
  background: rgba(108, 123, 216, 0.15);
  padding: 3px 8px;
  border-radius: 4px;
  color: #c4b5fd;
  font-size: 13px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  border: 1px solid rgba(108, 123, 216, 0.2);
}

[data-theme="light"] .markdown-body code:not(.code-block-wrapper code) {
  background: rgba(79, 70, 229, 0.08);
  color: #6366f1;
  border: 1px solid rgba(79, 70, 229, 0.15);
}

/* === TABLE WRAPPER === */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 5px 40px;
}

.empty-icon {
  font-size: 80px;
  margin-bottom: 24px;
  opacity: 0.3;
}

.empty-state h2 {
  color: var(--accent);
  margin-bottom: 16px;
}

/* === QUICK STATS - MINIMAL & COMPACT === */
.quick-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 20px;
  background: rgba(108, 123, 216, 0.06);
  border: 1px solid rgba(108, 123, 216, 0.15);
  border-radius: 12px;
  transition: all 0.2s ease;
  min-width: 90px;
  max-width: 110px;
  text-align: center;
}

.stat-card:hover {
  transform: translateY(-2px);
  background: rgba(108, 123, 216, 0.1);
  border-color: rgba(108, 123, 216, 0.3);
  box-shadow: 0 4px 12px rgba(108, 123, 216, 0.15);
}

[data-theme="light"] .stat-card {
  background: rgba(79, 70, 229, 0.04);
  border: 1px solid rgba(79, 70, 229, 0.12);
}

[data-theme="light"] .stat-card:hover {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

.stat-number {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.7;
  line-height: 1.3;
}

/* Responsive */
@media (max-width: 600px) {
  .quick-stats {
    gap: 10px;
  }

  .stat-card {
    padding: 14px 16px;
    min-width: 80px;
    max-width: 100px;
  }

  .stat-number {
    font-size: 20px;
  }

  .stat-label {
    font-size: 9px;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .quick-stats {
    flex-direction: row;
    gap: 10px;
  }

  .stat-card {
    padding: 14px 20px;
    min-width: 100px;
  }

  .stat-number {
    font-size: 24px;
  }

  .stat-label {
    font-size: 10px;
  }
}
/* === FOOTER === */
.footer {
  text-align: center;
  padding: 24px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

.footer-sub {
  font-size: 11px;
  margin-top: 8px;
  opacity: 0.7;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(108, 123, 216, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(108, 123, 216, 0.5);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(79, 70, 229, 0.3);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(79, 70, 229, 0.5);
}

/* === LOADING SPINNER === */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(108, 123, 216, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 1s ease-in-out infinite;
}

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

/* === SKIP TO CONTENT === */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 9999;
  border-radius: 0 0 8px 0;
}

.skip-to-content:focus {
  top: 0;
}
/* === QUICK LINKS - MINIMAL & COMPACT === */
.quick-links-container {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

.quick-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(108, 123, 216, 0.06);
  border: 1px solid rgba(108, 123, 216, 0.15);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
  overflow: hidden;
}

.quick-link:hover {
  transform: translateY(-2px);
  border-color: rgba(108, 123, 216, 0.4);
  background: rgba(108, 123, 216, 0.1);
  box-shadow: 0 4px 12px rgba(108, 123, 216, 0.15);
}

.quick-link:active {
  transform: translateY(0);
}

.quick-link-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(108, 123, 216, 0.1);
  border-radius: 10px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.quick-link:hover .quick-link-icon {
  transform: scale(1.05);
  background: rgba(108, 123, 216, 0.15);
}

.quick-link-content {
  flex: 1;
  min-width: 0;
}

.quick-link-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-link-desc {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Light mode */
[data-theme="light"] .quick-link {
  background: rgba(79, 70, 229, 0.04);
  border: 1px solid rgba(79, 70, 229, 0.12);
}

[data-theme="light"] .quick-link:hover {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

[data-theme="light"] .quick-link-icon {
  background: rgba(79, 70, 229, 0.08);
}

[data-theme="light"] .quick-link:hover .quick-link-icon {
  background: rgba(79, 70, 229, 0.12);
}

.quick-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Quick links renk temaları */
.quick-link[data-color="blue"]:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.08);
}

.quick-link[data-color="blue"] .quick-link-icon {
  background: rgba(59, 130, 246, 0.1);
}

.quick-link[data-color="purple"]:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.08);
}

.quick-link[data-color="purple"] .quick-link-icon {
  background: rgba(139, 92, 246, 0.1);
}

.quick-link[data-color="yellow"]:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
}

.quick-link[data-color="yellow"] .quick-link-icon {
  background: rgba(245, 158, 11, 0.1);
}

.quick-link[data-color="green"]:hover {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.quick-link[data-color="green"] .quick-link-icon {
  background: rgba(16, 185, 129, 0.1);
}

.quick-link[data-color="orange"]:hover {
  border-color: rgba(249, 115, 22, 0.4);
  background: rgba(249, 115, 22, 0.08);
}

.quick-link[data-color="orange"] .quick-link-icon {
  background: rgba(249, 115, 22, 0.1);
}

.quick-link[data-color="red"]:hover {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

.quick-link[data-color="red"] .quick-link-icon {
  background: rgba(239, 68, 68, 0.1);
}

/* === SEARCH ANIMATIONS & IMPROVEMENTS === */
details.category,
details.subcategory {
  transition: opacity 0.3s ease, max-height 0.3s ease;
}

details.category[style*="display: none"],
details.subcategory[style*="display: none"] {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

.search:focus {
  box-shadow: 0 0 0 3px rgba(108, 123, 216, 0.3);
  transform: scale(1.02);
}

[data-theme="light"] .search:focus {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

.file-link.hidden {
  display: none !important;
  animation: fadeOut 0.2s ease;
}

.file-link:not(.hidden) {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 280px 1fr;
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }


  /* === SIDEBAR === */
  .sidebar {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 20px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    position: sticky;
    top: 20px;
    transition: var(--transition);
    will-change: transform;
  }

  .sidebar.collapsed {
    transform: translateX(-100%);
    position: fixed;
    left: -350px;
  }
  .sidebar:not(.collapsed) {
      transform: translateX(0) !important;
  }
  .content {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .quick-links-container {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
  }

  .quick-link {
    padding: 14px 16px;
    gap: 10px;
  }

  .quick-link-icon {
    width: 38px;
    height: 38px;
    font-size: 24px;
  }

  .quick-link-title {
    font-size: 13px;
  }

  .quick-link-desc {
    font-size: 10px;
  }
}

@media (max-width: 600px) {
  .header {
    padding: 12px 16px;
  }

  .logo {
    font-size: 16px;
  }

  .search-wrapper {
    display: none; /* Mobilde arama sidebar'da */
  }



}

@media (max-width: 480px) {
  .quick-links-container {
    grid-template-columns: 1fr 1fr;
  }

  .quick-link {
    flex-direction: column;
    text-align: center;
    padding: 16px 12px;
  }
}

/* === PRINT STYLES === */
@media print {
  .header, .sidebar, .footer, .breadcrumb, .btn, .copy-btn, .code-header {
    display: none !important;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .content {
    border: none;
    padding: 0;
  }

  .markdown-body a {
    color: #000;
    text-decoration: underline;
  }

  .code-block-wrapper {
    border: 1px solid #000;
    page-break-inside: avoid;
  }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .quick-link,
  .quick-link-icon,
  .file-link.hidden,
  .file-link:not(.hidden),
  details.category,
  details.subcategory {
    animation: none !important;
    transition: none !important;
  }

  .quick-link:hover {
    transform: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --border: rgba(255, 255, 255, 0.3);
  }

  [data-theme="light"] {
    --border: rgba(0, 0, 0, 0.3);
  }
}

/* === IN-PAGE SEARCH === */

.in-page-search-bar {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  animation: slideInRight 0.3s ease;
}

.in-page-search-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.in-page-search-container input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-primary);
  width: 250px;
  font-size: 14px;
  transition: var(--transition);
}

.in-page-search-container input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(108, 123, 216, 0.1);
}

[data-theme="light"] .in-page-search-container input {
  background: rgba(0, 0, 0, 0.05);
}

.search-count {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 40px;
  text-align: center;
}

.in-page-search-container button {
  background: rgba(108, 123, 216, 0.2);
  border: 1px solid var(--accent);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}

.in-page-search-container button:hover {
  background: rgba(108, 123, 216, 0.3);
  transform: translateY(-1px);
}

.in-page-search-container button:active {
  transform: translateY(0);
}

/* Search highlights */
mark.search-highlight {
  background: rgba(245, 158, 11, 0.3);
  color: var(--text-primary);
  padding: 2px 4px;
  border-radius: 3px;
  transition: all 0.2s ease;
}

mark.search-highlight.active {
  background: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
  font-weight: 600;
}

[data-theme="light"] mark.search-highlight {
  background: rgba(245, 158, 11, 0.4);
}

[data-theme="light"] mark.search-highlight.active {
  background: rgba(245, 158, 11, 0.7);
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .in-page-search-bar {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .in-page-search-container {
    flex-wrap: wrap;
    padding: 10px;
  }

  .in-page-search-container input {
    width: 100%;
    order: -1;
  }
}







/* === BOOKMARK MODAL === */
/* style.css sonuna eklenecek */

.btn {
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
    will-change: transform, background-color;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
}

.bookmark-btn {
  margin-top: 12px;
}

.bookmark-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.bookmark-modal-content {
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 16px;
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.bookmark-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 2px solid var(--border);
}

.bookmark-header h2 {
  margin: 0;
  color: var(--accent);
  font-size: 22px;
}
.bookmark-btn:hover {
  background: rgba(108, 123, 216, 0.7);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 123, 216, 0.3);
}

.close-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition);
}

.close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: scale(1.1);
}

.bookmark-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.bookmark-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: rgba(108, 123, 216, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.bookmark-item:hover {
  background: rgba(108, 123, 216, 0.1);
  border-color: var(--accent);
  transform: translateX(4px);
}

[data-theme="light"] .bookmark-item {
  background: rgba(79, 70, 229, 0.04);
}

[data-theme="light"] .bookmark-item:hover {
  background: rgba(79, 70, 229, 0.08);
}

.bookmark-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bookmark-title {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s;
}

.bookmark-title:hover {
  color: var(--accent-light);
}

.bookmark-category {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(139, 92, 246, 0.2);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

.bookmark-date {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.7;
}

.remove-bookmark-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 16px;
}

.remove-bookmark-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: scale(1.1);
}

.bookmark-footer {
  padding: 16px 24px;
  border-top: 2px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.6);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .bookmark-modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .bookmark-header {
    padding: 16px;
  }

  .bookmark-header h2 {
    font-size: 18px;
  }

  .bookmark-list {
    padding: 16px;
  }

  .bookmark-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .remove-bookmark-btn {
    align-self: flex-end;
  }
}

/* === YENİ ÖZELLİKLER İÇİN EK STİLLER === */
/* Bu dosya mevcut style.css'in SONUNA eklenecek */

/* === TABLE OF CONTENTS (TOC) === */
.toc-wrapper {
  background: rgba(108, 123, 216, 0.05);
  border: 2px solid rgba(108, 123, 216, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
  transition: var(--transition);
}

[data-theme="light"] .toc-wrapper {
  background: rgba(79, 70, 229, 0.05);
  border: 2px solid rgba(79, 70, 229, 0.2);
}

.toc-header {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.toc-nav {
  max-height: 400px;
  overflow-y: auto;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin: 0;
}

.toc-link {
  display: block;
  padding: 8px 12px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  transition: var(--transition);
  font-size: 14px;
  border-left: 3px solid transparent;
}

.toc-link:hover {
  background: rgba(108, 123, 216, 0.1);
  color: var(--text-primary);
  border-left-color: var(--accent);
  transform: translateX(4px);
}

[data-theme="light"] .toc-link:hover {
  background: rgba(79, 70, 229, 0.08);
}

.toc-level-2 {
  padding-left: 0;
}

.toc-level-3 {
  padding-left: 20px;
}

.toc-level-3 .toc-link {
  font-size: 13px;
  opacity: 0.9;
}

/* TOC Scrollbar */
.toc-nav::-webkit-scrollbar {
  width: 6px;
}

.toc-nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.toc-nav::-webkit-scrollbar-thumb {
  background: rgba(108, 123, 216, 0.3);
  border-radius: 3px;
}

/* === READING PROGRESS BAR === */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease;
  box-shadow: 0 0 10px var(--accent);
}

/* === LINE NUMBERS FOR CODE BLOCKS === */
.code-content-wrapper {
  display: flex;
  overflow-x: auto;
}

.line-numbers {
  background: rgba(0, 0, 0, 0.1);
  padding: 20px 12px;
  text-align: right;
  user-select: none;
  border-right: 1px solid rgba(108, 123, 216, 0.2);
  flex-shrink: 0;
}

[data-theme="light"] .line-numbers {
  background: rgba(0, 0, 0, 0.03);
  border-right: 1px solid rgba(79, 70, 229, 0.2);
}

.line-numbers span {
  display: block;
  color: var(--text-muted);
  opacity: 0.6;
  font-size: 13px;
  line-height: 1.7;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.code-content-wrapper pre {
  margin: 0;
  border-radius: 0 0 12px 0 !important;
  flex: 1;
}

/* Code info badge */
.code-info {
  color: var(--text-muted);
  font-size: 11px;
  opacity: 0.7;
  margin-left: auto;
  padding: 0 8px;
}

/* === LANGUAGE-SPECIFIC COLORS (Data Attribute) === */
.code-block-wrapper[data-language="python"] .code-header {
  background: linear-gradient(135deg, rgba(55, 118, 171, 0.1), rgba(55, 118, 171, 0.15));
}

.code-block-wrapper[data-language="bash"] .code-header,
.code-block-wrapper[data-language="shell"] .code-header {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.15));
}

.code-block-wrapper[data-language="javascript"] .code-header {
  background: linear-gradient(135deg, rgba(247, 223, 30, 0.1), rgba(247, 223, 30, 0.15));
}

.code-block-wrapper[data-language="php"] .code-header {
  background: linear-gradient(135deg, rgba(119, 123, 180, 0.1), rgba(119, 123, 180, 0.15));
}

/* === IN-PAGE SEARCH STYLES === */
.in-page-search-bar {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  animation: slideInRight 0.3s ease;
}

.in-page-search-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.in-page-search-container input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-primary);
  width: 250px;
  font-size: 14px;
  transition: var(--transition);
}

.in-page-search-container input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(108, 123, 216, 0.1);
}

[data-theme="light"] .in-page-search-container input {
  background: rgba(0, 0, 0, 0.05);
}

.search-count {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 40px;
  text-align: center;
  font-weight: 600;
}

.in-page-search-container button {
  background: rgba(108, 123, 216, 0.2);
  border: 1px solid var(--accent);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 600;
}

.in-page-search-container button:hover {
  background: rgba(108, 123, 216, 0.3);
  transform: translateY(-1px);
}

.in-page-search-container button:active {
  transform: translateY(0);
}

/* Search highlights */
mark.search-highlight {
  background: rgba(245, 158, 11, 0.3);
  color: var(--text-primary);
  padding: 2px 4px;
  border-radius: 3px;
  transition: all 0.2s ease;
}

mark.search-highlight.active {
  background: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
  font-weight: 600;
}

[data-theme="light"] mark.search-highlight {
  background: rgba(245, 158, 11, 0.4);
}

[data-theme="light"] mark.search-highlight.active {
  background: rgba(245, 158, 11, 0.7);
}

/* === BOOKMARK MODAL (IMPROVEMENTS) === */
.bookmark-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.bookmark-modal-content {
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 16px;
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.bookmark-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 2px solid var(--border);
}

.bookmark-header h2 {
  margin: 0;
  color: var(--accent);
  font-size: 22px;
}

.close-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition);
  font-weight: 600;
}

.close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: scale(1.1);
}

.bookmark-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.bookmark-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: rgba(108, 123, 216, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.bookmark-item:hover {
  background: rgba(108, 123, 216, 0.1);
  border-color: var(--accent);
  transform: translateX(4px);
}

[data-theme="light"] .bookmark-item {
  background: rgba(79, 70, 229, 0.04);
}

[data-theme="light"] .bookmark-item:hover {
  background: rgba(79, 70, 229, 0.08);
}

.bookmark-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bookmark-title {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s;
}

.bookmark-title:hover {
  color: var(--accent-light);
}

.bookmark-category {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(139, 92, 246, 0.2);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

[data-theme="light"] .bookmark-category {
  background: rgba(124, 58, 237, 0.15);
}

.bookmark-date {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.7;
}

.bookmark-order {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.3;
  min-width: 40px;
  text-align: center;
}

.remove-bookmark-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 16px;
}

.remove-bookmark-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: scale(1.1);
}

.bookmark-footer {
  padding: 16px 24px;
  border-top: 2px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.6);
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* === RESPONSIVE UPDATES === */
@media (max-width: 768px) {
  .toc-wrapper {
    padding: 16px;
  }

  .toc-header {
    font-size: 16px;
  }

  .toc-nav {
    max-height: 300px;
  }

  .toc-link {
    font-size: 13px;
  }

  .code-content-wrapper {
    flex-direction: column;
  }

  .line-numbers {
    display: none; /* Mobilde satır numaralarını gizle */
  }
}

@media (max-width: 600px) {
  .in-page-search-bar {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .in-page-search-container {
    flex-wrap: wrap;
    padding: 10px;
  }

  .in-page-search-container input {
    width: 100%;
    order: -1;
  }

  .bookmark-modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .bookmark-header {
    padding: 16px;
  }

  .bookmark-header h2 {
    font-size: 18px;
  }

  .bookmark-list {
    padding: 16px;
  }

  .bookmark-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .bookmark-order {
    align-self: flex-end;
    font-size: 16px;
  }

  .remove-bookmark-btn {
    align-self: flex-end;
  }
}

/* === PRINT UPDATES === */
@media print {
  .toc-wrapper,
  .reading-progress,
  .in-page-search-bar,
  .bookmark-modal {
    display: none !important;
  }

  .line-numbers {
    display: none !important;
  }

  .code-content-wrapper {
    display: block;
  }
}

/* === ACCESSIBILITY IMPROVEMENTS === */
@media (prefers-reduced-motion: reduce) {
  .reading-progress,
  .toc-link,
  .bookmark-item,
  mark.search-highlight,
  .in-page-search-bar {
    animation: none !important;
    transition: none !important;
  }

  .toc-link:hover,
  .bookmark-item:hover {
    transform: none;
  }
}

/* === FOCUS VISIBLE (Keyboard Navigation) === */
.toc-link:focus-visible,
.bookmark-title:focus-visible,
.in-page-search-container button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* === SCROLLBAR IMPROVEMENTS === */
.bookmark-list::-webkit-scrollbar {
  width: 8px;
}

.bookmark-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.bookmark-list::-webkit-scrollbar-thumb {
  background: rgba(108, 123, 216, 0.3);
  border-radius: 4px;
}

.bookmark-list::-webkit-scrollbar-thumb:hover {
  background: rgba(108, 123, 216, 0.5);
}

[data-theme="light"] .bookmark-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .bookmark-list::-webkit-scrollbar-thumb {
  background: rgba(79, 70, 229, 0.3);
}

/* === HOVER EFFECTS (Non-touch devices) === */
@media (hover: hover) and (pointer: fine) {
  .toc-link:hover {
    padding-left: 16px;
  }

  .bookmark-item:hover .bookmark-order {
    opacity: 0.8;
    transform: scale(1.2);
  }
}

/* === HIGH CONTRAST MODE === */
@media (prefers-contrast: high) {
  .toc-wrapper,
  .bookmark-item,
  .in-page-search-container {
    border-width: 3px;
  }

  .line-numbers {
    border-right-width: 2px;
  }

  mark.search-highlight {
    outline: 2px solid currentColor;
  }
}

/* === DARK MODE SPECIFIC IMPROVEMENTS === */
[data-theme="dark"] .code-content-wrapper pre {
  background: #0a0e27;
}

[data-theme="dark"] .line-numbers {
  background: rgba(0, 0, 0, 0.3);
}

/* === LIGHT MODE SPECIFIC IMPROVEMENTS === */
[data-theme="light"] .code-content-wrapper pre {
  background: #f8fafc;
}

[data-theme="light"] .line-numbers {
  background: rgba(0, 0, 0, 0.02);
}

/* === EMPTY STATE FOR MODALS === */
.bookmark-list:empty::after {
  content: 'Henüz içerik yok';
  display: block;
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  opacity: 0.5;
  font-size: 14px;
}

/* === LOADING STATE === */
.bookmark-item.loading {
  opacity: 0.5;
  pointer-events: none;
}

.bookmark-item.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 20px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* === TOOLTIP FOR CODE INFO === */
.code-info:hover::after {
  content: attr(title);
  position: absolute;
  top: -30px;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 10;
}

/* === SMOOTH TRANSITIONS === */
* {
  transition-property: background, border-color, color, transform, opacity;
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Override for specific elements that need faster/no transitions */
.reading-progress {
  transition: width 0.1s ease;
}

input, textarea, select {
  transition: border-color 0.2s ease;
}

/* === END OF NEW STYLES === */
/* Line numbers tam eşitleme */
.code-content-wrapper {
    display: flex;
    align-items: flex-start;
}

.line-numbers span,
.code-block-wrapper .code-content-wrapper pre code {
    line-height: 1.7 !important; /* Aynı olmalı */
    font-size: 14px !important;  /* Aynı olmalı */
}

.line-numbers {
    padding-top:37px; /* Pre padding'i ile eşit */
}

/* Mobil sidebar açılış animasyonu */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 80px;
    height: calc(100vh - 100px);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

  .sidebar:not(.collapsed) {
    transform: translateX(0);
    box-shadow: 2px 0 20px rgba(0,0,0,0.3);
  }
}
/* === RESPONSIVE - TAM DÜZELTİLMİŞ === */

/* Tablet ve üstü - Normal görünüm */
@media (min-width: 901px) {
  .sidebar {
    position: sticky;
    top: 20px;
    /*max-height: calc(100vh - 200px);*/
    max-height: %100px;
    overflow-y: auto;
  }

  .sidebar.collapsed {
    transform: translateX(-100%);
    position: fixed;
    left: -350px;
  }
}

/* Mobil - 900px altı */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    position: relative;
  }

  /* Sidebar mobilde overlay olarak açılır */
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 360px; /* 280px → 360px DEĞİŞTİ */
    max-width: 92vw; /* 85vw → 92vw DEĞİŞTİ */
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: none;
    padding: 24px 18px; /* 20px 15px → 24px 18px DEĞİŞTİ */
  }

  /* Açık durum */
  .sidebar:not(.collapsed) {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  }

  /* Kapalı durum - varsayılan */
  .sidebar.collapsed {
    transform: translateX(-100%);
  }

  /* Overlay (backdrop) */
  .sidebar:not(.collapsed)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    animation: fadeIn 0.3s ease;
  }

  /* Sidebar içeriği biraz büyütülmüş */
  .sidebar-header h4 {
    font-size: 13px; /* 12px → 13px */
  }

  .category-link {
    font-size: 12px; /* 11px → 12px */
    padding: 11px; /* 10px → 11px */
  }

  .subcat-link {
    font-size: 13px; /* Aynı */
    padding: 7px 11px; /* 6px 10px → 7px 11px */
  }

  .file-link {
    font-size: 12px; /* 11px → 12px */
    padding: 6px 9px; /* 5px 8px → 6px 9px */
  }

  .badge, .badge-sm {
    font-size: 10px; /* Aynı */
  }

  /* Content full width */
  .content {
    padding: 20px;
    width: 100%;
  }
}



















/* Tablet */
@media (max-width: 1200px) and (min-width: 901px) {
  .layout {
    grid-template-columns: 260px 1fr;
  }

  .sidebar {
    padding: 15px 10px;
  }
}

/* Orta boyut mobil */
@media (max-width: 768px) {
  .quick-links-container {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
  }

  .quick-link {
    padding: 12px 14px;
    gap: 8px;
  }

  .quick-link-icon {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }

  .quick-link-title {
    font-size: 12px;
  }

  .quick-link-desc {
    font-size: 10px;
  }
}

/* Küçük mobil */
@media (max-width: 600px) {
  .quick-stats {
    gap: 10px;
  }

  .stat-card {
    padding: 14px 16px;
    min-width: 80px;
    max-width: 100px;
  }

  .stat-number {
    font-size: 20px;
  }

  .stat-label {
    font-size: 9px;
  }
}

/* Çok küçük mobil */
@media (max-width: 480px) {
  .quick-links-container {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 10px;
  }

  .quick-link {
    flex-direction: column;
    text-align: center;
    padding: 14px 10px;
  }

  .quick-link-icon {
    margin: 0 auto;
  }

  /* Sidebar daha dar */
  .sidebar {
    width: 260px;
  }

  /* Kod blokları */
  .code-header {
    padding: 8px 12px;
  }

  .code-lang-badge {
    font-size: 9px;
    padding: 4px 10px;
  }

  .code-block-wrapper .copy-btn {
    font-size: 10px;
    padding: 4px 10px;
  }

  .code-block-wrapper pre {
    padding: 15px;
  }

  .code-block-wrapper pre code {
    font-size: 12px;
  }
}

/* Landscape mobil (yatay) */
@media (max-width: 900px) and (orientation: landscape) {
  .sidebar {
    width: 240px;
  }

  .sidebar-header h4 {
    font-size: 11px;
  }
}

/* === SIDEBAR AÇMA KAPATMA ANİMASYONLARI === */
@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideOutToLeft {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

/* Touch device optimizasyonları */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .file-link,
  .category-link,
  .subcat-link {
    min-height: 44px; /* Apple HIG - minimum touch target */
    display: flex;
    align-items: center;
  }

  .file-link {
    padding: 10px;
  }

  /* Hover effectleri touch'ta kaldır */
  .btn:hover,
  .file-link:hover,
  .category-link:hover,
  .subcat-link:hover {
    transform: none;
  }

  /* Active states ekle */
  .btn:active {
    opacity: 0.7;
  }

  .file-link:active,
  .category-link:active {
    background: rgba(108, 123, 216, 0.2);
  }
}

/* High contrast mode - mobil */
@media (max-width: 900px) and (prefers-contrast: high) {
  .sidebar {
    border: 2px solid var(--accent);
  }

  .sidebar:not(.collapsed)::before {
    background: rgba(0, 0, 0, 0.8);
  }
}

/* Reduced motion - mobil */
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .sidebar {
    transition: none;
  }

  .sidebar:not(.collapsed)::before {
    animation: none;
  }
}

/* Dark mode - mobil specific */
@media (max-width: 900px) {
  [data-theme="dark"] .sidebar {
    background: #0f1724;
    border-right: 1px solid rgba(108, 123, 216, 0.3);
  }

  [data-theme="light"] .sidebar {
    background: #ffffff;
    border-right: 1px solid rgba(79, 70, 229, 0.2);
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 900px) {
    .sidebar {
      /* iOS scroll fix */
      -webkit-overflow-scrolling: touch;
    }

    .sidebar:not(.collapsed) {
      /* iOS backdrop blur */
      backdrop-filter: blur(20px);
    }
  }
}

/* Android Chrome specific fixes */
@media (max-width: 900px) {
  .sidebar {
    /* Android scroll fix */
    overscroll-behavior: contain;
  }
}


/* FORCE MOBILE SIDEBAR WIDTH - */

/* FORCE MOBILE SIDEBAR - FULL CUSTOMIZATION */
@media (max-width: 900px) {
  #sidebar,
  .sidebar {
    /* Boyutlar */
    width: 400px !important;
    max-width: 95vw !important;
    height: calc(100vh - 100px) !important;
    max-height: calc(100vh - 100px) !important;

    /* Pozisyon */
    position: fixed !important;
    top: 10px !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 9999 !important;

    /* Görünüm */
    background: #0f1724 !important;
    border-right: 1px solid rgba(108, 123, 216, 0.25) !important;
    border-radius: 0 !important;
    overflow-y: auto !important;

    /* Animasyon */
    transform: translateX(-100%);
    transition: transform 0.3s ease !important;
  }

  /* Açık durum */
  #sidebar:not(.collapsed),
  .sidebar:not(.collapsed) {
    transform: translateX(0) !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5) !important;
  }

  /* Backdrop (arka plan karartma) */
  #sidebar:not(.collapsed)::before,
  .sidebar:not(.collapsed)::before {
    content: '' !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(15, 23, 36, 0.85) !important;
    z-index: -1 !important;
    animation: fadeIn 0.3s ease !important;
  }
}

@media (max-width: 600px) {
  #sidebar,
  .sidebar {
    /* Boyutlar */
    width: 100vw !important;
    max-width: 65vw !important;
    height: calc(100vh - 70px) !important;
    max-height: calc(100vh - 70px) !important;

    /* Pozisyon */
    position: fixed !important;
    top: 10px !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 9999 !important;

    /* Görünüm */
    background: #0f1724 !important;
    border-right: none !important;
    border-radius: 0 !important;
    overflow-y: auto !important;

    /* Animasyon */
    transform: translateX(-100%);
    transition: transform 0.3s ease !important;
  }

  /* Açık durum */
  #sidebar:not(.collapsed),
  .sidebar:not(.collapsed) {
    transform: translateX(0) !important;
    box-shadow: none !important;
  }

  /* Backdrop */
  #sidebar:not(.collapsed)::before,
  .sidebar:not(.collapsed)::before {
    content: '' !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: -1 !important;
    animation: fadeIn 0.3s ease !important;
  }
}

/* Light mode'da da aynı renk */
[data-theme="light"] #sidebar,
[data-theme="light"] .sidebar {
  background: #1a1f3a !important;
  color: #1a1f3a !important;
}

/* Light mode'da sidebar içindeki tüm yazılar */
[data-theme="light"] .sidebar-header h4,
[data-theme="light"] .category-link,
[data-theme="light"] .subcat-link,
[data-theme="light"] .file-link {
  color: #f8fafc !important;
}

/* Light mode'da hover efektleri */
[data-theme="light"] .category-link:hover,
[data-theme="light"] .subcat-link:hover,
[data-theme="light"] .file-link:hover {
  color: #f8fafc !important;
}

/* Light mode'da aktif link */
[data-theme="light"] .file-link.active {
  color: #f8fafc !important;
}







/* Z-INDEX HIERARCHY - EN SONA EKLE */

/* En altta */
.sidebar:not(.collapsed)::before {
  z-index: 998 !important; /* Sidebar backdrop */
}

.sidebar {
  z-index: 999 !important; /* Sidebar */
}

/* Orta seviye */
.header {
  z-index: 1000 !important; /* Header */
  position: relative !important;
}

.toc-wrapper {
  z-index: 100 !important; /* İçindekiler */
}

.reading-progress {
  z-index: 9999 !important; /* Okuma bar'ı */
}

/* En üstte */
.actions-menu {
  position: relative !important;
  z-index: 10000 !important; /* Menu butonu */
}

.actions-menu.active {
  z-index: 10001 !important; /* Açık menu */
}

.dropdown {
  z-index: 10002 !important; /* Dropdown içeriği */
  position: absolute !important;
}

.in-page-search-bar {
  z-index: 10003 !important; /* Arama */
}

.bookmark-modal {
  z-index: 10004 !important; /* Modal */
}

/* Toast mesajları en üstte */
body > div[style*="position: fixed"] {
  z-index: 10005 !important; /* Toast notifications */
}




/*-----------------------*/
/* Scroll to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    font-size: 22px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--accent);
    color: white;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: 0.3s;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}
@media (max-width: 600px) {
  .back-to-top {
    bottom: 30px;
    right: 20px;
  }
}




/* --------- Not Sistemi ---------------- */
/* ============================================ */
/* === NOTES SYSTEM === */
/* ============================================ */

.notes-panel {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  max-width: 90vw;
  max-height: 80vh;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-right: none;
  border-radius: 12px 0 0 12px;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  z-index: 9998;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.notes-panel.collapsed {
  transform: translateY(-50%) translateX(100%);
}

.notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 2px solid var(--border);
  background: linear-gradient(135deg, rgba(108, 123, 216, 0.1), rgba(139, 92, 246, 0.1));
}

.notes-header h3 {
  margin: 0;
  color: var(--accent);
  font-size: 18px;
}

.close-notes-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.close-notes-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: scale(1.1);
}

.notes-body {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.notes-btn{
  margin-left: 7px;
}
.notes-btn:hover {
  background: rgba(108, 123, 216, 0.7);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 123, 216, 0.3);
}

#notesTextarea {
  flex: 1;
  width: 100%;
  min-height: 300px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  transition: var(--transition);
}

#notesTextarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(108, 123, 216, 0.05);
}

[data-theme="light"] #notesTextarea {
  background: rgba(0, 0, 0, 0.03);
}

.notes-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.7;
}

.notes-footer {
  padding: 16px 20px;
  border-top: 2px solid var(--border);
  display: flex;
  gap: 8px;
}

.notes-footer .btn {
  flex: 1;
  font-size: 13px;
  padding: 10px;
}

.btn-save {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.btn-save:hover {
  background: rgba(16, 185, 129, 0.3);
}

.btn-delete {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.btn-delete:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* Not önizlemesi (modal içinde) */
.note-preview {
  margin-top: 8px;
  padding: 12px;
  background: rgba(108, 123, 216, 0.05);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

[data-theme="light"] .note-preview {
  background: rgba(79, 70, 229, 0.05);
}

/* Mobil responsive */
@media (max-width: 768px) {
  .notes-panel {
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
    border: none;
    border-top: 2px solid var(--accent);
    top: auto;
    bottom: 0;
    transform: translateY(0);
    max-height: 70vh;
  }

  .notes-panel.collapsed {
    transform: translateY(100%);
  }

  #notesTextarea {
    min-height: 200px;
  }
}

/* Scrollbar */
.notes-body::-webkit-scrollbar {
  width: 6px;
}

.notes-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.notes-body::-webkit-scrollbar-thumb {
  background: rgba(108, 123, 216, 0.3);
  border-radius: 3px;
}


/* Anchor link highlight efekti */
.highlight-target {
    animation: highlight-pulse 2s ease-out;
}

@keyframes highlight-pulse {
    0% {
        background-color: rgba(255, 215, 0, 0.3);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.5);
    }
    50% {
        background-color: rgba(255, 215, 0, 0.2);
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
    100% {
        background-color: transparent;
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}