:root {
  --bg: #f2f5f9;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --line: #d8e0ea;
  --text: #1b2a3a;
  --muted: #607387;
  --accent: #0e6ba8;
  --accent-soft: #e8f3fb;
  --ok: #1f9d63;
  --shadow: 0 12px 28px rgb(16 38 60 / 10%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 110% -20%, #d8e9f7 0%, transparent 35%),
    radial-gradient(circle at -30% 120%, #d9e8df 0%, transparent 36%),
    var(--bg);
  position: relative;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  z-index: -1;
  filter: blur(58px);
  opacity: 0.5;
}

.bg-shape-a {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: #cfe6f8;
  top: -60px;
  right: -40px;
}

.bg-shape-b {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: #d5ebdf;
  left: -80px;
  bottom: -110px;
}

.topbar,
.category-topbar,
.layout,
footer {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

.topbar {
  padding: 1.8rem 0 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 7px rgb(14 107 168 / 16%);
}

.brand-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.brand-title a {
  color: inherit;
  text-decoration: none;
}

.brand-title a:hover {
  text-decoration: underline;
}

.brand-subtitle {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.status-pill {
  text-decoration: none;
  color: #0f5c39;
  background: #dcf7e9;
  border: 1px solid #c8ebd9;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
}

.layout {
  display: block;
  margin-bottom: 1rem;
}

.content,
.folder-block,
.site-footer {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.category-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.95rem 0;
}

.content h1 {
  margin: 0;
}

.category-link {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 0.62rem 0.78rem;
  border-radius: 999px;
  margin-bottom: 0;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.category-link:hover {
  border-color: #b9c9da;
  background: #f2f6fb;
}

.category-link.active {
  border-color: #9dbad1;
  background: var(--accent-soft);
  color: #0b4f7b;
}

.category-icon {
  width: 1.1rem;
  height: 1.1rem;
  text-align: center;
  color: #0f6298;
  flex: 0 0 auto;
}

.category-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.category-text {
  white-space: nowrap;
}

.category-count {
  margin-left: auto;
  color: #0a5f95;
  font-weight: 700;
  font-size: 0.82rem;
  background: #eef5fb;
  border: 1px solid #d2e2f0;
  border-radius: 999px;
  min-width: 1.6rem;
  text-align: center;
  padding: 0.08rem 0.38rem;
}

.content {
  padding: 1rem;
}

.mirror-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin-bottom: 0.75rem;
  padding: 0.62rem 0.74rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
}

.mirror-meta p {
  margin: 0;
  color: #45617c;
  font-size: 0.8rem;
}

.mirror-meta strong {
  color: #0b4f7b;
}

.content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.search-wrap {
  display: flex;
  gap: 0.55rem;
  width: min(520px, 100%);
}

#searchInput {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  color: var(--text);
  padding: 0.7rem 0.8rem;
  font: inherit;
}

#searchInput:focus {
  outline: 0;
  border-color: #8db7d4;
  box-shadow: 0 0 0 3px rgb(14 107 168 / 14%);
}

#clearSearchButton {
  border: 1px solid #bfd2e3;
  background: #f3f8fd;
  color: #184e76;
  border-radius: 9px;
  padding: 0.65rem 0.8rem;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
}

.tools-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.tools-left,
.tools-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tools-bar label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

#typeFilter {
  border: 1px solid #c8d7e6;
  border-radius: 8px;
  background: #fff;
  color: #244763;
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 0.82rem;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.inline-check input {
  accent-color: #0e6ba8;
}

.view-modes {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  background: #f7fbff;
  border-radius: 10px;
}

.view-mode-button {
  border: 1px solid transparent;
  background: transparent;
  color: #41617b;
  font: inherit;
  font-size: 0.79rem;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.view-mode-button.active {
  background: #ffffff;
  color: #0b4f7b;
  border-color: #c9daea;
}

#resultInfo {
  margin: 0;
  color: #4d6881;
  font-size: 0.79rem;
  font-weight: 700;
}

.folder-block {
  margin-top: 0.8rem;
  padding: 0.9rem;
  animation: rise 0.45s ease;
  background: linear-gradient(180deg, #fff, #fcfdff);
}

.folder-block h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  text-align: left;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.5rem;
  background: var(--surface-soft);
}

tbody td {
  border-bottom: 1px solid #e5ebf2;
  padding: 0.68rem 0.5rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.file-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.file-link-icon {
  width: 0.95rem;
  height: 0.95rem;
  color: #2b6e9a;
  flex: 0 0 auto;
}

.file-link-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cad9e7;
  background: #f5f9fd;
  color: #2f5777;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
}

.type-klasor {
  color: #35602f;
  background: #edf8ee;
  border-color: #cae5cd;
}

.type-zip,
.type-tar-gz,
.type-sql-gz,
.type-rdb,
.type-msi,
.type-iso,
.type-mp4,
.type-flac,
.type-pdf {
  color: #274d70;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #d0deeb;
  background: #f4f9ff;
  color: #355874;
  padding: 0.14rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-hazır {
  background: #e9fbf2;
  border-color: #c7ebd8;
  color: #1b7c4f;
}

.status-index {
  background: #f2f6fb;
}

.row-actions {
  white-space: nowrap;
}

.row-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c4d6e6;
  background: #f4f9fd;
  color: #1f4f73;
  border-radius: 8px;
  padding: 0.18rem 0.45rem;
  margin-right: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.row-action-btn.primary {
  background: #e6f4ff;
  border-color: #abcde7;
  color: #0a4f7f;
}

.row-action-btn[disabled],
.row-action-btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

body[data-view-mode="compact"] thead th,
body[data-view-mode="compact"] tbody td {
  padding-top: 0.44rem;
  padding-bottom: 0.44rem;
  font-size: 0.82rem;
}

tbody tr:hover {
  background: var(--accent-soft);
}

.site-footer {
  margin-top: 0.8rem;
  margin-bottom: 1.1rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}

.footer-title {
  margin: 0;
  color: #0b4f7b;
  font-size: 0.95rem;
  font-weight: 700;
}

.footer-subtitle {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.footer-meta > span {
  border: 1px solid #d5e2ee;
  border-radius: 999px;
  background: #f3f8fd;
  color: #3b607c;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
}

.footer-meta strong {
  color: #0c4f7d;
}

.footer-cli {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #d7e4ef;
  border-radius: 12px;
  background: #f6faff;
}

.footer-cli-title {
  margin: 0;
  color: #0a4f7b;
  font-size: 0.83rem;
  font-weight: 700;
}

.footer-cli-note {
  margin: 0.2rem 0 0.6rem;
  color: #587086;
  font-size: 0.76rem;
}

.footer-cli-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.footer-cli-row:last-child {
  margin-bottom: 0;
}

.footer-cli-row code {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid #d5e2ed;
  border-radius: 8px;
  background: #ffffff;
  color: #2d4a61;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow-x: auto;
}

.footer-copy {
  margin: 0.65rem 0 0;
  padding-top: 0.55rem;
  border-top: 1px dashed #dbe6f0;
  color: #61768a;
  font-size: 0.76rem;
}

@keyframes rise {
  from {
    transform: translateY(8px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .category-topbar {
    padding-top: 0.75rem;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .content-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-wrap {
    width: 100%;
  }

  .tools-bar {
    align-items: flex-start;
  }

  .site-footer {
    padding: 0.85rem 0.8rem;
  }

  .footer-cli-row {
    flex-direction: column;
    align-items: stretch;
  }

  .folder-block {
    overflow-x: auto;
  }

  table {
    min-width: 680px;
  }
}
