/* ---------- Ayarlar paneli ---------- */
.settings-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.2s ease;
}

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

.settings-sheet {
  background: var(--card-bg);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  width: 100%;
  max-height: 92vh;
  height: auto;
  display: flex;
  flex-direction: column;
  padding: 8px 0 24px;
  animation: slideUp 0.25s ease;
  overflow: hidden;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line-2);
  flex-shrink: 0;
}

.settings-header-text { flex: 1; }

.settings-title {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.settings-subtitle {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 4px;
}

/* Kategori filtresi */
.settings-categories {
  display: flex;
  gap: 8px;
  padding: 12px 20px 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 0;
}

.settings-categories::-webkit-scrollbar { display: none; }

.settings-category-pill {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .15s ease;
}

.settings-category-pill:hover {
  background: var(--line-2);
}

.settings-category-pill.is-active {
  background: var(--ink);
  color: var(--card-bg);
  border-color: var(--ink);
}

/* Tema önizleme grid'i */
.settings-grid {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  flex: 1;
  align-items: start;
}

@media (min-width: 520px) {
  .settings-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 760px) {
  .settings-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .settings-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 8px;
  }
}

/* Tema önizleme kartı */
.theme-preview-card {
  background: transparent;
  border: 0;
  border-radius: 18px;
  padding: 0;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  transition: all .18s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.theme-preview-card:hover {
  transform: translateY(-2px);
}

.theme-preview-card-active .theme-preview-frame {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.theme-preview-frame {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  padding: 6px;
  border: 1.5px solid var(--line-2);
  position: relative;
  transition: transform .2s ease;
}

.theme-preview-surface {
  width: 100%;
  height: 100%;
  border: 1px solid;
  position: relative;
  overflow: hidden;
  padding: 10%;
}

.theme-preview-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 5%;
}

.theme-preview-patch {
  display: block;
}

.theme-preview-accent-dot {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--card-bg) 75%, transparent);
}

/* Meta */
.theme-preview-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  min-height: 28px;
  padding: 0 2px 2px;
}

.theme-preview-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.theme-preview-check {
  font-size: 9px;
  color: var(--accent);
  font-weight: 700;
}
