:root {
  --bg: #f6f8fa;
  --card: #fff;
  --text: #0f172a;
  --muted: #5b6b78;
  --accent: #0066ff;
  --accent-2: #ff6b6b;
  --radius: 12px;
}

/* Temel yapı */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

/* Üst Bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  gap: 8px;
}
.brand { font-weight: 800; }
.controls { display: flex; gap: 8px; align-items: center; }
.selectwrap select,
.flow-switch select {
  padding: 6px;
  border-radius: 8px;
  border: none;
}

/* Ana düzen */
.container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  max-width: 1200px;
  margin: 18px auto;
  padding: 0 12px;
}
.card {
  background: var(--card);
  padding: 12px;
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(12, 20, 35, 0.08);
  transition: background 0.3s, color 0.3s;
}
.leftpanel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.row input,
.row select,
.newpost input,
.newpost textarea {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #e6eef8;
  background: #fff;
  color: #111;
}
.row button {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}
.row button:hover { opacity: 0.85; }
.row .muted {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--muted);
}

/* Akış (feed) */
.feed { padding: 6px; }
.tagbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.tagbar button {
  border: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: 0.2s;
}
.tagbar button:hover {
  background: rgba(0, 0, 0, 0.04);
}
.tagbar button.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
}
.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
}
.searchwrap input {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #e6eef8;
  width: 260px;
}
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  padding: 12px;
}
.post {
  padding: 12px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 8px 30px rgba(11, 20, 30, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.03);
}
.post h3 { margin: 0 0 8px; font-size: 16px; }
.meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.actions button {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
  cursor: pointer;
  transition: 0.2s;
}
.actions button:hover {
  background: rgba(0, 0, 0, 0.05);
}
.comments {
  margin-top: 10px;
  border-top: 1px dashed rgba(0, 0, 0, 0.06);
  padding-top: 8px;
}
.comment {
  padding: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
  margin-top: 8px;
}
.comment .who { font-weight: 700; font-size: 13px; }
.footer {
  text-align: center;
  padding: 12px;
  margin: 18px auto;
  max-width: 1200px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.5);
  padding: 12px;
}
.hidden { display: none; }
.modal-card { width: 100%; max-width: 520px; }

/* 🌙 Koyu Tema */
body.dark {
  --bg: #0b0f18;
  --card: #161b25;
  --text: #e6eef8;
  --muted: rgba(230, 238, 248, 0.6);
  --accent: #00bfff;
  --accent-2: #ff6b6b;
}
body.dark .topbar {
  background: linear-gradient(90deg, #007acc, #ff5f5f);
}
body.dark input,
body.dark textarea,
body.dark select {
  background: #1e2533;
  color: #fff;
  border: 1px solid #333;
}
body.dark .card {
  background: #161b25;
  color: #e6eef8;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
body.dark a { color: #9dc1ff; }
body.dark .tagbar button {
  border: 1px solid rgba(255,255,255,0.1);
  color: #eee;
}
body.dark .tagbar button:hover {
  background: rgba(255,255,255,0.08);
}

/* 🎨 Renkli Tema */
body.colorful {
  --bg: #fff8fb;
  --card: #fff;
  --text: #10202b;
  --muted: #6b6b6b;
  --accent: #ff4081;
  --accent-2: #6be4ff;
}

/* 📰 Gündem Modülü */
#gundemBox, #gundemFull {
  background: var(--card);
  color: var(--text);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin: 10px 0;
}
#gundemBox ul, #gundemFull ul {
  list-style: none;
  padding: 0;
}
#gundemBox li, #gundemFull li { margin-bottom: 8px; }
#gundemBox a, #gundemFull a {
  text-decoration: none;
  color: var(--accent);
}
#gundemBox a:hover, #gundemFull a:hover { text-decoration: underline; }
.see-more {
  display: inline-block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: bold;
}

/* 📱 Responsive */
@media (max-width: 900px) {
  .container { grid-template-columns: 1fr; padding: 0 12px; }
  .leftpanel { order: 2; }
  .feed { order: 1; }
}
/* 📰 Gündem sayfası düzeni */
#gundemContainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  padding: 20px;
  box-sizing: border-box;
}

/* 🧩 Haber kartları */
#gundemContainer article {
  flex: 1 1 calc(33.333% - 40px);
  max-width: 350px;
  min-width: 280px;
  box-sizing: border-box;
  background: var(--card, #fff);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Mobilde alt alta gelsin */
@media (max-width: 768px) {
  #gundemContainer article {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

#gundemContainer article:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

/* 📰 Başlık */
#gundemContainer h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--accent, #0078d7);
}

/* ✍️ Özet */
#gundemContainer p {
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 12px;
}

/* 🔗 Kaynak bağlantısı */
#gundemContainer a {
  color: var(--accent, #0078d7);
  text-decoration: none;
  font-weight: 500;
}
#gundemContainer a:hover {
  text-decoration: underline;
}

/* 🌙 Koyu tema uyumu */
body.dark #gundemContainer article {
  background: #222;
  color: #eee;
  box-shadow: 0 2px 8px rgba(255,255,255,0.05);
}
body.dark #gundemContainer a {
  color: #66b3ff;
}
