/* =============================================
   MOODY — Dark Neon Green Theme
   Palette: #1A1C1B #2A2E2E #555D58 #95FF77 #59FF00
   ============================================= */

:root {
  --bg-primary: #1A1C1B;
  --bg-secondary: #141615;
  --bg-card: #2A2E2E;
  --bg-card-hover: #333838;
  --bg-input: #222525;
  --accent: #59FF00;
  --accent-glow: rgba(89, 255, 0, 0.2);
  --accent-purple: #95FF77;
  --accent-pink: #95FF77;
  --text-primary: #e8eae8;
  --text-muted: #555D58;
  --border: #3a3f3c;
  --danger: #ff4d4d;
  --success: #59FF00;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- NAVBAR ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 28, 27, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Orbitron', sans-serif;
}

.logo-icon {
  font-size: 1.6rem;
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.logo-text {
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: 2px;
  color: var(--accent);
}

.logo-sub {
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--text-muted);
  align-self: flex-end;
  margin-bottom: 2px;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
  transform: translateX(-50%);
  box-shadow: 0 0 8px var(--accent-glow);
}

.nav-link:hover::after { width: 60%; }

.nav-admin { color: var(--accent); }
.nav-logout { color: var(--danger); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 70px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(89, 255, 0, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(149, 255, 119, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 0%, rgba(89, 255, 0, 0.04) 0%, transparent 60%);
  animation: heroPulse 8s ease-in-out infinite alternate;
}

@keyframes heroPulse {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: 4px;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.glow-text {
  color: var(--accent);
  text-shadow:
    0 0 20px var(--accent-glow),
    0 0 60px rgba(89, 255, 0, 0.15);
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-muted);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: #6fff2a;
  box-shadow: 0 0 30px rgba(89, 255, 0, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: rgba(89, 255, 0, 0.08);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-toggle {
  background: rgba(149, 255, 119, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(149, 255, 119, 0.3);
}

.btn-toggle:hover {
  background: rgba(149, 255, 119, 0.25);
}

/* ---- SECTIONS ---- */
.section {
  padding: 5rem 0;
}

.section-dark {
  background: var(--bg-secondary);
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

.accent { color: var(--accent); }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.section-header .section-title { margin-bottom: 0.5rem; }

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ---- CARDS ---- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.posts-grid-sm {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.post-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(89, 255, 0, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--accent-glow);
}

.card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-secondary);
  position: relative;
}

.card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-category {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(89, 255, 0, 0.1);
  color: var(--accent);
  border: 1px solid rgba(89, 255, 0, 0.2);
  margin-bottom: 0.75rem;
  width: fit-content;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card-excerpt {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-date {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 0.75rem;
}

/* Featured Grid */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
}

.featured-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 280px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow);
  border-color: rgba(0, 229, 255, 0.3);
}

.featured-main {
  grid-column: 1 / -1;
  min-height: 400px;
}

.featured-card .card-image {
  position: absolute;
  inset: 0;
  height: 100%;
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(26, 28, 27, 0.95));
  z-index: 1;
}

.card-overlay .card-title {
  font-size: 1.4rem;
}

/* ---- PAGE HEADER ---- */
.page-header {
  padding: 8rem 0 3rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.page-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ---- POST PAGE ---- */
.post-page { padding-top: 70px; }

.post-hero {
  height: 50vh;
  max-height: 500px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, var(--bg-primary));
}

.post-container {
  max-width: 800px;
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.post-date { color: var(--text-muted); font-size: 0.9rem; }

.post-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 2rem;
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.post-content h2, .post-content h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--accent);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.2rem; }

.post-content p { margin-bottom: 1.25rem; }

.post-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.post-content code {
  background: var(--bg-card);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent-pink);
}

.post-content pre {
  background: var(--bg-card);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(89, 255, 0, 0.03);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
}

.post-content ul, .post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.post-content li { margin-bottom: 0.5rem; }

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- COMMENTS ---- */
.comments-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.comment-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: var(--transition);
}

.comment:hover {
  border-color: rgba(89, 255, 0, 0.15);
}

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

.comment-author { color: var(--accent); font-size: 0.95rem; }
.comment-date { color: var(--text-muted); font-size: 0.8rem; }

.comment-delete {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--danger);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.3rem;
  opacity: 0.5;
  transition: var(--transition);
}

.comment-delete:hover { opacity: 1; }

.comment-body {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.comment.new-comment {
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- FORMS ---- */
.form-row { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea.form-input { resize: vertical; }

select.form-input { cursor: pointer; }

.form-checkboxes {
  display: flex;
  gap: 2rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ---- ADMIN ---- */
.admin-section { padding-top: 100px; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

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

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

.stat-card:hover {
  border-color: rgba(89, 255, 0, 0.2);
  box-shadow: 0 0 15px var(--accent-glow);
}

.stat-number {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.25rem;
}

.table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.admin-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.status-badge {
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-published { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.status-draft { background: rgba(149, 255, 119, 0.15); color: var(--accent-purple); }

.actions-cell {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

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

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ---- EDITOR TOOLBAR ---- */
.editor-toolbar {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.toolbar-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}

.toolbar-btn:hover {
  background: var(--bg-card);
  color: var(--accent);
  border-color: var(--border);
}

.editor-textarea {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  tab-size: 2;
}

/* ---- FOOTER ---- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-desc {
  color: var(--text-muted);
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links h4 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.footer-links a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.3rem 0;
  transition: var(--transition);
}

.footer-links a:hover { color: var(--text-primary); }

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---- PLACEHOLDER SVG ---- */
.card-image:empty::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---- REVEAL ON SCROLL ---- */
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- MOUSE GLOW ---- */
.mouse-glow {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(89, 255, 0, 0.08) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
  opacity: 0;
  z-index: 0;
}

/* ---- PARTICLES ---- */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  bottom: -10px;
  display: block;
  background: var(--accent);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% { opacity: var(--particle-opacity, 0.3); }
  90% { opacity: var(--particle-opacity, 0.3); }
  100% {
    transform: translateY(-100vh) translateX(30px);
    opacity: 0;
  }
}

/* ---- DYNAMIC ANIMATIONS ---- */

/* Animated neon border on hover */
.post-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, var(--accent) 50%, transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.post-card { position: relative; }
.post-card:hover::before { opacity: 1; }

/* Floating hero title animation */
.hero-title {
  animation: floatTitle 6s ease-in-out infinite;
}

@keyframes floatTitle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Glowing pulse on accent elements */
.glow-text {
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    text-shadow: 0 0 20px var(--accent-glow), 0 0 60px rgba(89, 255, 0, 0.15);
  }
  50% {
    text-shadow: 0 0 30px rgba(89, 255, 0, 0.5), 0 0 80px rgba(89, 255, 0, 0.3), 0 0 120px rgba(89, 255, 0, 0.1);
  }
}

/* Card image zoom on hover */
.post-card .card-image,
.featured-card .card-image {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .card-image,
.featured-card:hover .card-image {
  transform: scale(1.08);
}

.post-card, .featured-card { overflow: hidden; }

/* Animated gradient line under section titles */
.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #95FF77);
  border-radius: 2px;
  animation: lineGrow 1.5s ease-out forwards;
}

@keyframes lineGrow {
  from { width: 0; }
  to { width: 60px; }
}

/* Category badge shimmer */
.card-category {
  position: relative;
  overflow: hidden;
}

.card-category::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(89, 255, 0, 0.15), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* Stat cards count-up feel */
.stat-number {
  animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes popIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Button hover glow pulse */
.btn-primary:hover {
  animation: btnGlow 1s ease-in-out infinite alternate;
}

@keyframes btnGlow {
  from { box-shadow: 0 0 20px rgba(89, 255, 0, 0.3); }
  to { box-shadow: 0 0 35px rgba(89, 255, 0, 0.5), 0 0 60px rgba(89, 255, 0, 0.15); }
}

/* Smooth page load fade-in */
body {
  animation: pageLoad 0.6s ease-out;
}

@keyframes pageLoad {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Logo icon spin on hover */
.logo:hover .logo-icon {
  animation: logoSpin 0.6s ease;
}

@keyframes logoSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(26, 28, 27, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }

  .nav-toggle { display: flex; }

  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { font-size: 0.95rem; letter-spacing: 2px; }

  .featured-grid { grid-template-columns: 1fr; }
  .featured-main { min-height: 280px; }

  .posts-grid { grid-template-columns: 1fr; }

  .section-header { flex-direction: column; gap: 1rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }

  .post-title { font-size: 1.8rem; }

  .admin-table { font-size: 0.8rem; }
  .actions-cell { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero { min-height: 70vh; }
  .hero-title { font-size: 2rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
