/* ============================================================
   Devlogly - Futuristic Theme Stylesheet
   Colors from logo: Deep Navy #091d3c, Cyan #0bd0e5, Blue #0b92ff
   ============================================================ */

:root {
  --navy-900: #091d3c;
  --navy-800: #0a2348;
  --navy-700: #0d2d54;
  --navy-600: #03447a;
  --navy-500: #044a85;
  --cyan-400: #0bd0e5;
  --cyan-300: #3ce0f2;
  --cyan-200: #b0edff;
  --cyan-100: #d6ffff;
  --blue-500: #0b92ff;
  --blue-400: #3da8ff;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --shadow-sm: 0 1px 2px rgba(9,29,60,0.05);
  --shadow-md: 0 4px 12px rgba(9,29,60,0.08);
  --shadow-lg: 0 8px 30px rgba(9,29,60,0.12);
  --shadow-glow: 0 0 20px rgba(11,208,229,0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--white);
  color: var(--navy-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--navy-600);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--cyan-400);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === HEADER === */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-link {
  display: block;
  padding: 0.75rem 0;
}

.hero-logo {
  height: 140px;
  width: auto;
  max-width: 520px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: center;
  padding-bottom: 0.5rem;
}

.nav-links li a {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy-700);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-links li a:hover {
  background: var(--cyan-100);
  color: var(--navy-900);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy-900);
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--navy-900);
  left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* === AD BANNER === */
.ad-banner {
  background: var(--gray-50);
  text-align: center;
  padding: 0.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.ad-container {
  display: inline-block;
}

.ad-inline {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1rem 0;
}

.ad-sidebar {
  margin-bottom: 1.5rem;
  text-align: center;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* === HERO === */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 50%, var(--navy-600) 100%);
  color: var(--white);
  padding: 3rem 1rem 2.5rem;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(11,208,229,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-title .accent {
  background: linear-gradient(135deg, var(--cyan-400), var(--blue-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--cyan-200);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.hero-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.category-pill {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(11,208,229,0.3);
  color: var(--cyan-200);
  transition: all var(--transition);
}

.category-pill:hover {
  background: rgba(11,208,229,0.15);
  color: var(--white);
  border-color: var(--cyan-400);
}

.category-pill.more {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
}

.category-pill.more:hover {
  border-color: var(--cyan-400);
  color: var(--white);
}

/* === CATEGORY HERO === */
.category-hero {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--white);
  padding: 2.5rem 1rem;
  text-align: center;
}

.category-hero-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.category-hero-desc {
  color: var(--cyan-200);
  font-size: 1.1rem;
}

/* === MAIN LAYOUT === */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

/* === ARTICLES GRID === */
.articles-column {
  min-width: 0;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* === ARTICLE CARD === */
.article-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--cyan-400);
}

.article-card-link {
  color: inherit;
}

.article-card-image {
  position: relative;
  width: 100%;
  padding-top: 75%;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  overflow: hidden;
}

.article-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-card-image img {
  transform: scale(1.05);
}

.category-badge {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  background: rgba(9,29,60,0.85);
  color: var(--cyan-400);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(11,208,229,0.3);
}

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

.article-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--navy-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-link:hover .article-card-title {
  color: var(--navy-600);
}

.article-card-excerpt {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.article-card-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-bottom: 0.75rem;
}

.article-card-meta .author {
  color: var(--navy-600);
  font-weight: 500;
}

/* === SHARE BUTTONS === */
.share-buttons {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--gray-200);
  color: var(--gray-500);
  background: var(--white);
  cursor: pointer;
  transition: all var(--transition);
}

.share-btn:hover {
  border-color: var(--cyan-400);
  color: var(--cyan-400);
  box-shadow: 0 0 8px rgba(11,208,229,0.2);
}

.share-twitter:hover { color: #1da1f2; border-color: #1da1f2; }
.share-linkedin:hover { color: #0077b5; border-color: #0077b5; }
.share-reddit:hover { color: #ff4500; border-color: #ff4500; }
.share-whatsapp:hover { color: #25d366; border-color: #25d366; }
.share-pinterest:hover { color: #e60023; border-color: #e60023; }
.share-instagram:hover { color: #e4405f; border-color: #e4405f; }

.share-copy {
  background: none;
}

.share-copy:active {
  background: var(--cyan-100);
}

/* === LOAD MORE === */
.load-more-container {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 0;
}

.load-more-btn {
  padding: 0.75rem 2.5rem;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
  color: var(--white);
  border: 1px solid var(--cyan-400);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.load-more-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(11,208,229,0.2), transparent);
  transition: left 0.5s ease;
}

.load-more-btn:hover::before {
  left: 100%;
}

.load-more-btn:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.load-more-spinner {
  display: none;
}

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: block;
}

.htmx-request .load-more-btn {
  display: none;
}

/* === SIDEBAR === */
.sidebar {
  position: sticky;
  top: 140px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan-400) var(--gray-100);
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: var(--gray-100);
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--cyan-400);
  border-radius: 4px;
}

.sidebar-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.sidebar-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--cyan-400);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.glow-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--cyan-400);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan-400);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 4px var(--cyan-400); }
  50% { box-shadow: 0 0 12px var(--cyan-400), 0 0 20px rgba(11,208,229,0.3); }
}

/* Latest Articles */
.latest-articles {
  list-style: none;
}

.latest-articles li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.latest-articles li:last-child {
  border-bottom: none;
}

.latest-articles a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.latest-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.latest-articles a:hover .latest-title {
  color: var(--navy-600);
}

.latest-date {
  font-size: 0.7rem;
  color: var(--gray-400);
}

/* Rankings */
.ranking-list {
  list-style: none;
  counter-reset: ranking;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--gray-50);
  font-size: 0.8rem;
}

.ranking-item:last-child {
  border-bottom: none;
}

.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
  color: var(--cyan-400);
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ranking-item:nth-child(1) .rank { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.ranking-item:nth-child(2) .rank { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.ranking-item:nth-child(3) .rank { background: linear-gradient(135deg, #d97706, #b45309); color: #fff; }

.rank-name {
  font-weight: 600;
  color: var(--navy-900);
  flex-shrink: 0;
}

.rank-desc {
  color: var(--gray-400);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === ARTICLE PAGE === */
.article-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.article-page-inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

.article-main {
  min-width: 0;
}

.article-breadcrumb {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.article-breadcrumb a {
  color: var(--navy-600);
}

.article-breadcrumb a:hover {
  color: var(--cyan-400);
}

.article-page-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--navy-900);
  margin-bottom: 1rem;
}

.article-page-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.article-page-meta .author {
  color: var(--navy-600);
  font-weight: 600;
}

.article-page-meta .separator {
  color: var(--gray-300);
}

.article-share-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.share-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-500);
}

.article-share-bar .share-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.article-page-image {
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.article-page-image img {
  width: 100%;
  border-radius: var(--radius);
}

.article-page-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--navy-900);
}

.article-page-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--navy-900);
  padding-left: 0.75rem;
  border-left: 3px solid var(--cyan-400);
}

.article-page-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--navy-800);
}

.article-page-content p {
  margin-bottom: 1rem;
}

.article-page-content code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--gray-100);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--navy-600);
}

.article-page-content pre {
  background: var(--navy-900);
  color: var(--cyan-200);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: 1rem;
  border: 1px solid var(--navy-600);
}

.article-page-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.article-page-content ul, .article-page-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

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

.article-page-content blockquote {
  border-left: 3px solid var(--cyan-400);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: var(--cyan-100);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--navy-700);
}

/* === FOOTER === */
.footer {
  background: var(--navy-900);
  color: var(--gray-300);
  padding: 3rem 1rem 1.5rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
}

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

.footer-col h3 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-col p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--gray-400);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.4rem;
}

.footer-col ul li a {
  color: var(--gray-400);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--cyan-400);
}

.social-footer {
  display: flex;
  gap: 0.75rem;
}

.social-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(11,208,229,0.1);
  color: var(--cyan-200);
  border: 1px solid rgba(11,208,229,0.2);
  transition: all var(--transition);
}

.social-footer a:hover {
  background: rgba(11,208,229,0.2);
  color: var(--cyan-400);
  border-color: var(--cyan-400);
  box-shadow: 0 0 12px rgba(11,208,229,0.3);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.admin-btn {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(11,208,229,0.1);
  color: var(--cyan-400);
  border: 1px solid rgba(11,208,229,0.3);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.admin-btn:hover {
  background: rgba(11,208,229,0.2);
  border-color: var(--cyan-400);
  box-shadow: 0 0 12px rgba(11,208,229,0.3);
  color: var(--cyan-400);
}

/* === ADMIN PAGE === */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 0.3rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--navy-900);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--cyan-400);
  box-shadow: 0 0 0 3px rgba(11,208,229,0.15);
}

.editor-toolbar {
  display: flex;
  gap: 0.25rem;
  padding: 0.4rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  flex-wrap: wrap;
}

.editor-toolbar button {
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  background: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--navy-700);
  transition: all var(--transition);
}

.editor-toolbar button:hover {
  background: var(--cyan-100);
  border-color: var(--cyan-400);
  color: var(--navy-900);
}

.editor-content {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  min-height: 300px;
  resize: vertical;
}

.preview-pane {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1rem;
  min-height: 100px;
  background: var(--gray-50);
  line-height: 1.6;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-primary {
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
  color: var(--white);
  border: 1px solid var(--cyan-400);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  padding: 0.6rem 1.5rem;
  background: var(--white);
  color: var(--navy-700);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  border-color: var(--cyan-400);
  color: var(--navy-900);
}

.btn-sm {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--gray-300);
  color: var(--navy-600);
  background: var(--white);
  text-decoration: none;
  transition: all var(--transition);
}

.btn-sm:hover {
  border-color: var(--cyan-400);
  color: var(--navy-900);
}

.btn-danger {
  border-color: #fca5a5;
  color: #dc2626;
  background: none;
}

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

.article-manage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  gap: 1rem;
}

.article-manage-info {
  flex: 1;
  min-width: 0;
}

.article-manage-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 0.25rem;
}

.article-manage-info .badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  background: var(--cyan-100);
  color: var(--navy-600);
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-right: 0.5rem;
}

.article-manage-info .date {
  font-size: 0.75rem;
  color: var(--gray-400);
}

.article-manage-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.upload-zone {
  background: var(--gray-50);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.upload-zone h3 {
  color: var(--navy-900);
  margin-bottom: 1rem;
}

.uploaded-images {
  margin-top: 2rem;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .content-layout,
  .article-page-inner {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .hero-logo {
    height: 100px;
    max-width: 360px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 0.5rem 0;
    gap: 0;
  }

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

  .nav-links li a {
    display: block;
    padding: 0.6rem 1rem;
    border-radius: 0;
    border-bottom: 1px solid var(--gray-100);
  }

  .mobile-menu-btn {
    display: block;
    position: absolute;
    right: 1rem;
    top: 1rem;
  }

  .nav-container {
    position: relative;
  }

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

  .hero {
    padding: 2rem 1rem 1.5rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

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

  .article-page-title {
    font-size: 1.35rem;
  }

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

  .ad-banner {
    display: none;
  }

  .article-share-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-logo {
    height: 80px;
    max-width: 300px;
  }

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

  .article-card-title {
    font-size: 0.9rem;
  }

  .category-pill {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }
}

/* === LOGIN PAGE === */
.login-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.login-card h1 {
  text-align: center;
  color: var(--navy-900);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.login-card p.subtitle {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* === AD MANAGEMENT === */
.ad-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: var(--white);
}

.ad-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.ad-item-name {
  font-weight: 700;
  color: var(--navy-900);
  font-size: 0.95rem;
}

.ad-item-position {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--cyan-100);
  color: var(--navy-600);
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.ad-item-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.ad-item-status.active {
  background: #dcfce7;
  color: #16a34a;
}

.ad-item-status.inactive {
  background: var(--gray-100);
  color: var(--gray-500);
}

.ad-code-preview {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--gray-600);
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0.5rem;
}

.ad-item-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* === UTILITY / ANIMATION === */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.article-card {
  animation: fade-in 0.4s ease forwards;
}

.article-card:nth-child(2) { animation-delay: 0.05s; }
.article-card:nth-child(3) { animation-delay: 0.1s; }
.article-card:nth-child(4) { animation-delay: 0.15s; }

/* Scrollbar for whole page */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--navy-700);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cyan-400);
}

/* Selection */
::selection {
  background: rgba(11,208,229,0.2);
  color: var(--navy-900);
}
