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

body {
  font-family: Arial, sans-serif;
  font-size: 15px;
  background: #f4f4f4;
  color: #222;
}

/* NAV */
.navbar {
  background: #2c3e50;
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.navbar a {
  color: #ecf0f1;
  text-decoration: none;
  font-weight: bold;
}
.navbar a:hover { text-decoration: underline; }
.navbar .nav-right { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.navbar span { color: #bdc3c7; font-size: 13px; }

/* CONTAINER */
.container { max-width: 960px; margin: 30px auto; padding: 0 20px; }

/* CARDS */
.card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 20px;
}

/* BUTTONS */
button, .btn {
  cursor: pointer;
  padding: 8px 18px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  background: #2c3e50;
  color: white;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { background: #3d5166; }
button.secondary { background: #7f8c8d; }
button.secondary:hover { background: #636e72; }
button.danger { background: #c0392b; }
button.danger:hover { background: #a93226; }
button.success { background: #27ae60; }
button.success:hover { background: #219150; }
button:disabled { background: #bdc3c7; cursor: default; }

/* FORMS */
label { display: block; font-weight: bold; margin-bottom: 4px; margin-top: 12px; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}
textarea { resize: vertical; }
.required { color: #c0392b; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 180px; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; }

/* MESSAGES */
.msg { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; }
.msg.error   { background: #fdecea; color: #c0392b; border: 1px solid #e74c3c; }
.msg.success { background: #eafaf1; color: #1e8449; border: 1px solid #27ae60; }
.msg.info    { background: #eaf4fb; color: #1a6ea0; border: 1px solid #3498db; }

/* TABLE */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { background: #2c3e50; color: white; padding: 8px 10px; text-align: left; cursor: pointer; white-space: nowrap; }
th:hover { background: #3d5166; }
td { padding: 7px 10px; border-bottom: 1px solid #eee; vertical-align: top; }
tr:hover td { background: #f8f8f8; }
.sort-indicator { font-size: 10px; margin-left: 4px; }

/* CAROUSEL */
.carousel-wrapper {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 28px;
}
.carousel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.carousel-counter { color: #7f8c8d; font-size: 13px; }
.carousel-nav { display: flex; gap: 10px; align-items: center; }
.show-title { font-size: 22px; font-weight: bold; color: #2c3e50; margin-bottom: 4px; }
.show-author { font-size: 15px; color: #555; margin-bottom: 16px; }
.show-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.badge {
  background: #ecf0f1;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 12px;
  color: #444;
  border: 1px solid #ddd;
}
.badge.category { background: #d6eaf8; border-color: #85c1e9; }
.show-overview { line-height: 1.6; color: #333; margin-bottom: 14px; }
.show-details { font-size: 13px; color: #555; }
.show-details dt { font-weight: bold; margin-top: 8px; }
.show-details dd { margin-left: 16px; }

/* VOTING */
.vote-section {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  padding: 14px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.vote-score { font-size: 20px; font-weight: bold; color: #2c3e50; min-width: 36px; text-align: center; }
.vote-btn {
  font-size: 22px;
  background: none;
  color: #555;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.vote-btn:hover { background: #f0f0f0; }
.vote-btn.active-up   { background: #eafaf1; border-color: #27ae60; color: #27ae60; }
.vote-btn.active-down { background: #fdecea; border-color: #c0392b; color: #c0392b; }

/* NOTES */
.notes-section h4 { margin-bottom: 10px; color: #2c3e50; }
.note-item {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 13px;
}
.note-meta { color: #888; font-size: 12px; margin-bottom: 2px; }

/* FILTER BAR */
.filter-bar {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.filter-bar > div { display: flex; flex-direction: column; gap: 4px; }
.filter-bar label { font-size: 12px; font-weight: bold; margin: 0; }
.filter-bar input, .filter-bar select { width: auto; min-width: 140px; font-size: 13px; }

/* LOGIN */
.login-box {
  max-width: 360px;
  margin: 80px auto;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 32px;
}
.login-box h2 { margin-bottom: 20px; color: #2c3e50; }

/* HERO */
.hero {
  background: #2c3e50;
  color: white;
  padding: 60px 20px;
  text-align: center;
}
.hero h1 { font-size: 36px; margin-bottom: 12px; }
.hero p { font-size: 16px; color: #bdc3c7; margin-bottom: 28px; }
.hero-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-links a {
  background: white;
  color: #2c3e50;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
}
.hero-links a:hover { background: #ecf0f1; }

/* LOADING */
.loading { color: #888; padding: 20px; text-align: center; }

/* ADMIN TABS */
.tabs { display: flex; gap: 0; margin-bottom: 0; }
.tab-btn {
  padding: 10px 22px;
  background: #ecf0f1;
  border: 1px solid #ddd;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  font-size: 14px;
  color: #555;
}
.tab-btn.active { background: white; color: #2c3e50; font-weight: bold; }
.tab-panel {
  background: white;
  border: 1px solid #ddd;
  border-radius: 0 4px 4px 4px;
  padding: 24px;
}
.tab-panel.hidden { display: none; }

/* MISC */
.text-muted { color: #888; font-size: 13px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.flex-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
h2 { color: #2c3e50; margin-bottom: 16px; }
h3 { color: #2c3e50; margin-bottom: 12px; }
