/* NerdsGeeks.com - Digital Rebellion Design System */

:root {
  /* Color System - Cyberpunk Palette */
  --bg-primary: #0a0e27;
  --bg-secondary: #151935;
  --bg-tertiary: #1e2442;
  --accent-cyan: #00f0ff;
  --accent-magenta: #ff00ff;
  --accent-green: #00ff41;
  --accent-yellow: #ffff00;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --text-dim: #666;
  --border-color: #00f0ff;
  --glitch-1: #ff00ff;
  --glitch-2: #00ff41;

  /* Typography - Using system monospace fonts */
  --font-display: 'Impact', 'Arial Black', sans-serif;
  --font-mono: 'Courier New', 'Courier', monospace;
  --font-body: 'Consolas', 'Monaco', 'Courier New', monospace;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Scanline overlay effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 9999;
  animation: scanline 8s linear infinite;
}

@keyframes scanline {
  0% { transform: translateY(0); }
  100% { transform: translateY(100vh); }
}

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.05"/></svg>');
  pointer-events: none;
  z-index: 9998;
  opacity: 0.5;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-lg);
}

/* Header */
header {
  background: var(--bg-secondary);
  border-bottom: 3px solid var(--accent-cyan);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  max-width: 1400px;
  margin: 0 auto;
}

.site-logo, .logo a {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--accent-cyan);
  text-decoration: none;
  letter-spacing: 2px;
  position: relative;
  text-transform: uppercase;
  animation: glitch-logo 5s infinite;
}

@keyframes glitch-logo {
  0%, 90%, 100% {
    transform: translate(0);
    text-shadow: 0 0 10px var(--accent-cyan);
  }
  92% {
    transform: translate(-2px, 2px);
    text-shadow: -2px 0 var(--glitch-1), 2px 0 var(--glitch-2);
  }
  94% {
    transform: translate(2px, -2px);
    text-shadow: 2px 0 var(--glitch-1), -2px 0 var(--glitch-2);
  }
}

.site-logo::before, .logo a::before {
  content: '>';
  color: var(--accent-green);
  margin-right: 0.5rem;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Navigation Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  font-family: var(--font-mono);
  background: transparent;
  border: 2px solid var(--accent-cyan);
  color: var(--accent-cyan);
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  letter-spacing: 1px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.nav-dropdown-toggle:hover {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.6);
  transform: translateY(-2px);
}

.nav-dropdown-toggle.active {
  background: var(--accent-cyan);
  color: var(--bg-primary);
}

.nav-arrow {
  transition: transform 0.3s ease;
  font-size: 0.7rem;
}

.nav-dropdown-toggle.active .nav-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-magenta);
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 250px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(255, 0, 255, 0.4);
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 0 100%);
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 15px;
  height: 15px;
  background: var(--accent-magenta);
  clip-path: polygon(0 0, 100% 100%, 100% 0);
}

.nav-dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu li {
  border-bottom: 1px solid var(--bg-tertiary);
}

.nav-dropdown-menu li:last-child {
  border-bottom: none;
}

.nav-dropdown-menu a {
  display: block;
  padding: 1rem 1.5rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-dropdown-menu a::before {
  content: '▸';
  position: absolute;
  left: 0.75rem;
  color: var(--accent-cyan);
  opacity: 0;
  transition: all 0.3s ease;
}

.nav-dropdown-menu a:hover {
  background: var(--bg-tertiary);
  color: var(--accent-cyan);
  padding-left: 2rem;
  box-shadow: inset 4px 0 0 var(--accent-cyan);
}

.nav-dropdown-menu a:hover::before {
  opacity: 1;
}

/* Home Layout */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

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

.main-content h1 {
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--accent-cyan);
  margin-bottom: var(--space-xl);
  text-transform: uppercase;
  letter-spacing: 3px;
  position: relative;
  display: inline-block;
}

.main-content h1::after {
  content: '_';
  animation: blink 1s infinite;
  color: var(--accent-green);
}

/* Articles Grid */
.articles-grid {
  display: grid;
  gap: var(--space-xl);
  animation: fadeInUp 0.8s ease;
}

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

.article-card {
  background: var(--bg-secondary);
  border: 2px solid var(--bg-tertiary);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  animation: slideIn 0.6s ease;
  animation-fill-mode: both;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }

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

.article-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--accent-cyan), var(--accent-magenta), var(--accent-green));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.article-card:hover::before {
  opacity: 1;
  animation: borderGlow 2s infinite;
}

@keyframes borderGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.5); }
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0, 240, 255, 0.3);
  border-color: var(--accent-cyan);
}

.article-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  filter: grayscale(50%) contrast(1.2);
  transition: all 0.4s ease;
}

.article-card:hover img {
  filter: grayscale(0%) contrast(1.3);
  transform: scale(1.05);
}

.article-content {
  padding: var(--space-lg);
  position: relative;
}

.category-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--bg-primary);
  background: var(--accent-green);
  padding: 0.25rem 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-sm);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  font-weight: 700;
}

.article-content h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  letter-spacing: 1px;
}

.article-content h2 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.article-content h2 a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  transition: width 0.3s ease;
}

.article-content h2 a:hover {
  color: var(--accent-cyan);
}

.article-content h2 a:hover::after {
  width: 100%;
}

.article-content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
}

.article-meta {
  display: flex;
  gap: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  border-top: 1px solid var(--bg-tertiary);
  padding-top: var(--space-sm);
}

.article-meta span::before {
  content: '//';
  color: var(--accent-cyan);
  margin-right: 0.5rem;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-widget {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-magenta);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  position: relative;
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
}

.sidebar-widget::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 15px;
  height: 15px;
  background: var(--accent-magenta);
  clip-path: polygon(0 0, 100% 100%, 100% 0);
}

.sidebar-widget::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 15px;
  height: 15px;
  background: var(--accent-magenta);
  clip-path: polygon(0 100%, 100% 0, 0 0);
}

.sidebar-widget h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--accent-magenta);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.trending-list {
  list-style: none;
}

.trending-list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px dashed var(--bg-tertiary);
  position: relative;
  padding-left: 20px;
}

.trending-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.trending-list a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: block;
}

.trending-list a:hover {
  color: var(--accent-cyan);
  transform: translateX(5px);
}

.view-count {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

.view-count::before {
  content: '👁 ';
}

/* Ad Widgets */
.ad-widget {
  border-color: var(--accent-yellow);
}

.ad-widget::before,
.ad-widget::after {
  background: var(--accent-yellow);
}

.ad-placeholder {
  background: var(--bg-tertiary);
  padding: var(--space-xl);
  text-align: center;
  font-family: var(--font-mono);
  color: var(--text-dim);
  border: 2px dashed var(--accent-yellow);
  position: relative;
}

.ad-placeholder::before {
  content: '[ADVERTISEMENT]';
  display: block;
  color: var(--accent-yellow);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Footer */
footer, .site-footer {
  background: var(--bg-secondary);
  border-top: 3px solid var(--accent-magenta);
  margin-top: var(--space-2xl);
  padding: var(--space-xl) 0;
  text-align: center;
  position: relative;
}

footer::before, .site-footer::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-magenta), var(--accent-green), var(--accent-cyan));
  background-size: 200% 100%;
  animation: gradientShift 3s linear infinite;
}

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

footer p, .site-footer p {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

footer a, .site-footer a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all 0.3s ease;
}

footer a:hover, .site-footer a:hover {
  color: var(--accent-magenta);
  text-shadow: 0 0 10px var(--accent-magenta);
}

/* Article Full Page */
.article-full {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-cyan);
  padding: var(--space-2xl);
  animation: fadeInUp 0.8s ease;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--accent-cyan);
  line-height: 1.1;
  margin: var(--space-md) 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.article-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  margin: var(--space-xl) 0;
  border: 3px solid var(--accent-magenta);
  filter: contrast(1.2);
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--accent-green);
  margin: var(--space-xl) 0 var(--space-md);
  text-transform: uppercase;
}

.article-body p {
  margin-bottom: var(--space-lg);
}

.article-body a {
  color: var(--accent-cyan);
  text-decoration: underline;
  transition: all 0.3s ease;
}

.article-body a:hover {
  color: var(--accent-magenta);
  text-shadow: 0 0 10px var(--accent-magenta);
}

/* Related Articles */
.related-articles {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 2px solid var(--accent-cyan);
}

.related-articles h3 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--accent-magenta);
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.related-card {
  background: var(--bg-tertiary);
  border: 2px solid var(--accent-green);
  padding: var(--space-lg);
  transition: all 0.3s ease;
}

.related-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.3);
}

.related-card h4 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent-cyan);
  margin-bottom: var(--space-sm);
}

.related-card a {
  color: inherit;
  text-decoration: none;
}

/* Category Header */
.category-header {
  background: var(--bg-secondary);
  border: 3px solid var(--accent-cyan);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  animation: fadeInUp 0.6s ease;
}

.category-header h1 {
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: var(--space-sm);
}

.category-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .home-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  nav ul, .main-nav ul {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    gap: var(--space-md);
  }

  .site-logo, .logo a {
    font-size: 2rem;
  }

  .main-content h1 {
    font-size: 2.5rem;
  }

  .article-content h2 {
    font-size: 1.5rem;
  }

  .article-card img {
    height: 200px;
  }

  .category-header h1 {
    font-size: 2.5rem;
  }

  .article-header h1 {
    font-size: 2rem;
  }
}

/* Inline Ad Widgets */
.inline-ad {
  margin: var(--space-xl) 0;
  animation: fadeIn 1s ease;
}

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