/* ════════════════════════════════════════════════════════════════════
   NOVA — Modern News Website
   ════════════════════════════════════════════════════════════════════ */

/* ─── CSS CUSTOM PROPERTIES ─── */
:root {
  /* Light mode (default) */
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.25);
  --bg-glass-strong: rgba(255, 255, 255, 0.40);
  --text-primary: #1a1a2e;
  --text-secondary: #555577;
  --text-muted: #8888aa;
  --border-glass: rgba(255, 255, 255, 0.10);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.04);
  --shadow-glass-hover: 0 12px 48px rgba(0, 0, 0, 0.07);
  --accent: #3E77B8;
  --accent-hover: #3569a3;
  --accent-glow: rgba(62, 119, 184, 0.20);
  --accent-glass: rgba(62, 119, 184, 0.08);
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --input-bg: rgba(255, 255, 255, 0.4);
  --input-border: rgba(0, 0, 0, 0.05);
  --input-focus: rgba(62, 119, 184, 0.25);
  --card-hover: rgba(0, 0, 0, 0.03);
  --overlay-bg: rgba(0, 0, 0, 0.4);
  --scrollbar-track: rgba(0, 0, 0, 0.05);
  --scrollbar-thumb: rgba(0, 0, 0, 0.15);
  --nova-gradient: linear-gradient(135deg, #3E77B8 0%, #2a5f8a 100%);
  --header-bg: rgba(240, 242, 245, 0.50);
  --nav-bg: rgba(255, 255, 255, 0.25);
  --modal-bg: rgba(85, 85, 85, 0.35);
  --skeleton-from: rgba(0, 0, 0, 0.06);
  --skeleton-to: rgba(0, 0, 0, 0.1);
  --badge-bg: rgba(62, 119, 184, 0.12);
  --badge-text: #3E77B8;
}

[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #303030;
  --bg-glass: rgba(48, 48, 48, 0.25);
  --bg-glass-strong: rgba(48, 48, 48, 0.40);
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0bb;
  --text-muted: #6b6b88;
  --border-glass: rgba(255, 255, 255, 0.04);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.15);
  --shadow-glass-hover: 0 12px 48px rgba(0, 0, 0, 0.25);
  --accent: #3E77B8;
  --accent-hover: #4d8fcc;
  --accent-glow: rgba(62, 119, 184, 0.25);
  --accent-glass: rgba(62, 119, 184, 0.10);
  --input-bg: rgba(255, 255, 255, 0.04);
  --input-border: rgba(255, 255, 255, 0.06);
  --input-focus: rgba(62, 119, 184, 0.2);
  --card-hover: rgba(255, 255, 255, 0.03);
  --overlay-bg: rgba(0, 0, 0, 0.6);
  --scrollbar-track: rgba(255, 255, 255, 0.03);
  --scrollbar-thumb: rgba(255, 255, 255, 0.1);
  --nova-gradient: linear-gradient(135deg, #3E77B8 0%, #2f5f80 100%);
  --header-bg: rgba(26, 26, 26, 0.50);
  --nav-bg: rgba(48, 48, 48, 0.35);
  --modal-bg: rgba(85, 85, 85, 0.45);
  --skeleton-from: rgba(255, 255, 255, 0.04);
  --skeleton-to: rgba(255, 255, 255, 0.08);
  --badge-bg: rgba(62, 119, 184, 0.15);
  --badge-text: #66aadd;
}

/* ─── RESET & BASE ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(62, 119, 184, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(62, 119, 184, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(62, 119, 184, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent); text-decoration: none; transition: opacity 0.3s; }
a:hover { opacity: 0.8; }

img { max-width: 100%; display: block; }
svg { display: block; flex-shrink: 0; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── GLASS UTILITY ─── */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: var(--shadow-glass);
  transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease, transform 0.3s ease;
}

.glass-strong {
  background: var(--bg-glass-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: var(--shadow-glass);
}

/* ─── HEADER ─── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--header-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: background 0.4s ease;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-radius: 10px;
  box-shadow: none;
  border-bottom: 1px solid var(--border-glass);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo-link:hover {
  transform: scale(1.02);
}

.nova-logo {
  filter: drop-shadow(0 2px 8px rgba(62, 119, 184, 0.2));
  transition: transform 0.4s ease;
}

.logo-link:hover .nova-logo {
  animation: logoPulse 1.5s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.05) rotate(-2deg); }
  75% { transform: scale(1.05) rotate(2deg); }
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--nova-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.nav-auth-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-profile {
  position: relative;
}

.profile-trigger {
  display: flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--nova-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
}

.nav-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-glass);
  padding: 3px;
  border-radius: 12px;
  backdrop-filter: blur(12px);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: var(--card-hover);
}

.nav-tab.active {
  background: var(--accent-glass);
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.1), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover::after {
  opacity: 1;
}

.btn-primary {
  background: var(--nova-gradient);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-ghost:hover {
  background: var(--bg-glass-strong);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
  border-radius: 10px;
}

.btn-full {
  width: 100%;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: var(--bg-glass);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--border-glass);
}

.icon-btn:hover {
  background: var(--bg-glass-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glass);
}

.icon-btn:active {
  transform: scale(0.95);
}

/* ─── MAIN CONTENT ─── */
.main-content {
  position: relative;
  z-index: 1;
  padding-top: 92px;
  min-height: 100vh;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ─── TAB CONTENT ─── */
.tab-content {
  display: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.tab-content.active {
  display: block;
  animation: tabSlideIn 0.6s ease forwards;
}

@keyframes tabSlideIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── HERO ─── */
.hero-section {
  padding: 48px 40px;
  margin-bottom: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  background: radial-gradient(circle at 30% 40%, var(--accent-glow) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(62, 119, 184, 0.05) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(2%, 1%) rotate(1deg); }
  100% { transform: translate(-1%, -2%) rotate(-1deg); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--badge-bg);
  color: var(--badge-text);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-title .accent {
  background: var(--nova-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-cta {
  animation: fadeInUp 0.6s ease 0.5s both;
  display: flex;
  justify-content: center;
  gap: 12px;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── SLIDING ANIMATIONS ─── */
.slide-in-left {
  animation: slideInLeft 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.slide-in-right {
  animation: slideInRight 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.slide-in-top {
  animation: slideInTop 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.slide-in-bottom {
  animation: slideInBottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes slideInBottom {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── SECTION HEADER ─── */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.section-title svg {
  color: var(--accent);
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border-glass), transparent);
}

/* ─── ARTICLES GRID ─── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.article-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: var(--shadow-glass);
}


.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glass-hover);
  border-color: var(--accent-glass);
}

.article-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-secondary);
  transition: transform 0.5s ease;
}

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

.article-card-body {
  padding: 20px;
}

.article-card-category {
  display: inline-block;
  padding: 3px 10px;
  background: var(--accent-glass);
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.article-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.article-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.article-card-author {
  font-weight: 500;
}

/* ─── TOPICS FILTER ─── */
.topics-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
  margin-bottom: 32px;
  overflow-x: auto;
}

.topic-chip {
  padding: 8px 18px;
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.topic-chip:hover {
  color: var(--text-primary);
  background: var(--bg-glass-strong);
  border-color: var(--accent);
}

.topic-chip.active {
  background: var(--accent-glass);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ─── ARTICLE DETAIL ─── */
.back-btn {
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

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

.article-detail {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 24px;
  animation: detailEnter 0.5s ease;
}

@keyframes detailEnter {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.article-detail-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 24px;
  background: var(--bg-secondary);
}

.article-detail-category {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-glass);
  color: var(--accent);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.article-detail-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
}

.article-detail-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-glass);
}

.article-detail-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-detail-content p {
  margin-bottom: 1.2rem;
}

/* ─── COMMENTS ─── */
.comments-section {
  padding: 28px 32px;
  animation: detailEnter 0.5s ease 0.2s both;
}

.comments-header {
  margin-bottom: 20px;
}

.comments-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.125rem;
  font-weight: 600;
}

.comments-title svg {
  color: var(--accent);
}

.comments-form {
  margin-bottom: 24px;
}

.comment-input-wrapper {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.comment-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  resize: none;
  transition: all 0.3s ease;
  outline: none;
}

.comment-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--input-focus);
}

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

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  padding: 16px;
  background: var(--input-bg);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  animation: commentSlide 0.4s ease backwards;
}

.comment-item:nth-child(1) { animation-delay: 0.05s; }
.comment-item:nth-child(2) { animation-delay: 0.1s; }
.comment-item:nth-child(3) { animation-delay: 0.15s; }

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

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.8125rem;
}

.comment-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--nova-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
}

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

.comment-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.comment-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ─── MODALS ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(4px);
  animation: backdropIn 0.3s ease;
}

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

.modal-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px 32px 28px;
  background: var(--modal-bg) !important;
  backdrop-filter: blur(32px) !important;
  -webkit-backdrop-filter: blur(32px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
  animation: modalIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal-container.exit {
  animation: modalOut 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modalOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.modal-header {
  text-align: center;
  margin-bottom: 28px;
}

.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--accent-glass);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  animation: modalIconBounce 0.6s ease;
}

@keyframes modalIconBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.1); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.modal-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-form .form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.modal-form .form-group {
  animation: fadeInUp 0.4s ease backwards;
}
.modal-form .form-group:nth-child(1) { animation-delay: 0.1s; }
.modal-form .form-group:nth-child(2) { animation-delay: 0.15s; }
.modal-form .form-group:nth-child(3) { animation-delay: 0.2s; }
.modal-form .form-group:nth-child(4) { animation-delay: 0.25s; }

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}

.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.input-icon-wrapper .form-input {
  padding-left: 40px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.3s ease;
}

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

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

.form-input option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

textarea.form-input {
  resize: vertical;
  min-height: 60px;
  line-height: 1.5;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  animation: fadeInUp 0.4s ease 0.3s both;
}

.form-checkbox input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.form-checkbox label {
  cursor: pointer;
}

.modal-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  animation: fadeInUp 0.4s ease 0.35s both;
}

.modal-footer a {
  color: var(--accent);
  font-weight: 600;
}

/* ─── SIDEBAR ─── */
.sidebar {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
}

.sidebar.active {
  display: block;
}

.sidebar-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  animation: backdropIn 0.3s ease;
}

.sidebar-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(32px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  animation: sidebarSlideIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 20px 0 0 20px;
  border: none;
  border-left: 1px solid var(--border-glass);
}

.sidebar-panel.exit {
  animation: sidebarSlideOut 0.3s ease forwards;
}

@keyframes sidebarSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes sidebarSlideOut {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-glass);
}

.sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.sidebar-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-item:hover {
  background: var(--accent-glass);
  color: var(--accent);
}

.sidebar-item svg {
  color: var(--text-muted);
  transition: color 0.2s;
}

.sidebar-item:hover svg {
  color: var(--accent);
}

.sidebar-divider {
  border: none;
  height: 1px;
  background: var(--border-glass);
  margin: 8px 0;
}

/* ─── PROFILE DROPDOWN ─── */
.dropdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
}

.dropdown-overlay.active {
  display: block;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1101;
  width: 280px;
  padding: 16px;
  display: none;
  animation: dropdownIn 0.25s ease;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.profile-dropdown.active {
  display: block;
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
}

.dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--nova-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

.dropdown-name {
  font-weight: 700;
  font-size: 0.875rem;
}

.dropdown-email {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dropdown-divider {
  border: none;
  height: 1px;
  background: var(--border-glass);
  margin: 12px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: var(--accent-glass);
  color: var(--accent);
}

.dropdown-item svg { color: var(--text-muted); }
.dropdown-item:hover svg { color: var(--accent); }

/* ─── ADMIN ─── */
.admin-header {
  margin-bottom: 28px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
}

.admin-form {
  padding: 28px;
}

.admin-form-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.admin-form .form-group {
  margin-bottom: 16px;
}

.admin-form label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.admin-form .btn {
  margin-top: 8px;
}

.admin-articles {
  padding: 28px;
  max-height: 600px;
  overflow-y: auto;
}

.admin-articles-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-article-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--input-bg);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  animation: commentSlide 0.3s ease backwards;
  transition: background 0.2s;
}

.admin-article-item:hover {
  background: var(--bg-glass-strong);
}

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

.admin-article-title {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-article-category {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.admin-article-delete {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.admin-article-delete:hover {
  background: var(--danger);
  color: #fff;
  transform: scale(1.05);
}

/* ─── TOAST NOTIFICATIONS ─── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  pointer-events: auto;
  animation: toastIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  max-width: 380px;
}

.toast.exit {
  animation: toastOut 0.3s ease forwards;
}

.toast-success svg { color: var(--accent); }
.toast-error svg { color: var(--danger); }
.toast-info svg { color: #60a5fa; }

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
}

/* ─── SKELETON LOADING ─── */
.skeleton {
  background: linear-gradient(90deg, var(--skeleton-from) 25%, var(--skeleton-to) 50%, var(--skeleton-from) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease infinite;
  border-radius: 8px;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 360px;
  border-radius: 16px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .header {
    padding: 8px 12px;
  }

  .nav-container {
    padding: 6px 10px;
    gap: 8px;
  }

  .logo-text { display: none; }

  .nav-auth-buttons .btn span { display: none; }
  .nav-auth-buttons .btn { padding: 6px 10px; }

  .nav-tabs .nav-tab span { display: none; }
  .nav-tabs .nav-tab { padding: 8px 10px; }

  .hero-section { padding: 36px 24px; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }

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

  .article-detail {
    padding: 20px;
  }

  .article-detail-title {
    font-size: 1.5rem;
  }

  .comments-section {
    padding: 20px;
  }

  .modal-container {
    max-width: 92%;
    padding: 28px 20px 24px;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nav-right {
    gap: 6px;
  }

  .nav-actions {
    gap: 2px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
  }

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

  .section-title {
    font-size: 1.375rem;
  }

  .sidebar-panel {
    width: 280px;
  }

  .comment-input-wrapper {
    flex-direction: column;
  }
}

/* ─── NO-SCROLL ─── */
body.no-scroll {
  overflow: hidden;
}
