:root {
  --main: #000;
  --accent: #ffb43a;
  --bg: #0f0f0f;
  --card: #1a1a1a;
  --text: #eaeaea;
  --border: #2a2a2a;
}

#kapikodSearch {
  text-align: left;
}

#kapikodSearch::placeholder {
  text-align: center;
}

html.light-theme {
  --main: #ffffff;
  --accent: #2563eb;
  --bg: #f5f5f5;
  --card: #ffffff;
  --text: #1e1e1e;
  --border: #dcdcdc;
}

body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  padding: 25px;
  position: relative;
  overflow-x: hidden;

  background:
    radial-gradient(
      circle at top left,
      rgba(120, 130, 150, 0.07),
      transparent 28%
    ),
    radial-gradient(
      circle at top right,
      rgba(80, 90, 110, 0.05),
      transparent 24%
    ),
    linear-gradient(180deg, #111111 0%, #0c0c0d 45%, #080808 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;

  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);

  background-size: 40px 40px;
}

body::after {
  content: "";
  position: fixed;
  width: 500px;
  height: 500px;
  top: -150px;
  left: -150px;
  border-radius: 50%;
  background: rgba(120, 130, 150, 0.03);
  filter: blur(120px);
  z-index: -1;
}

@keyframes floatGlow {
  from {
    transform: translate(0, 0);
  }

  to {
    transform: translate(80px, 40px);
  }
}

@media (max-width: 767px) {
  body::before,
  body::after {
    display: none;
  }
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--accent) #111;
  scrollbar-width: thin;
}

body.no-scroll {
  overflow: hidden;
}

h1 {
  color: var(--accent);
  text-align: center;
}

h2 {
  font-size: 26px;
  color: var(--accent);
}

h3 {
  display: flex;
  justify-content: center;
  color: var(--accent);
}

select {
  padding: 8px 15px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 16px;
  background: var(--card);
  color: var(--accent);
  font-weight: bold;
}

hr {
  background-color: var(--accent);
  height: 2px;
  border: none;
}

footer {
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--accent);
  border-right: 4px solid var(--accent);
  border-radius: 16px;
  text-align: center;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  margin-top: 40px;
}

footer p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
}

footer a {
  text-decoration: none;
  color: var(--accent);
  transition: 0.2s;
}

footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

input::placeholder {
  color: #5df505;
  opacity: 1;
  font-size: 15px;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #111;
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
  border: 2px solid #111;
}

::-webkit-scrollbar-thumb:hover {
  background: #ffaa00;
}

#baslik {
  margin-top: 40px;
  margin-bottom: 30px;
  display: flex;
  text-align: center;
  justify-content: center;
}

#singleLightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#singleLightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  transition: transform 0.2s ease;
}

#singleLightbox span {
  position: absolute;
  color: var(--accent);
  font-size: 80px;
  cursor: pointer;
}

#closeBtn {
  top: 0px;
  right: 10px;
  font-size: clamp(30px, 5vw, 70px);
}

#prevBtn {
  top: 50%;
  left: 2vw;
  transform: translateY(-50%);
  font-size: clamp(30px, 5vw, 70px);
}

#nextBtn {
  top: 50%;
  right: 2vw;
  transform: translateY(-50%);
  font-size: clamp(30px, 5vw, 70px);
}

#btnup {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 0px;
}

.kapikod-search-wrapper {
  position: relative;
  width: min(500px, 92%);
}

.kapikod-search-wrapper i {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);

  color: rgba(255, 180, 58, 0.9);
  font-size: 15px;

  pointer-events: none;

  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

#kapikodSearch {
  width: 100%;
  height: 50px;
  box-sizing: border-box;

  padding: 0 18px 0 45px;

  background: rgba(255, 255, 255, 0.04);
  color: var(--text);

  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;

  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;

  outline: none;

  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);

  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

#kapikodSearch::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

#kapikodSearch:hover {
  border-color: rgba(255, 180, 58, 0.3);
  background: rgba(255, 255, 255, 0.055);
}

#kapikodSearch:focus {
  border-color: var(--accent);

  background: rgba(255, 255, 255, 0.06);

  box-shadow:
    0 0 0 3px rgba(255, 180, 58, 0.15),
    0 10px 30px rgba(0, 0, 0, 0.25);

  transform: translateY(-1px);
}

.kapikod-search-wrapper:focus-within i {
  color: var(--accent) !important;
  opacity: 1;
  transform: translateY(-50%) scale(1.08);
}

#buss {
  font-size: 26px;
  color: var(--accent);
}

#BolgeAdi {
  font-family: "Poppins", "Montserrat", sans-serif;
  font-size: clamp(16px, 5vw, 26px);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-align: center;
  margin-bottom: 30px;
  text-transform: uppercase;

  background: linear-gradient(90deg, #ffb43a, #ffd27a, #ffb43a);
  background-size: 200% auto;

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  text-shadow:
    0 2px 10px rgba(255, 180, 58, 0.25),
    0 4px 20px rgba(255, 180, 58, 0.15);

  animation: shine 3s linear infinite;
}

@keyframes shine {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

#hat-links:hover {
  text-decoration: none !important;
}

#bolgesi {
  color: var(--text);
  font-weight: normal;
}

.note {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto 30px;
  padding: 12px 16px;
  max-width: max-content;

  background: rgba(255, 255, 255, 0.03);

  border-left: 3px solid var(--accent);
  border-right: 3px solid var(--accent);

  border-radius: 8px;

  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  gap: 8px;
  transition: 0.2s ease;
}

.note:hover {
  border-left-color: #ffd27a;
  border-right-color: #ffd27a;
  color: #fff;
}

.footer-note {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.2px;
}

.kapikod-search-bar {
  width: 600px;
  display: flex;
  justify-content: center;
  margin: 18px 0 22px;
}

.top-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  width: 100%;
}

.header-left {
  justify-self: start;
}

.header-center {
  justify-self: center;
  text-align: center;
}

.header-right {
  justify-self: end;
}

#baslik {
  margin-top: 50px;
  text-align: center;
}

.header-row h2 {
  margin: 0;
}

.dropdown {
  position: relative;
  width: 575px;
}

.dropdown-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: var(--card);
  color: var(--accent);
  border: 1px solid #333;
  border-radius: 6px;
  cursor: pointer;
  width: 280px;
}

.dropdown-content {
  display: none;
  position: absolute;
  width: 300px;
  background: var(--card);
  border: 1px solid #333;
  border-radius: 6px;
  margin-top: 5px;
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 999;
}

.dropdown-content.active {
  display: block;
}

.dropdown-content label {
  display: block;
  padding: 8px 10px;
  cursor: pointer;
  color: #eee;
  white-space: nowrap;
}

.dropdown-content input {
  font-size: 17px;
}

.filter-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.filter-container .filter-box {
  display: block;
  width: 302px;
  box-sizing: border-box;
}

.filter-container .filter-box form {
  margin: 0;
}

.search-box {
  width: 100%;
  padding: 8px;
  border: none;
  outline: none;
  background: #111;
  color: var(--text);
  border-bottom: 1px solid #333;
  box-sizing: border-box;
}

.no-result {
  display: none;
  padding: 10px;
  text-align: center;
  color: #aaa;
  font-size: 14px;
}

/* Desktop / Laptop */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

/* Tablet (hem yatay hem dikey) */
@media (max-width: 1280px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobil */
@media (max-width: 990px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  transition: 0.3s;
  border: 1px solid var(--border);
}

.card {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);

  border-color: rgba(255, 180, 58, 0.18);

  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.55),
    0 6px 18px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 180, 58, 0.05);

  filter: brightness(1.03);
}

.card-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  position: relative;
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
}

.card-img:hover img {
  transform: scale(1.02);
}

.card-img-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.card-img-bg {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(30px) brightness(0.7);
  transform: scale(1.2);
  z-index: 1;
}

.card-img-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
}

.card-img img {
  position: absolute;
  inset: 0;
  z-index: 2;

  width: 100%;
  height: 100%;
  object-fit: contain;

  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s ease;
}

.card-body {
  padding: 12px 16px;
  font-size: 17.5px;
}

.card-body p {
  margin: 4px 0;
  padding-left: 8px;
  border-left: 3px solid var(--accent);
}

.card-body b {
  color: var(--accent);
  font-family: "Roboto", "Segoe UI", sans-serif;
}

.card-body a {
  text-decoration: none;
  color: var(--text);
}

.card-body a:hover {
  color: var(--accent);
}

#PhotoResource:hover {
  color: var(--accent);
  text-decoration: underline;
}

.tables-wrapper {
  display: flex;
  gap: 30px;
  margin-top: 40px;
  flex-wrap: wrap;
  font-size: 17px;
}

.table-box {
  flex: 1;
  min-width: 350px;
  background: var(--card);
  border-radius: 12px;
  padding: 15px;
  border: 1px solid var(--border);
  height: max-content;
}

.table-box h2 {
  margin-bottom: 10px;
  color: var(--accent);
  border-left: 5px solid var(--accent);
  padding-left: 10px;
}

.table-box table {
  width: 100%;
  border-collapse: collapse;
}

.table-box th {
  background: var(--main);
  color: var(--accent);
  padding: 10px;
  text-align: center;
}

.table-box td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.table-box tr:hover td {
  background: rgba(255, 180, 58, 0.08);
}

.table-box td:last-child {
  font-weight: bold;
  color: var(--accent);
}

.stats-btn {
  display: inline-block;
  padding: 12px 20px;
  margin-bottom: 50px;
  margin-top: 10px;
  background: var(--accent);
  color: var(--main);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.3s;
}

.stats-btn:hover {
  background: #ffa500;
  cursor: pointer;
}

.summary-text {
  text-align: center;
  margin: 40px 0 50px;
  font-size: 16px;
  color: #ccc;
  letter-spacing: 0.3px;
  font-weight: bold;
}

.summary-text strong {
  color: var(--accent);
  font-weight: 600;
}

.pagination {
  margin-top: 30px;
  text-align: center;
}

.pagination-desktop a {
  display: inline-block;
  margin: 5px;
  padding: 8px 14px;
  background: #111;
  color: var(--text);
  border-radius: 8px;
  text-decoration: none;
  transition: 0.2s;
}

.pagination-desktop a:hover {
  background: var(--accent);
  color: var(--bg);
}

.pagination-desktop span {
  margin: 0 10px;
  font-weight: 500;
}

.pagination-desktop a.active {
  background: var(--accent);
  color: var(--bg);
  font-weight: bold;
}

.pagination-mobile {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.pagination-mobile .btn {
  padding: 12px 18px;
  font-size: 20px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 10px;
  text-decoration: none;
}

.pagination-mobile .page-info {
  font-size: 16px;
  font-weight: 500;
}

.filter-box {
  display: flex;
  flex-wrap: wrap;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-box form {
  margin-right: 45px;
}

.filters form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 15px;
}

.filters label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.filters select {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: var(--card);
  color: var(--text);
  border: 1px solid #333;
  border-radius: 6px;
  cursor: pointer;
}

.no-data {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-data-box {
  text-align: center;
  padding: 40px 50px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  margin-bottom: 30px;
}

.no-data-icon {
  font-size: 38px;
  margin-bottom: 15px;
  opacity: 0.8;
  color: var(--accent);
}

.no-data-text {
  font-size: 17px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 20px;
}

.no-data-btn {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.25s ease;
}

.no-data-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 180, 58, 0.4);
}

.no-data-btn:active {
  transform: scale(0.97);
}

.goto-page {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 15px;
}

.goto-page input {
  width: 50px;
  padding: 10px 5px;
  border: 1px solid #444;
  border-radius: 8px;
  background: #1d1d1d;
  color: #fff;
  text-align: center;
  font-size: 14px;
}

.goto-page.mobile input {
  width: 30px;
}

.goto-page.mobile input::placeholder,
.goto-page input::placeholder {
  color: #ffb43a;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-box {
  background: var(--bg);
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 25px;
}

.popup-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.popup-content {
  padding: 15px;
  overflow-y: auto;
}

.footer {
  text-align: center;
  margin-top: 15px;
}

.footer .socials {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 5px;
  border-radius: 50%;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  transition: 0.3s;
}

.socials a:hover {
  background: var(--accent);
  color: #000;
  text-decoration: none;
}

.socials i {
  font-size: 18px;
}

.fa-regular.fa-trash-can {
  font-size: 35px;
  margin-left: 15px;
  margin-top: 8px;
}

.fa-regular.fa-trash-can:hover {
  cursor: pointer;
  color: var(--accent);
}

.hat-link {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
}

.hat-link:hover {
  text-decoration: underline;
}

@media (max-width: 1680px) {
  .card-body {
    font-size: 15px;
  }
}

@media (max-width: 1500px) {
  .card-body {
    font-size: 12.5px;
  }
  .filters form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
  }
}

@media (max-width: 1366px) {
  .card-body {
    font-size: 11.5px;
  }
  .filters form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
  }
}

@media (max-width: 1280px) {
  .card-body {
    font-size: 13.75px;
  }

  .filters form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
  }
}

@media (max-width: 1024px) {
  .card-body {
    font-size: 13px;
  }

  .filters form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
  }
}

@media (max-width: 991px) {
  .card-body {
    font-size: 12.5px;
  }
}

@media (min-width: 768px) and (max-width: 990px) {
  .card-body {
    font-size: 18px;
  }

  .tables-wrapper {
    flex-direction: column;
  }

  .filters form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  h1 {
    margin-top: 30px;
  }
}

@media (max-width: 767px) {
  body {
    padding: 15px;
  }

  .card {
    border-radius: 10px;
  }

  .card-body {
    font-size: 16px;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 24px;
  }

  select {
    font-size: 15px;
  }

  .tables-wrapper {
    gap: 20px;
  }

  .table-box {
    min-width: 300px;
  }

  .pagination-desktop {
    display: none;
  }

  .pagination-mobile {
    display: flex;
  }

  .filter-box {
    display: block;
  }

  .filters form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .filters select {
    width: 100%;
  }

  .dropdown {
    width: 100%;
  }

  .no-data {
    padding: 0px;
  }

  #prevBtn {
    left: 0vw;
  }

  #nextBtn {
    right: 0vw;
  }

  footer {
    padding: 12px;
  }

  footer p {
    font-size: 13px;
    line-height: 1.5;
  }

  .no-data-text {
    font-size: 15px;
  }

  .popup-header h2 {
    font-size: 22px;
  }

  .filter-box form {
    margin-right: 0px;
  }

  .dropdown-btn {
    width: 95%;
  }

  .dropdown-content {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .card-body {
    font-size: 14px;
  }

  #buss {
    font-size: 23px;
  }

  #singleLightbox span {
    font-size: 45px;
  }

  .table-box td {
    font-size: 14px;
  }

  .note {
    font-size: 14px;
  }

  .table-box {
    min-width: 300px;
  }

  .fa-regular.fa-trash-can {
    font-size: 20px;
    margin-left: 15px;
    margin-top: 15px;
  }
}

@media (max-width: 360px) {
  .table-box {
    min-width: 250px;
  }

  .popup-header h2 {
    font-size: 18px;
  }
}

@media (max-width: 320px) {
  .table-box {
    min-width: 200px;
    width: 100%;
    overflow-x: auto;
  }

  .filters form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #baslik,
  h1,
  h2 {
    font-size: 18px;
  }

  .stats-btn {
    font-size: 10px;
  }

  .popup-header h2 {
    font-size: 16px;
  }

  .card-body {
    font-size: 10.5px;
  }

  .table-box h2 {
    font-size: 16px;
  }

  #BolgeAdi {
    font-size: 14px;
  }

  #buss {
    font-size: 16px;
  }
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 10px;
  z-index: 9999;

  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;

  background: var(--card);
  color: var(--accent);
  border: 1px solid var(--border);

  cursor: pointer;
  font-size: 17px;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.25s ease;
}

.theme-toggle:hover {
  transform: scale(1.02);
  background: var(--accent);
  color: var(--main);
}

@media (max-width: 767px) {
  .theme-toggle {
    width: 35px;
    height: 35px;
    top: 5px;
    right: 5px;
    font-size: 17px;
  }

  .filter-box {
    margin-top: 35px;
  }

  .filter-container {
    align-items: stretch;
  }

  .filter-container .dropdown {
    width: 100%;
  }

  .filter-container .dropdown-btn {
    width: 95%;
  }
  hr {
    margin-top: -20px;
  }
}

@media (max-width: 600px) {
  .hat-popup {
    padding: 12px;
  }

  .hat-popup-content {
    max-height: 85vh;
    padding: 20px;
  }
}

.hat-more {
  display: inline-block;
  padding: 0;
  margin: 0;

  border: 0;
  background: none;

  color: #ffb43a;

  font-family: inherit;
  font-size: inherit;
  font-weight: 600;

  cursor: pointer;
}

.hat-more:hover {
  color: #ffd27a;
  text-decoration: underline;
}

/* Popup */

.hat-popup {
  position: fixed;

  inset: 0;

  width: 100%;
  height: 100%;

  z-index: 999999;

  display: none;

  align-items: center;
  justify-content: center;

  padding: 20px;

  box-sizing: border-box;

  background: rgba(0, 0, 0, 0.75);

  backdrop-filter: blur(5px);
}

.hat-popup.active {
  display: flex;
}

.hat-popup-content {
  position: relative;

  width: min(600px, 100%);
  max-height: 80vh;

  overflow-y: auto;

  padding: 25px;

  box-sizing: border-box;

  background: #1b1b1b;

  border: 1px solid rgba(255, 255, 255, 0.1);

  border-radius: 14px;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.hat-popup-title {
  margin-bottom: 18px;

  color: #ffb43a;

  font-size: 20px;
  font-weight: 700;
}

.hat-popup-close {
  position: absolute;

  top: 10px;
  right: 12px;

  width: 35px;
  height: 35px;

  padding: 0;

  border: none;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.06);

  color: #ddd;

  font-size: 26px;

  cursor: pointer;
}

.hat-popup-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.hat-popup-list {
  display: flex;
  flex-direction: column;

  gap: 7px;
}

.hat-popup-list a {
  display: block;

  padding: 11px 13px;

  border-radius: 8px;

  background: rgba(255, 255, 255, 0.04);

  border: 1px solid rgba(255, 255, 255, 0.06);

  color: #ddd;

  text-decoration: none;

  transition: 0.2s;
}

.hat-popup-list a:hover {
  color: #ffb43a;

  background: rgba(255, 180, 58, 0.08);

  border-color: rgba(255, 180, 58, 0.25);
}

body.popup-open {
  overflow: hidden;
}

.hat-popup {
  position: fixed;
  inset: 0;

  z-index: 999999;

  display: none;

  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.75);
}

.hat-popup.active {
  display: flex;
}

/*-------------------------------------------------------------- AÇIK TEMA CSS ------------------------------------------------------------------------------------------------ */

html.light-theme {
  background: #fff;
}

html.light-theme #kapikodSearch {
  background: #fff;
  color: #111;
  border: 1px solid #ccc;
}

html.light-theme .dropdown-btn {
  background: #fff;
  color: #111;
  border: 1px solid #ccc;
}

html.light-theme .dropdown-content {
  background: #fff;
  border: 1px solid #ddd;
}

html.light-theme .pagination-desktop a {
  background: #fff;
  color: #111;
}

html.light-theme .search-box {
  background: #ffffff;
  color: #111111;
  border-bottom: 1px solid #d6d6d6;
}

html.light-theme .search-box::placeholder {
  color: #2563eb;
}

html.light-theme #kapikodSearch {
  background: #ffffff;
  color: #111111;
  border: 1px solid #d6d6d6;
}

html.light-theme #kapikodSearch::placeholder {
  color: #777;
}

html.light-theme .dropdown-content label {
  color: #222;
}

html.light-theme .dropdown-content label:hover {
  background: rgba(0, 0, 0, 0.04);
}

html.light-theme .dropdown-content input[type="checkbox"] {
  background-color: #2563eb;
  color: #1f2937;
}

html.light-theme {
  scrollbar-color: var(--accent) #f1f1f1;
}

html.light-theme ::-webkit-scrollbar-track {
  background: #f1f1f1;
}

html.light-theme select::-webkit-scrollbar {
  width: 10px;
}

html.light-theme select::-webkit-scrollbar-track {
  background: #f1f1f1;
}

html.light-theme select::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}

html.light-theme #kapikodSearch:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-shadow);
}

html.light-theme .pagination-desktop a {
  background: #ffffff;
  color: #111111;
  border: 1px solid #dcdcdc;
}

html.light-theme .pagination-desktop a:hover {
  background: var(--accent);
  color: #ffffff;
}

html.light-theme .pagination-desktop a.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

html.light-theme .pagination-mobile .btn {
  background: var(--accent);
  color: #ffffff;
}

html.light-theme .goto-page input {
  background: #ffffff;
  color: #111111;
  border: 1px solid #d6d6d6;
}

html.light-theme .goto-page input::placeholder,
html.light-theme .goto-page.mobile input::placeholder {
  color: var(--accent);
}

html.light-theme .goto-page input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

html.light-theme .stats-btn:hover {
  background: #25579c;
  color: #fff;
  cursor: pointer;
}

html.light-theme body {
  background: #f5f5f5;
  color: #111;
}

html.light-theme {
  scrollbar-color: var(--accent) #f5f5f5;
}

html.light-theme footer {
  background: var(--card);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

html.light-theme .footer-note {
  color: #555;
}

html.light-theme .no-data-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

html.light-theme .note {
  background: rgba(37, 99, 235, 0.05);
  color: #444;
}

html.light-theme .note:hover {
  border-left-color: #2563eb;
  border-right-color: #2563eb;
  color: #111;
}

html.light-theme #BolgeAdi {
  background: linear-gradient(90deg, #2563eb, #60a5fa, #2563eb);
  background-size: 200% auto;

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  text-shadow:
    0 2px 10px rgba(37, 99, 235, 0.18),
    0 4px 20px rgba(37, 99, 235, 0.1);
}

html.light-theme .summary-text {
  color: var(--text);
}

.theme-toggle i {
  transition:
    transform 0.25s ease,
    color 0.25s ease;
}

.theme-toggle:hover i {
  transform: scale(1.1);
}

select option {
  color: var(--text) !important;
  background: var(--card);
}

html:not(.light-theme) optgroup {
  color: #ffb43a;
  font-weight: 600;
}

html.light-theme optgroup {
  color: #2563eb;
  font-weight: 600;
}

optgroup option {
  color: var(--text) !important;
}

html.light-theme #kapikodSearch {
  background: rgba(255, 255, 255, 0.9);
  color: #111;

  border: 1px solid #d8d8d8;

  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

html.light-theme #kapikodSearch::placeholder {
  color: #888;
}

html.light-theme #kapikodSearch:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: #fff;
}

html.light-theme #kapikodSearch:focus {
  border-color: var(--accent);

  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.2),
    0 8px 25px rgba(0, 0, 0, 0.08);
}

html.light-theme .kapikod-search-wrapper i {
  color: rgba(37, 99, 235, 0.95);
}

html.light-theme .kapikod-search-wrapper:focus-within i {
  color: var(--accent);
}

html.light-theme .hat-more {
  color: var(--accent);
}

html.light-theme .hat-popup-content {
  background: #fff;
}

html.light-theme .hat-popup-title {
  color: var(--accent);
}

html.light-theme .hat-popup-close {
  color: var(--accent);
}

html.light-theme .hat-popup-list a {
  color: var(--accent);
  border-color: var(--accent);
}

html.light-theme .hat-popup-list a:hover {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
}

html.light-theme .hat-popup {
  color: var(--accent);
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  max-width: max-content;
  margin: 10px auto 30px;
  padding: 0 10px;
}

.stats-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 14px;

  background: var(--card);
  border: 1px solid var(--border);

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.stats-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);

  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stats-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  color: var(--accent);
  background: rgba(255, 180, 58, 0.12);

  font-size: 21px;
}

.stats-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stats-info span {
  color: var(--text);
  opacity: 0.65;
  font-size: 13px;
}

.stats-info strong {
  color: var(--accent);
  font-size: 23px;
  font-weight: 700;
}

html.light-theme .stats-icon {
  background: rgba(37, 99, 235, 0.1);
}

html.light-theme .stats-card:hover {
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.08);
}

@media (max-width: 900px) {
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-container {
    gap: 10px;
    padding: 0 5px;
  }

  .stats-card {
    padding: 13px 10px;
    gap: 10px;
  }

  .stats-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 16px;
  }

  .stats-info span {
    font-size: 11px;
  }

  .stats-info strong {
    font-size: 17px;
  }
}

@media (max-width: 480px) {
  .stats-info strong small {
    font-size: 10.5px;
  }
}

@media (max-width: 768px) {
  .top-header {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "left right"
      "center center";
    align-items: center;
    row-gap: 20px;
    width: 100%;
  }

  .header-left {
    grid-area: left;
    justify-self: stretch;
    width: 100%;
    margin-bottom: 20px;
  }

  .header-center {
    grid-area: center;
    justify-self: stretch;
    width: 100%;
  }

  .header-right {
    grid-area: right;
    justify-self: end;
  }

  .header-left select,
  .header-left .filter-box {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  #baslik {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    text-align: center;
    font-size: 23px;
  }

  .kapikod-search-bar {
    width: 100%;
  }
}

@media (min-width: 769px) and (max-width: 1200px) and (orientation: landscape) {
  .stats-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
  }

  .stats-card {
    padding: 14px 12px;
    gap: 10px;
    min-width: 0;
  }

  .stats-icon {
    font-size: 23px;
  }

  .stats-info span {
    font-size: 13px;
  }

  .stats-info strong {
    font-size: 19px;
  }

  .stats-info strong small {
    font-size: 11px;
  }

  .header-left {
    margin-right: 30px;
  }
}

.vehicle-gallery-button {
  display: flex;
  align-items: center;
  gap: 13px;

  width: 100%;
  box-sizing: border-box;

  margin-top: 20px;
  padding: 12px 14px;

  background: linear-gradient(110deg, #111111, #1d1a14);
  border: 1px solid rgba(255, 180, 58, 0.45);
  border-left: 4px solid #ffb43a;
  border-radius: 10px;

  text-decoration: none !important;
  color: #eaeaea !important;

  transition: all 0.25s ease;
}

.gallery-button-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 43px;
  height: 43px;
  min-width: 43px;

  border-radius: 9px;

  background: rgba(255, 180, 58, 0.13);
  border: 1px solid rgba(255, 180, 58, 0.2);

  color: var(--accent);
  font-size: 19px;
}

.gallery-button-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.gallery-button-text strong {
  color: #ffb43a;
  font-size: 14px;
  font-weight: 700;
}

.gallery-button-text small {
  color: #bdbdbd;
  font-size: 11px;
  font-weight: 400;
}

.gallery-button-arrow {
  color: #ffb43a;
  font-size: 16px;
  transition: transform 0.25s ease;
}

.vehicle-gallery-button:hover {
  background: linear-gradient(110deg, #201a10, #30220e);
  border-color: #ffb43a;

  transform: translateY(-2px);

  box-shadow:
    0 5px 18px rgba(0, 0, 0, 0.35),
    0 0 12px rgba(255, 180, 58, 0.08);
}

.vehicle-gallery-button:hover .gallery-button-icon {
  background: rgba(255, 180, 58, 0.22);
}

.vehicle-gallery-button:hover .gallery-button-arrow {
  transform: translateX(5px);
}

.vehicle-gallery-button:active {
  transform: scale(0.99);
}

html.light-theme .vehicle-gallery-button {
  background: linear-gradient(110deg, #ffffff, #fff9ed);
  border-color: rgba(37, 99, 235, 0.25);
  border-left-color: #2563eb;
}

html.light-theme .gallery-button-icon {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.15);
}

html.light-theme .gallery-button-text strong,
html.light-theme .gallery-button-arrow {
  color: #2563eb;
}

html.light-theme .gallery-button-text small {
  color: #666;
}

html.light-theme .vehicle-gallery-button:hover {
  background: #f0f5ff;
  border-color: #2563eb;
}

html.light-theme .vehicle-gallery-button:hover .gallery-button-icon {
  background: rgba(37, 99, 235, 0.15);
}

@media (hover: none) and (pointer: coarse) {
  .card:hover {
    transform: none;
    filter: none;
    border-color: var(--border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  }

  .card-img:hover img {
    transform: none;
  }

  .stats-card:hover {
    transform: none;
  }
}

@media (max-width: 767px) {
  .card {
    transition: none;
  }

  .card-img img {
    transition: none;
  }

  .stats-card {
    transition: none;
  }
  hr {
    margin-top: 15px;
  }
}

@media (max-width: 767px) {
  .card-img-bg {
    filter: blur(15px) brightness(0.7);
  }
}

.segment-bar {
  display: inline-flex;
  margin-bottom: 14px;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 10px;
  overflow: hidden;
}

.segment-bar .seg-btn {
  padding: 9px 20px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.segment-bar .seg-btn + .seg-btn {
  border-left: 1px solid rgba(128, 128, 128, 0.35);
}

.segment-bar .seg-btn:hover {
  background: rgba(128, 128, 128, 0.15);
}

.segment-bar .seg-btn.active {
  background: var(--accent, #ffb43a);
  color: var(--accent-contrast, #111);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.filter-item > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  opacity: 0.7;
}

.filter-item select,
.filter-item input[type="text"] {
  width: 100%;
  min-width: 0;
}

.filter-item input[type="text"] {
  padding: 9px 10px;
  border: 1px solid rgba(128, 128, 128, 0.4);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
}

.filter-clear {
  padding: 10px 12px;
  border: 1px solid rgba(128, 128, 128, 0.4);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.filter-clear:hover {
  background: rgba(128, 128, 128, 0.15);
}

@media (max-width: 600px) {
  .segment-bar {
    display: flex;
  }

  .segment-bar .seg-btn {
    flex: 1;
    padding: 9px 6px;
  }

  .filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.filters #allFiltersForm {
  display: block;
}

.filter-item input[type="text"] {
  padding: 10px;
  border: 1px solid #333;
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  box-sizing: border-box;
}

.filter-item input[type="text"]::placeholder {
  color: rgba(128, 128, 128, 0.85);
  opacity: 1;
}

html.light-theme .segment-bar .seg-btn.active {
  color: #fff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  padding: 11px 16px;

  background: var(--accent);
  color: #111;

  border: 1px solid var(--accent);
  border-radius: 10px;

  font-size: 14px;
  font-weight: 700;
  text-decoration: none;

  white-space: nowrap;

  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.18);
  transition: all 0.2s ease;
}

.upload-header-btn i {
  font-size: 16px;
}

.upload-header-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.25);
}

.upload-header-btn:active {
  transform: scale(0.97);
}

@media (max-width: 767px) {
  .top-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .header-right {
    order: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding-right: 45px;
    box-sizing: border-box;
    gap: 0;
  }

  .header-left {
    order: 2;
    width: 100%;
    margin: 0;
  }

  .filter-box {
    margin-top: 0;
    width: 100%;
  }

  .filter-container {
    align-items: stretch;
  }

  .filter-container .filter-box,
  .filter-container .dropdown {
    width: 100%;
    max-width: 100%;
  }

  .filter-container .dropdown-btn {
    width: 100%;
    box-sizing: border-box;
  }

  .header-center {
    order: 3;
    width: 100%;
  }

  #baslik {
    margin: 0;
    width: 100%;
    text-align: center;
  }

  .kapikod-search-bar {
    width: 100%;
  }

  .theme-toggle {
    position: fixed;
    top: 5px;
    right: 5px;
  }
}

@media (min-width: 768px) {
  .header-right {
    padding-right: 65px;
    box-sizing: border-box;
  }
}

@media (max-width: 767px) {
  .header-right {
    padding-right: 45px;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 768px) {
  .kapikod-search-bar {
    width: 600px !important;
    max-width: 100%;
    margin: 0 auto;
  }

  .kapikod-search-wrapper {
    width: 100%;
  }
}

/* =========================================================
   ÜST ALAN - BUTONLAR, BÖLGE LİSTESİ VE ARAMA
   ========================================================= */

#baslik {
  display: none !important;
}

.header-center {
  display: block !important;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  padding: 11px 16px;

  background: var(--accent);
  color: #111;

  border: 1px solid var(--accent);
  border-radius: 10px;

  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;

  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.18);
  transition: all 0.2s ease;
}

.upload-header-btn i {
  font-size: 16px;
}

.upload-header-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.25);
}

.upload-header-btn:active {
  transform: scale(0.97);
}

@media (min-width: 768px) {
  .top-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    position: relative;
  }

  .header-left {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    width: auto;
    margin: 0;
  }

  .header-right {
    grid-column: 2;
    grid-row: 1;

    justify-self: center;
    align-self: start;

    position: static;
    transform: none;

    width: max-content;
    padding: 0;
    gap: 12px;
  }

  .header-center {
    grid-column: 2;
    grid-row: 2;

    justify-self: center;
    width: 100%;
  }

  .kapikod-search-bar {
    width: 600px;
    max-width: 100%;
    margin: 18px auto 22px;
  }

  .kapikod-search-wrapper {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .top-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
  }

  .header-right {
    order: 1;

    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;

    justify-content: center;
    align-items: center;

    width: 100%;
    padding: 0 40px 0 0;
    box-sizing: border-box;

    gap: 6px;
  }

  .header-right .upload-header-btn {
    flex: 0 1 auto;
    white-space: nowrap;

    padding: 7px 9px;
    font-size: 11px;
    gap: 5px;
    border-radius: 8px;
  }

  .header-right .upload-header-btn i {
    font-size: 13px;
  }

  .header-left {
    order: 2;
    width: 100%;
    margin: 0;
  }

  .header-left select,
  .header-left .filter-box {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .header-center {
    order: 3;
    display: block !important;
    width: 100%;
  }

  .kapikod-search-bar {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .kapikod-search-wrapper {
    width: 100%;
  }

  .theme-toggle {
    position: fixed;
    top: 5px;
    right: 5px;

    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
  }

  .theme-toggle i {
    font-size: 14px;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}