:root {
  --bg-primary: #0f0f14;
  --bg-secondary: #1a1a24;
  --bg-tertiary: #252532;
  --accent-primary: #ff3366;
  --accent-secondary: #6b4fff;
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b0;
  --border-color: #2a2a38;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

main {
  flex: 1;
}

/* Site Header (Navigation) */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--accent-primary);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  flex-shrink: 0;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--accent-primary);
}

/* Search Bar */
.search-bar {
  margin: 2rem 0;
}

.search-bar form {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
}

.search-bar input {
  flex: 1;
  padding: 0.8rem 1.2rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-right: none;
  color: var(--text-primary);
  font-size: 1rem;
  border-radius: 8px 0 0 8px;
  outline: none;
}

.search-bar input:focus {
  border-color: var(--accent-primary);
}

.search-bar button {
  padding: 0.8rem 1.5rem;
  background: var(--accent-primary);
  color: white;
  border: none;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0 8px 8px 0;
  transition: background 0.3s;
}

.search-bar button:hover {
  background: #e62958;
}

/* Category Filter */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0;
  justify-content: center;
}

.filter-btn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--border-color);
  transition: all 0.3s;
}

.filter-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.article-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--border-color);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.article-hero {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--bg-tertiary);
}

.article-content {
  padding: 1.5rem;
}

.article-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.article-category {
  color: var(--accent-primary);
  font-weight: 600;
}

.article-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.article-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s;
}

.article-title a:hover {
  color: var(--accent-primary);
}

.article-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.read-more {
  display: inline-block;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  margin-top: 0.5rem;
  transition: color 0.3s;
}

.read-more:hover {
  color: var(--accent-secondary);
}

.read-more::after {
  content: " →";
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.tag:hover {
  background: var(--accent-primary);
  color: white;
}

/* Single Article Page - Redesigned */
.article-single {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0;
}

.article-single-header {
  /* This is NOT sticky - just regular positioning */
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
}

.article-single-category {
  display: inline-block;
  background: var(--accent-primary);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.article-single-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.article-single-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.meta-author {
  font-weight: 600;
}

.meta-separator {
  color: var(--border-color);
}

.article-single-hero {
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden;
}

.article-single-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.article-single-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 2rem 0;
}

.article-single-body h2 {
  color: var(--text-primary);
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
}

.article-single-body h3 {
  color: var(--text-primary);
  font-size: 1.4rem;
  margin: 1.5rem 0 0.8rem;
}

.article-single-body p {
  margin-bottom: 1.2rem;
}

.article-single-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  display: block;
}

.article-single-body img.img-left {
  float: left;
  margin: 0.5rem 1.5rem 1rem 0;
}

.article-single-body img.img-right {
  float: right;
  margin: 0.5rem 0 1rem 1.5rem;
}

.article-single-body .video-embed {
  clear: both;
}

.article-single-body .twitter-embed {
  clear: both;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.article-single-body a {
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-primary);
}

.article-single-body a:hover {
  color: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

.article-single-body ul, .article-single-body ol {
  margin: 1rem 0 1rem 2rem;
}

.article-single-body li {
  margin-bottom: 0.5rem;
}

.article-single-body blockquote {
  border-left: 4px solid var(--accent-primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-single-body code {
  background: var(--bg-tertiary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.article-single-body pre {
  background: var(--bg-tertiary);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-single-body pre code {
  background: none;
  padding: 0;
}

.article-single-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 2rem;
}

.article-single-tags strong {
  color: var(--text-primary);
  margin-right: 0.5rem;
}

.article-disclosure {
  background: var(--bg-tertiary);
  border-left: 4px solid var(--accent-secondary);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.article-disclosure strong {
  color: var(--text-primary);
}

.article-source {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.article-source a {
  color: var(--accent-primary);
}

/* Footer */footer {
  background: var(--bg-secondary);
  border-top: 2px solid var(--accent-primary);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--accent-primary);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  transition: background 0.3s;
}

.social-links a:hover {
  background: var(--accent-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* About & Contact Pages */
.page-header {
  text-align: center;
  margin: 3rem 0;
}

.page-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-content {
  max-width: 800px;
  margin: 0 auto 3rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

.about-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin: 2rem 0;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 2rem auto;
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-submit:hover {
  background: #e62958;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0;
}

.pagination a,
.pagination span {
  padding: 0.6rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s;
}

.pagination a:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.pagination .active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* Admin Styles */
.admin-header {
  background: var(--bg-secondary);
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--accent-primary);
}

.admin-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-new {
  background: var(--accent-primary);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}

.btn-new:hover {
  background: #e62958;
}

.articles-table {
  width: 100%;
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.articles-table thead {
  background: var(--bg-tertiary);
}

.articles-table th,
.articles-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.articles-table th {
  font-weight: 600;
  color: var(--accent-primary);
}

.articles-table tr:last-child td {
  border-bottom: none;
}

.status-badge {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-published {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.status-draft {
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
}

.article-actions {
  display: flex;
  gap: 1rem;
}

.article-actions a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.article-actions a:hover {
  text-decoration: underline;
}

.editor-form {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.toolbar button {
  padding: 0.5rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s;
}

.toolbar button:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* Responsive */
@media (max-width: 768px) {
  .site-header {
    padding: 1rem 0;
  }
  
  .site-header .container {
    flex-direction: column;
    text-align: center;
  }
  
  nav ul {
    gap: 1rem;
    justify-content: center;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
  }
  
  .article-single-title {
    font-size: 2rem;
  }
  
  .page-title {
    font-size: 2rem;
  }
}