/* Blog Template - v1.0 */
/* ======================================== */

/* Variables - Cyberpunk Neon Esports */
:root {
  --primary: #00F0FF;
  --secondary: #2A3B8C;
  --accent: #FF0055;
  --bg-page: #0A0E27;
  --bg-card: #111638;
  --bg-surface: #0D1230;
  --bg-elevated: #1A2050;
  --text-primary: #FFFFFF;
  --text-secondary: #A0B0E0;
  --text-muted: #6B7DB3;
  --border-light: #1E2A5A;
  --border-medium: #2A3B8C;
  --neon-cyan: #00F0FF;
  --neon-magenta: #FF0055;
  --neon-glow: 0 0 10px rgba(0, 240, 255, 0.3), 0 0 20px rgba(0, 240, 255, 0.1);
  --neon-glow-magenta: 0 0 10px rgba(255, 0, 85, 0.3), 0 0 20px rgba(255, 0, 85, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 240, 255, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 240, 255, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 240, 255, 0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 70px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.6; color: var(--text-primary); background: var(--bg-page); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--neon-magenta); text-shadow: var(--neon-glow); }

/* Layout */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.content-wrapper { display: grid; grid-template-columns: 1fr 320px; gap: 40px; padding: 40px 0; }
.sidebar-wrapper { position: sticky; top: calc(var(--header-height) + 20px); height: fit-content; }

/* Header */
.blog-header { position: sticky; top: 0; background: var(--bg-surface); border-bottom: 1px solid var(--border-light); z-index: 100; box-shadow: 0 2px 20px rgba(0, 240, 255, 0.05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-height); }
.logo img { height: 36px; }
.nav-list { display: flex; list-style: none; gap: 30px; }
.nav-list a { color: var(--text-primary); font-weight: 500; }
.nav-list a.active { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 15px; }
.btn-subscribe { background: var(--accent); color: #fff; padding: 8px 20px; border-radius: var(--radius-sm); font-weight: 500; box-shadow: var(--neon-glow-magenta); transition: all 0.3s; }
.btn-subscribe:hover { box-shadow: 0 0 15px rgba(255, 0, 85, 0.5), 0 0 30px rgba(255, 0, 85, 0.2); }
.lang-switch { display: flex; gap: 8px; }
.lang-switch a { padding: 4px 8px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; }
.lang-switch a.active { background: var(--primary); color: #0A0E27; box-shadow: var(--neon-glow); }
.search-toggle { background: none; border: none; cursor: pointer; color: var(--text-secondary); padding: 8px; border-radius: var(--radius-sm); transition: all 0.2s; }
.search-toggle:hover { background: var(--bg-card); color: var(--accent); }

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 39, 0.9);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
}
.search-overlay.active { display: flex; }
.search-container {
  width: 100%;
  max-width: 640px;
  padding: 0 20px;
  position: relative;
}
.search-form {
  display: flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.search-form input {
  flex: 1;
  padding: 18px 24px;
  font-size: 1.1rem;
  border: none;
  outline: none;
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.search-form input::placeholder { color: var(--text-muted); }
.search-form button {
  padding: 18px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: var(--neon-glow-magenta);
}
.search-form button:hover { box-shadow: 0 0 15px rgba(255, 0, 85, 0.5); }
.search-close {
  position: absolute;
  top: -50px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
}

/* Hero */
.blog-hero { background: linear-gradient(135deg, #0A0E27 0%, #1A1050 40%, #2A0845 70%, #0A0E27 100%); color: #fff; padding: 60px 0; text-align: center; position: relative; overflow: hidden; }
.blog-hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(ellipse at 30% 50%, rgba(0, 240, 255, 0.08) 0%, transparent 60%), radial-gradient(ellipse at 70% 50%, rgba(255, 0, 85, 0.06) 0%, transparent 60%); pointer-events: none; }
.hero-title { font-size: 2.5rem; margin-bottom: 10px; text-shadow: var(--neon-glow); }
.hero-subtitle { font-size: 1.1rem; opacity: 0.9; margin-bottom: 30px; color: var(--text-secondary); }
.hero-categories { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.hero-cat { display: flex; align-items: center; gap: 8px; background: rgba(0, 240, 255, 0.1); border: 1px solid rgba(0, 240, 255, 0.3); padding: 10px 20px; border-radius: 30px; color: var(--neon-cyan); transition: all 0.3s; }
.hero-cat:hover { background: rgba(0, 240, 255, 0.2); color: #fff; box-shadow: var(--neon-glow); }

/* Masonry Grid */
.masonry-grid { column-count: 3; column-gap: 20px; }
.masonry-grid.list-grid { column-count: 1; max-width: 800px; margin: 0 auto; }
.masonry-grid.grid-view { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; column-count: unset; }

/* Article Card */
.article-card { break-inside: avoid; margin-bottom: 20px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-image { position: relative; overflow: hidden; }
.card-image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform 0.3s; }
.article-card:hover .card-image img { transform: scale(1.05); }
.card-category { position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: 20px; color: #fff; font-size: 12px; font-weight: 600; }
.card-content { padding: 20px; }
.card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 10px; line-height: 1.4; }
.card-excerpt { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 15px; line-height: 1.5; }
.card-meta { display: flex; gap: 12px; font-size: 0.8rem; color: var(--text-secondary); }
.card-meta span { display: flex; align-items: center; gap: 4px; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 25px; }
.sidebar-widget { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.widget-title { font-size: 1rem; font-weight: 600; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
.widget-search .search-form { display: flex; }
.widget-search input { flex: 1; padding: 10px; border: 1px solid var(--border-light); border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.widget-search button { padding: 10px 15px; background: var(--accent); color: #fff; border: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; cursor: pointer; }
.category-list { list-style: none; }
.category-list li a { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.category-list li:last-child a { border-bottom: none; }
.cat-count { margin-left: auto; background: var(--bg-card); padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.recent-list { list-style: none; }
.recent-item a { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.recent-item:last-child a { border-bottom: none; }
.recent-item img { width: 60px; height: 60px; object-fit: cover; border-radius: var(--radius-sm); }
.recent-title { font-weight: 500; font-size: 0.9rem; display: block; margin-bottom: 4px; }
.recent-date { font-size: 0.75rem; color: var(--text-secondary); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--bg-card); padding: 4px 12px; border-radius: 20px; font-size: 0.85rem; color: var(--text-secondary); }
.tag:hover { background: var(--accent); color: #fff; box-shadow: var(--neon-glow-magenta); }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input { padding: 10px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.btn { display: inline-block; padding: 10px 20px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; box-shadow: var(--neon-glow-magenta); transition: all 0.3s; }
.btn:hover { box-shadow: 0 0 15px rgba(255, 0, 85, 0.5), 0 0 30px rgba(255, 0, 85, 0.2); }
.social-links { display: flex; gap: 12px; }
.social-link { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--bg-card); border-radius: 50%; color: var(--text-secondary); transition: background 0.2s, color 0.2s; }
.social-link:hover { background: var(--accent); color: #fff; }

/* Category Page */
.category-header { text-align: center; padding: 50px 0; color: #fff; }
.category-header { background: linear-gradient(135deg, var(--cat-color, #00F0FF) 0%, color-mix(in srgb, var(--cat-color, #00F0FF) 30%, #0A0E27) 100%); }
.category-icon { font-size: 3rem; margin-bottom: 15px; }
.category-title { font-size: 2rem; margin-bottom: 10px; }
.category-desc { opacity: 0.9; max-width: 600px; margin: 0 auto; }
.filter-bar { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; padding: 15px; background: var(--bg-card); border-radius: var(--radius-md); }
.filter-select { padding: 8px 15px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }

/* Article Page */
.article-header { padding: 30px 0; background: var(--bg-surface); border-bottom: 1px solid var(--border-light); }
.breadcrumb { display: flex; gap: 8px; font-size: 0.9rem; margin-bottom: 20px; }
.breadcrumb span { color: var(--text-secondary); }
.article-title { font-size: 2.2rem; line-height: 1.3; margin-bottom: 20px; }
.article-meta { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; font-size: 0.9rem; color: var(--text-secondary); }
.author-avatar { width: 32px; height: 32px; border-radius: 50%; margin-right: 8px; }
.share-buttons { display: flex; gap: 10px; margin-top: 20px; }
.share-btn { padding: 6px 15px; border-radius: 20px; font-size: 0.85rem; font-weight: 500; }
.share-btn.twitter { background: #1DA1F2; color: #fff; }
.share-btn.facebook { background: #4267B2; color: #fff; }
.share-btn.linkedin { background: #0077B5; color: #fff; }
.share-btn.copy { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-light); }
.article-featured-image { max-width: 900px; margin: 30px auto; }
.article-featured-image img { border-radius: var(--radius-lg); }
.content-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; }
.article-content { max-width: 750px; }

/* TOC */
.toc { background: var(--bg-card); padding: 20px; border-radius: var(--radius-md); margin-bottom: 30px; }
.toc h3 { margin-bottom: 15px; }
.toc ul { list-style: none; }
.toc li { padding: 5px 0; }
.toc-level-2 { padding-left: 15px; }
.toc-level-3 { padding-left: 30px; }
.toc a { color: var(--text-primary); font-size: 0.9rem; }
.toc a:hover { color: var(--accent); }

/* Prose */
.prose { font-size: 1.05rem; line-height: 1.8; }
.prose h2 { font-size: 1.8rem; margin: 40px 0 20px; }
.prose h3 { font-size: 1.4rem; margin: 30px 0 15px; }
.prose p { margin-bottom: 20px; }
.prose img { border-radius: var(--radius-md); margin: 30px 0; }
.prose ul, .prose ol { margin: 20px 0; padding-left: 25px; }
.prose li { margin-bottom: 8px; }
.prose blockquote { border-left: 4px solid var(--accent); padding-left: 20px; margin: 25px 0; font-style: italic; color: var(--text-secondary); }

/* Article Footer */
.article-tags { display: flex; gap: 10px; flex-wrap: wrap; margin: 30px 0; }
.author-box { display: flex; gap: 20px; padding: 25px; background: var(--bg-card); border-radius: var(--radius-lg); margin: 30px 0; }
.author-avatar-lg { width: 80px; height: 80px; border-radius: 50%; }
.author-name { font-weight: 600; margin-bottom: 5px; }
.trust-signals { display: flex; gap: 20px; padding: 20px; background: rgba(0, 240, 255, 0.05); border: 1px solid rgba(0, 240, 255, 0.2); border-radius: var(--radius-md); margin: 30px 0; }
.trust-item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--neon-cyan); }
.trust-icon { font-weight: bold; }
.article-faq h2 { margin-bottom: 20px; }
.faq-item { border-bottom: 1px solid var(--border-light); padding: 20px 0; }
.faq-question { font-size: 1.1rem; margin-bottom: 10px; }
.related-posts { background: var(--bg-card); padding: 50px 0; margin-top: 50px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.related-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-md); overflow: hidden; transition: transform 0.2s, border-color 0.2s; }
.related-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.related-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.related-card h3 { padding: 15px; font-size: 1rem; }
.related-date { display: block; padding: 0 15px 15px; font-size: 0.8rem; color: var(--text-secondary); }

/* Footer */
.blog-footer { background: var(--bg-surface); color: #fff; padding: 50px 0 20px; margin-top: 50px; border-top: 1px solid var(--border-light); }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { margin-bottom: 15px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.7); }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; }
.footer-social { display: flex; gap: 15px; }
.footer-social a { color: rgba(255,255,255,0.7); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.page-link { padding: 8px 15px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-sm); color: var(--text-primary); }
.page-link.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: var(--neon-glow-magenta); }

/* Responsive */
@media (max-width: 1024px) {
  .content-wrapper { grid-template-columns: 1fr; }
  .sidebar-wrapper { position: static; }
  .masonry-grid { column-count: 2; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; }
  .main-nav { display: none; }
  .masonry-grid { column-count: 1; }
  .masonry-grid.grid-view { grid-template-columns: 1fr; }
  .content-layout { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-title { font-size: 1.6rem; }
}
