/* Global Resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #334155;
}

/* Sidebar and Buttons */
.btn {
  display: inline-block;
  padding: 8px 16px;
  font-weight: 500;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: left;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.875rem;
}

.btn-main {
  background-color: #f43f5e;
  color: white;
}

.btn-main:hover {
  background-color: #e11d48;
}

.btn-accent {
  background-color: #d946ef;
  color: white;
}

.btn-accent:hover {
  background-color: #c026d3;
}

.btn-dark {
  background-color: #1e293b;
  color: white;
}

.btn-dark:hover {
  background-color: #0f172a;
}

.btn-neutral {
  background-color: white;
  border-color: #cbd5e1;
  color: #334155;
}

.btn-neutral:hover {
  background-color: #f8fafc;
}

.side-block {
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.side-title h3 {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1e293b;
  border-bottom: 3px solid #f43f5e;
  display: inline-block;
  padding-bottom: 4px;
  margin-bottom: 12px;
}

.categories {
  list-style: none;
  padding: 0;
  margin: 0;
}

.categories li a {
  display: flex;
  align-items: center;
  padding: 10px 0;
  color: #475569;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.95rem;
}

.categories li:last-child a {
  border-bottom: none;
}

.categories li a:hover {
  color: #f43f5e;
}

.categories li a i {
  font-size: 1.3rem;
  margin-right: 12px;
  color: #f43f5e;
}

/* Ad Cards exact match snippet */
.post-card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.post-card.super {
  border: 2px solid #fbbf24;
}

.post-card.vip {
  border: 2px solid #ef4444;
}

.post-card-body {
  display: flex;
  width: 100%;
}

.post-card-img {
  width: 35%;
  max-width: 140px;
  min-width: 100px;
  flex-shrink: 0;
  border-right: 1px solid #e2e8f0;
}

@media(min-width: 640px) {
  .post-card-img {
    width: 190px;
  }
}

@media(min-width: 1024px) {
  .post-card-img {
    width: 220px;
  }
}

.post-card-image {
  width: 100%;
  height: 100%;
  background: #f1f5f9;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1;
  min-height: 130px;
}

.post-card-content {
  flex-grow: 1;
  padding: 12px 16px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.post-card-inside {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card-desc h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-desc p {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.post-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #3b82f6;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}

.post-card-likes {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.post-card-time {
  color: #64748b;
  font-size: 0.8rem;
}

.post-card-label {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-bottom-left-radius: 8px;
  z-index: 10;
}

.post-card.super .post-card-label {
  background: #fbbf24;
  color: #1e293b;
}

.post-card.vip .post-card-label {
  background: #ef4444;
  color: white;
}

.post-card-label.badge {
  top: auto;
  bottom: 45px;
  /* sit just above footer */
  right: 16px;
  background: #10b981;
  color: white;
  border-radius: 4px;
  border-bottom-left-radius: 4px;
  padding: 3px 6px;
}

/* Form overrides for post / admin pages */
.form-container {
  max-width: 600px;
  margin: 15px auto;
  background: white;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

@media(min-width: 640px) {
  .form-container {
    padding: 30px;
    margin: 30px auto;
  }
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #444;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.btn-submit {
  width: 100%;
  background: #dc2626;
  color: white;
  padding: 14px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1.1rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: #f1f5f9;
  font-weight: 600;
}

.admin-table img {
  max-width: 100px;
  max-height: 100px;
  border-radius: 4px;
  object-fit: cover;
}