.grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    align-items: stretch;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    max-width: 1200px;
    margin: 0 auto;
}

.grid article {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.app-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.app-card {
  border: 1px solid var(--muted-border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  background: var(--card-bg, var(--background-color));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease;
}

.app-card:hover {
  transform: translateY(-3px);
}

.app-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
}

.app-meta h3 {
  margin: 0;
  font-size: 1.1rem;
}

.app-meta p {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--muted-text-color);
}

.app-badges {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}


/* --- App Detail sayfası --- */

.app-detail {
  margin-top: 2rem;
}

.banner-container {
  position: relative;
  margin-bottom: 1rem;
}

.banner {
  width: 100%;
  border-radius: 0.5rem;
}

.icon-on-banner {
  position: absolute;
  bottom: -2rem;
  left: 2rem;
  width: 96px;
  height: 96px;
  border-radius: 1rem;
  border: 3px solid var(--background-color, #fff);
  background: white;
}

.description {
  margin-top: 3rem;
  font-size: 1.1rem;
}

/* Grid yapılandırması */
.screenshots-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.screenshots-grid img {
  width: 100%;
  border-radius: 0.5rem;
  object-fit: cover;
}

/* Landscape screenshot layout */
.landscape-grid {
  grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 768px) {
  .landscape-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .landscape-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Portrait screenshot layout */
.portrait-grid {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
  .portrait-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 1024px) {
  .portrait-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.app-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

.site-logo {
  height: 96px;
  width: auto;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-link img {
  height: 64px;
}

/* Mobilde daha küçük göster (örneğin ekran 600px'den küçükse) */
@media (max-width: 600px) {
  .logo-link img {
    height: 48px;
  }
}

/* Orta boyutlu tabletlerde biraz ortada kalsın */
@media (max-width: 900px) and (min-width: 601px) {
  .logo-link img {
    height: 64px;
  }
}

header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
}

/* Menü */
nav ul.menu {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

/* Menü ve tema düğmeleri grubu */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Menü Toggle */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
}

/* Tema düğmesi */
.theme-switcher {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.theme-switcher img {
  width: 28px;
  height: 28px;
}

/* --- Mobil görünüm --- */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
  }

  /* Menü görünümü */
  nav ul.menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    text-align: center;
  }

  nav ul.menu.show {
    display: flex;
  }

  /* Menü toggle göster, yanına tema butonu */
  .menu-toggle {
    display: block;
  }

  .header-actions {
    margin-left: auto;
  }

  .menu-toggle:active,
  .menu-toggle:focus {
    background: none !important;
    outline: none;
  }
}

/* --- Desktop görünüm --- */
@media (min-width: 769px) {
  .menu-toggle {
    display: none !important;
  }

  nav ul.menu {
    display: flex !important;
  }

  .header-actions {
    order: 2; /* Sağda dursun */
  }

  nav {
    justify-content: space-between;
  }
}