* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #fff0f5, #ffe4ec);
  color: #333;
}

header {
  background: #ffb6d9;
  padding: 20px;
  text-align: center;
  border-radius: 12px;
  color: white;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
}

.filters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  font-size: 16px;
}

#kidneyStage {
  border: 2px solid #ffb6d9;
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 15px;
  outline: none;
}

.stage-guide {
  margin: 0 auto 14px auto;
  max-width: 700px;
  font-size: 15px;
  font-weight: normal;
  line-height: 1.4;
}

#search {
  width: 100%;
  max-width: 500px;
  height: 50px;
  font-size: 18px;
  padding: 10px 20px;
  border-radius: 25px;
  border: 2px solid #ffb6d9;
  outline: none;
  display: block;
  margin: 0 auto 20px auto;
}

#list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  color: inherit;
  text-decoration: none;
}

.card:hover {
  transform: translateY(-5px);
}

.empty-text {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

button {
  background: #ff69b4;
  border: none;
  padding: 12px 25px;
  border-radius: 20px;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background: #ff4fa3;
}

.stage-badge-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.stage-badge {
  background: #ffe1ef;
  color: #8a2f5b;
  border: 1px solid #ffb6d9;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
}

.stage-badge-warning {
  background: #fff4e5;
  border-color: #ffd59e;
  color: #8a5a20;
}

.top-nav {
  display: flex;
  gap: 12px;
  margin: 12px 0 16px;
}

.top-nav-corner {
  justify-content: flex-end;
  margin: 0 0 8px;
}

.top-nav-split {
  justify-content: space-between;
  align-items: center;
}

.top-nav a {
  background: white;
  color: #8a2f5b;
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
}

.top-nav a[aria-current="page"] {
  background: #8a2f5b;
  color: white;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.admin-stat {
  text-align: center;
}

.admin-number {
  font-size: 42px;
  font-weight: 700;
  color: #8a2f5b;
  margin: 8px 0 0;
}

.admin-subtext {
  color: #666;
  margin-top: 0;
}

.popular-item {
  border-top: 1px solid #f0d0df;
  padding: 10px 0;
}

.popular-item a {
  color: #8a2f5b;
  text-decoration: none;
  font-weight: 600;
}

#recipe {
  max-width: 980px;
  margin: 0 auto;
}

.recipe-detail-card {
  border: 1px solid #f4d6e5;
  box-shadow: 0 18px 40px rgba(168, 65, 121, 0.12);
}

.recipe-hero h2 {
  margin: 0;
  font-size: 34px;
  color: #70284a;
}

.recipe-desc {
  margin-top: 10px;
  color: #5b4a53;
}

.recipe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.recipe-section {
  background: #fff7fb;
  border: 1px solid #f7dfea;
  border-radius: 14px;
  padding: 14px;
}

.clean-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

.note-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff4d9;
  border: 1px solid #ffe0a1;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.nutrition-pill {
  background: white;
  border: 1px solid #f2d9e6;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
}

.modern-comment {
  margin-top: 18px;
}

.comment-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.comment-layout input,
.comment-layout textarea,
.comment-layout select {
  border: 1px solid #e6c8d7;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
}

#commentsList {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.comment-card {
  border-left: 4px solid #ff9fcd;
}

@media (max-width: 800px) {
  .recipe-hero h2 { font-size: 28px; }
  .recipe-grid { grid-template-columns: 1fr; }
  .top-nav-split { justify-content: center; flex-wrap: wrap; }
  .top-nav-corner { justify-content: center; }
}



.admin-login-card {
  max-width: 460px;
  margin: 0 auto 18px;
}

.login-error {
  color: #b4234d;
  font-size: 14px;
  min-height: 20px;
}
