:root {
  --bg: #14100e;
  --surface: #1f1a17;
  --border: #3a322c;
  --text: #f2eee8;
  --text-muted: #b3a99e;
  --accent: #d94f2b;
  --accent-dark: #a13a1e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

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

.logo { font-size: 22px; font-weight: 700; color: var(--accent); letter-spacing: -0.5px; }
.logo span { color: var(--text); }

nav { display: flex; gap: 8px; flex-wrap: wrap; }
nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
}
nav a:hover, nav a.active { background: var(--accent); color: white; }

.search-bar {
  display: flex;
  gap: 8px;
  max-width: 1100px;
  margin: 20px auto 0;
  padding: 0 24px;
}
.search-bar input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
}
.search-bar button {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
}
.search-bar button:hover { background: var(--accent-dark); }

main { max-width: 1100px; margin: 0 auto; padding: 24px; }

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

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: transform 0.15s, border-color 0.15s;
}
.news-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.news-card img { width: 100%; height: 160px; object-fit: cover; display: block; background: #2a2420; }
.news-card .body { padding: 14px; }
.news-card .cat-tag {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
}
.news-card h3 { font-size: 16px; margin: 6px 0; }
.news-card p { font-size: 13px; color: var(--text-muted); }

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

/* Yangilik sahifasi */
.article-header { margin-bottom: 20px; }
.article-header h1 { font-size: 28px; margin-bottom: 8px; }
.article-meta { color: var(--text-muted); font-size: 14px; }
.article-image { width: 100%; border-radius: 12px; margin: 20px 0; }
.article-video { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; margin: 20px 0; }
.article-video iframe { width: 100%; height: 100%; border: 0; }
.article-content { font-size: 17px; }

/* Muallif bloki */
.author-block {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.author-block img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a2420;
}
.author-label { font-size: 12px; color: var(--text-muted); }
.author-name { font-size: 15px; font-weight: 600; }

/* Teglar */
.tags-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.tag-chip {
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Layk/Dizlayk */
.reaction-row { display: flex; gap: 12px; margin-top: 20px; }
.reaction-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
}
.reaction-btn:hover:not(:disabled) { border-color: var(--accent); }
.reaction-btn.reacted-disabled { opacity: 0.6; cursor: default; }
.reaction-btn:disabled { cursor: default; }

/* Mavzuga doir yangiliklar */
.related-section { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.related-section h2 { font-size: 20px; margin-bottom: 4px; }

/* Admin panel */
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 32px 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}
.btn:hover { background: var(--accent-dark); }
.btn-danger { background: #7a2320; }
.btn-secondary { background: var(--border); }
.row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.row-item:last-child { border-bottom: none; }
.error-msg { color: #ff8a75; font-size: 14px; margin-top: 8px; }
.success-msg { color: #7ed6a5; font-size: 14px; margin-top: 8px; }
