:root {
  /* Acid-Pop Editorial Palette */
  --primary-color: #A6CE39;
  --primary-hover: #1A1A1A;
  --bg-color: #E6F4F1;
  --surface-color: #ffffff;
  --accent-color: #E2E727;
  --text-main: #1A1A1A;
  --text-muted: #4a4a4a;
  --border-color: #1A1A1A;
  --card-shadow: 4px 4px 0px 0px #1A1A1A;
  
  /* Admin Palette */
  --admin-sidebar-bg: #1A1A1A;
  --admin-sidebar-text: #E6F4F1;
  --admin-sidebar-active: #A6CE39;
  --admin-bg: #E6F4F1;
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

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

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

/* Magazine-Style Sticky Header */
.main-header {
  padding: 1.5rem 0;
  border-bottom: 4px solid var(--border-color);
  background: var(--primary-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-main {
  font-size: 2rem;
  font-weight: 900;
  color: #1A1A1A;
  letter-spacing: -0.05em;
  font-family: 'Playfair Display', serif;
}

.desktop-nav a {
  text-decoration: none;
  color: #1A1A1A;
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  padding: 0.5rem 1rem;
  border: 2px solid transparent;
}

.desktop-nav a:hover { 
    background: #1A1A1A;
    color: var(--primary-color);
}

.btn-primary { 
    background: var(--primary-color); 
    color: #1A1A1A; 
    border: 2px solid #1A1A1A;
    border-radius: 0; 
    padding: 0.75rem 2rem; 
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 4px 4px 0px 0px #1A1A1A;
}

.btn-primary:hover { 
    background: #1A1A1A;
    color: var(--primary-color);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px 0px #1A1A1A;
}

.card {
  background: var(--surface-color);
  border-radius: 0;
  border: 3px solid var(--border-color);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: all 0.2s;
  display: block;
  margin-bottom: 1.5rem;
  box-shadow: 6px 6px 0px 0px #1A1A1A;
}

.card:hover { 
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px 0px #1A1A1A;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 1.6rem;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-width 0.1s;
}

.btn-secondary:hover {
  background: rgba(10, 102, 194, 0.1);
  border-width: 2px;
}

/* Mobile Sidebar & Overlay */
.mobile-sidebar {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: #fff;
  z-index: 2000;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

@media (min-width: 768px) {
  .mobile-sidebar { display: none; }
}

.mobile-sidebar.active {
  right: 0;
}

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

.close-sidebar {
  font-size: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 1;
  color: var(--text-muted);
}

.sidebar-nav {
  padding: 1rem 0;
}

.sidebar-nav a {
  display: block;
  padding: 1.25rem 2rem;
  text-decoration: none;
  color: #000;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s;
}

/* Magazine-Style Footer */
.magazine-footer {
  background: #fff;
  border-top: 2px solid #000;
  padding: 4rem 0 2rem;
  margin-top: 6rem;
}

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

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand .logo {
  margin-bottom: 1.5rem;
}

.footer-description {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
}

.footer-column h4 {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #000;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
  transition: color 0.2s;
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-copyright {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 600;
}

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

.footer-credits a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Admin Styles */
.admin-body {
  display: flex;
  min-height: 100vh;
  background-color: var(--admin-bg);
}

.admin-sidebar {
  width: 260px;
  background-color: var(--admin-sidebar-bg);
  color: var(--admin-sidebar-text);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-sidebar-nav {
  padding: 1rem 0;
}

.admin-sidebar-nav a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--admin-sidebar-text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.admin-sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
}

.admin-sidebar-nav a.active {
  background: var(--admin-sidebar-active);
  color: #fff;
  font-weight: 600;
}

.admin-main {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
}

.admin-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

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

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

.admin-table th, .admin-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.admin-form-group {
  margin-bottom: 1.5rem;
}

.admin-form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.admin-form-group input[type="text"],
.admin-form-group input[type="number"],
.admin-form-group input[type="url"],
.admin-form-group select,
.admin-form-group textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.875rem;
  font-family: inherit;
}

.admin-form-group textarea {
  resize: vertical;
}

.table-responsive {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: #333;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  pointer-events: auto;
  animation: slideUpFadeIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast.error {
  background: #dc2626;
}

.toast.success {
  background: #166534;
}

@keyframes slideUpFadeIn {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}

/* Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--surface-color);
  transition: all 0.2s;
}

.pagination a:hover {
  background: var(--bg-color);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.pagination span.current {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.pagination span.dots {
  border: none;
  background: transparent;
  color: var(--text-muted);
}

/* Magazine Hero Responsive Styles */
.magazine-hero {
  margin-bottom: 2rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.hero-main-card {
  background: var(--surface-color);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.hero-main-card h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-main-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-search-form {
  max-width: 550px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: transparent;
  padding: 0;
}

.hero-search-form input {
  width: 100%;
  border: 1px solid var(--border-color);
  background: #f3f2ef;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  outline: none;
  border-radius: 50px;
}

.hero-search-form button {
  width: 100%;
  padding: 0.8rem 2rem;
  border-radius: 50px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 2rem;
}

.metric-item div:first-child {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-main);
}

.metric-item div:last-child {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .hero-main-card {
    padding: 3rem 2rem;
  }
  
  .hero-main-card h1 {
    font-size: 2.25rem;
  }

  .hero-main-card p {
    font-size: 1rem;
  }

  .hero-search-form {
    flex-direction: row;
    background: #f3f2ef;
    padding: 0.5rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    gap: 0.5rem;
  }

  .hero-search-form input {
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 0;
  }

  .hero-search-form button {
    width: auto;
    padding: 0.6rem 2rem;
  }

  .hero-metrics {
    display: flex;
    justify-content: center;
    gap: 3rem;
  }
}

/* How It Works Section */
.how-it-works {
  margin-bottom: 4rem;
  padding: 1rem 0;
}

.how-header {
  text-align: center;
  margin-bottom: 3rem;
}

.how-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

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

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

.how-step {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  transition: transform 0.2s;
}

.how-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow);
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.how-step h3 {
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.how-step p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (min-width: 768px) {
  .how-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .how-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

