/* Renkler tek yerde: temayı değiştirmek için sadece bu değerleri değiştir. */
:root {
  --bg: #121417;
  --surface: #1c1f24;
  --surface-2: #262a31;
  --border: #33383f;
  --text: #e8e6e3;
  --muted: #9aa0a6;
  --accent: #f2a900;
  --accent-text: #1a1400;
  --danger: #e5484d;
  --success: #30a46c;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3 {
  line-height: 1.2;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.muted {
  color: var(--muted);
}

/* ---- Üst menü ---- */

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.topbar nav a:not(.button) {
  color: var(--text);
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 24px 16px;
  border-top: 1px solid var(--border);
}

/* ---- Butonlar ve formlar ---- */

button,
.button {
  display: inline-block;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover,
.button:hover {
  filter: brightness(1.1);
  text-decoration: none;
}

button.danger {
  background: var(--danger);
  color: white;
}

button.link {
  background: none;
  padding: 0;
  color: var(--muted);
  font-weight: normal;
}

button.link:hover {
  color: var(--text);
  text-decoration: underline;
}

form.inline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.form.row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
}

.form label.checkbox {
  flex-direction: row;
  align-items: center;
  font-weight: normal;
}

input[type="text"],
input[type="password"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}

.form.row input[type="text"] {
  width: auto;
  flex: 1 1 200px;
}

form.inline input[type="text"] {
  width: 140px;
  padding: 6px 10px;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.flash {
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  border: 1px solid;
}

.flash-success {
  border-color: var(--success);
  background: rgb(48 164 108 / 15%);
}

.flash-error {
  border-color: var(--danger);
  background: rgb(229 72 77 / 15%);
}

.narrow {
  max-width: 560px;
  margin: 0 auto;
}

.center {
  text-align: center;
}

.login {
  margin-top: 40px;
}

/* ---- Ana sayfa ---- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

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

.tabs a {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}

.tabs a.active {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
}

.filter {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter select {
  width: auto;
}

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

.card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform 0.15s, border-color 0.15s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  text-decoration: none;
}

.card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-2);
}

.card-body {
  padding: 12px 14px;
}

.card-body h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.card-body p {
  margin: 0;
  font-size: 0.9rem;
}

.stats {
  display: flex;
  gap: 8px;
  margin-top: 6px !important;
}

.score {
  color: var(--accent);
  font-weight: 700;
}

.score.big {
  font-size: 1.8rem;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 0;
}

.page-head {
  margin-bottom: 24px;
}

.page-head h1 {
  margin-bottom: 4px;
}

/* ---- Tasarım detay ---- */

.detail {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}

.detail-image img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  background: var(--surface);
}

.detail-info h1 {
  margin-top: 0;
}

.description {
  white-space: pre-line;
}

.rating {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  margin: 20px 0;
  border-radius: var(--radius);
  background: var(--surface);
}

/* Yıldızlar: fareyle üzerine gelince o yıldıza kadar olanlar parlar */
.stars {
  display: flex;
  gap: 2px;
}

.star {
  background: none;
  padding: 0 2px;
  font-size: 2rem;
  line-height: 1;
  color: var(--border);
}

.star.on {
  color: var(--accent);
}

.stars:hover .star {
  color: var(--accent);
}

.stars .star:hover ~ .star {
  color: var(--border);
}

.comments {
  max-width: 760px;
  margin-top: 40px;
}

.comment {
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--surface);
}

.comment-head {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.9rem;
}

.comment p {
  margin: 6px 0 0;
  white-space: pre-line;
}

/* ---- Yönetim ---- */

.panel {
  padding: 20px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  background: var(--surface);
}

.panel h2 {
  margin-top: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

/* ---- Telefon ekranları ---- */

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