/* ==========================================
   투표박스 (VoteBox) - Global Styles
   ========================================== */

/* ==========================================
   ⚠️  광고 임시 비활성화 (AdSense 승인 대기 중)
   AdSense 승인 후 아래 두 줄을 삭제하면 광고 영역이 복원됩니다.
   ========================================== */
.ad-slot { display: none !important; }

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --primary-bg: #eef2ff;
  --secondary: #ec4899;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-hover: #f9fafb;
  --border: #e5e7eb;
  --border-focus: #6366f1;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --transition: 0.2s ease;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; }

/* ==========================================
   Layout
   ========================================== */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}

.layout-main { min-width: 0; }
.layout-sidebar { position: sticky; top: 80px; }

/* ==========================================
   Header
   ========================================== */

.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: none;
}

/* ==========================================
   Buttons
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-full { width: 100%; }

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); border-color: var(--primary-light); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 0.4rem 0.6rem;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; color: white; }

.btn-like {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  gap: 0.3rem;
}
.btn-like:hover { border-color: var(--secondary); color: var(--secondary); background: #fdf2f8; }
.btn-like.liked { border-color: var(--secondary); color: var(--secondary); background: #fdf2f8; }
.btn-like.liked .like-icon { animation: heartPop 0.3s ease; }

@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* ==========================================
   Cards
   ========================================== */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-light); }

.card-body { padding: 1.25rem; }
.card-footer { padding: 0.875rem 1.25rem; border-top: 1px solid var(--border); background: var(--surface-hover); }

/* ==========================================
   Post Cards (List)
   ========================================== */

.post-card {
  cursor: pointer;
  display: block;
  color: inherit;
  text-decoration: none;
}

.post-card:hover { color: inherit; }

.post-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-content {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.875rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.post-card-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.875rem;
}

.option-badge {
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.meta-item svg { width: 14px; height: 14px; opacity: 0.7; }

/* ==========================================
   Forms
   ========================================== */

.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.form-label span { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 0.3rem;
  display: none;
}

.form-error.visible { display: block; }

/* Options inputs */
.options-list { display: flex; flex-direction: column; gap: 0.5rem; }

.option-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.option-num {
  width: 24px;
  height: 24px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.btn-remove-option {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
  padding: 0;
}
.btn-remove-option:hover { background: #fef2f2; color: var(--danger); }
.btn-remove-option:disabled { opacity: 0.3; cursor: not-allowed; }

/* ==========================================
   Modal
   ========================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover { background: var(--border); color: var(--text); }

.modal-body { padding: 1.5rem; }

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ==========================================
   Vote Area (Detail Page)
   ========================================== */

.vote-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.vote-section-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vote-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.vote-total {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.vote-options { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }

.vote-option-btn {
  width: 100%;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.vote-option-btn:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
  transform: translateX(2px);
}

.vote-option-btn.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary-dark);
}

.vote-option-circle {
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
}

.vote-option-btn:hover .vote-option-circle,
.vote-option-btn.selected .vote-option-circle {
  opacity: 1;
}

.vote-option-btn.selected .vote-option-circle::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
}

/* Vote Results */
.vote-result-item {
  position: relative;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}

.vote-result-item.winner {
  border-color: var(--primary-light);
}

.vote-result-item.my-vote {
  border-color: var(--primary);
}

.vote-result-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--primary-bg);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.vote-result-item.winner .vote-result-bar {
  background: linear-gradient(90deg, #eef2ff, #e0e7ff);
}

.vote-result-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.vote-result-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.vote-my-badge {
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
}

.vote-result-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.vote-percent {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-dark);
  min-width: 44px;
  text-align: right;
}

.vote-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 40px;
  text-align: right;
}

/* ==========================================
   Post Detail
   ========================================== */

.post-detail-header {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-detail-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.post-detail-content {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-detail-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.post-detail-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ==========================================
   Comments
   ========================================== */

.comments-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.comments-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.comments-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.comment-count-badge {
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.comment-sort {
  display: flex;
  gap: 0.4rem;
}

.sort-btn {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.sort-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }

.comment-write-area {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-hover);
}

.comment-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.comment-list { padding: 0.5rem 0; }

.comment-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.comment-item:last-child { border-bottom: none; }
.comment-item:hover { background: var(--surface-hover); }

.comment-item.reply {
  padding-left: 3rem;
  background: var(--bg);
  border-left: 3px solid var(--primary-light);
  margin-left: 1.5rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.comment-author {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.comment-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.comment-body {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
  margin-bottom: 0.5rem;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reply-area {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-top: 0.5rem;
  border: 1px solid var(--border);
}

.reply-area .comment-input-row { gap: 0.4rem; }

.deleted-comment {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================================
   Ad Slots
   ========================================== */

.ad-slot {
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  position: relative;
  overflow: hidden;
}

.ad-slot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(0,0,0,0.01) 10px,
    rgba(0,0,0,0.01) 20px
  );
}

.ad-slot-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.ad-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.ad-size { font-size: 0.75rem; }

/* Top Banner */
.ad-top-banner {
  width: 100%;
  height: 90px;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .ad-top-banner { height: 60px; }
}

/* In-feed Ad */
.ad-infeed {
  width: 100%;
  height: 100px;
  margin: 0.25rem 0;
}

/* Sidebar Ad */
.ad-sidebar {
  width: 100%;
  height: 250px;
  margin-bottom: 1rem;
}

/* Detail Bottom Ad */
.ad-detail-bottom {
  width: 100%;
  height: 120px;
  margin-bottom: 1.5rem;
}

/* ==========================================
   Section Titles
   ========================================== */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================
   Badges & Tags
   ========================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
}

.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-gray { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); }

/* ==========================================
   Alert / Notice
   ========================================== */

.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ==========================================
   Empty State
   ========================================== */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.empty-state-desc { font-size: 0.875rem; }

/* ==========================================
   Spinner / Loading
   ========================================== */

.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================
   Toast Notifications
   ========================================== */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--text);
  color: white;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  max-width: 300px;
  box-shadow: var(--shadow-lg);
  animation: toastSlide 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast.success { background: #065f46; }
.toast.error { background: #991b1b; }
.toast.info { background: var(--primary-dark); }

@keyframes toastSlide {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================
   Back Button / Breadcrumb
   ========================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--primary); }
.breadcrumb-sep { color: var(--text-muted); }

/* ==========================================
   Footer
   ========================================== */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-text { font-size: 0.82rem; color: var(--text-muted); }

/* ==========================================
   Admin Styles
   ========================================== */

.admin-header {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: white;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
}

.admin-header .logo { color: white; }

.admin-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.admin-nav-btn {
  padding: 0.4rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.admin-nav-btn:hover, .admin-nav-btn.active { background: rgba(255,255,255,0.2); color: white; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  text-align: center;
}

.stat-number { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.2rem; }

.admin-table-wrap {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--surface-hover);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--surface-hover); }

.admin-table .deleted td { opacity: 0.4; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  padding: 1rem;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
}

.login-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.login-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* ==========================================
   Share Button
   ========================================== */

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.share-btn:hover { border-color: var(--primary-light); color: var(--primary); background: var(--primary-bg); }

/* ==========================================
   Pagination
   ========================================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
}

.page-btn {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==========================================
   Highlight / Misc
   ========================================== */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-700 { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ==========================================
   Responsive
   ========================================== */

@media (min-width: 900px) {
  .header-tagline { display: block; }
}

@media (max-width: 899px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .layout-sidebar { position: static; }
}

@media (max-width: 640px) {
  .container { padding: 0 0.75rem; }
  .modal-body { padding: 1rem; }
  .modal-header { padding: 1rem; }
  .modal-footer { padding: 0.875rem 1rem; }
  .post-detail-title { font-size: 1.25rem; }
  .comment-item.reply { padding-left: 1.5rem; margin-left: 0.75rem; }
  .vote-count { display: none; }
  .admin-table { font-size: 0.8rem; }
  .admin-table th, .admin-table td { padding: 0.6rem 0.75rem; }
}

@media (max-width: 400px) {
  .post-detail-actions { gap: 0.5rem; }
  .btn { font-size: 0.82rem; padding: 0.4rem 0.75rem; }
}
