/* =========================
   ROOT & RESET
========================= */
:root {
  --bg-main: #0b0d12;
  --bg-panel: #11141c;
  --text-primary: #e7e9ee;
  --text-secondary: #a9afc3;
  --accent-purple: #7c5cff;
  --accent-red: #ff3b3b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, sans-serif;
  padding-top: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

section { 
  padding: 28px clamp(16px, 4vw, 48px);
  position: relative;
  z-index: 1;
}

h1, h2, h3 { margin: 0 0 12px; font-weight: 600; }
p { margin: 0; color: var(--text-secondary); line-height: 1.6; }
a { color: inherit; text-decoration: none; }

/* =====================================================
   LIVE ACTIVITY BAR - COMPLETE FIX
===================================================== */
.live-activity-bar {
  position: sticky;
  left: 0;
  right: 0;
  z-index: 45;
  background: linear-gradient(90deg, rgba(139, 0, 0, 0.95), rgba(180, 0, 0, 0.95));
  backdrop-filter: blur(20px);
  padding: 12px 20px;
  border-bottom: 2px solid rgba(255, 59, 59, 0.3);
  box-shadow: 0 4px 20px rgba(255, 59, 59, 0.2);
  transition: top 0.3s ease;
  margin-top: 8px;
}

.activity-feed-container {
  max-width: 1400px;
  margin: 0 auto;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 14px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #ff3b3b;
  border-radius: 50%;
  animation: livePulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes livePulse {
  0%, 100% { 
    opacity: 1; 
    box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.7);
  }
  50% { 
    opacity: 0.7; 
    box-shadow: 0 0 0 8px rgba(255, 59, 59, 0);
  }
}

.activity-time {
  font-size: 12px;
  opacity: 0.9;
  font-weight: 600;
  flex-shrink: 0;
}

.activity-link {
  font-weight: 500;
  transition: opacity 0.3s ease;
  cursor: pointer;
  min-width: 0;
  overflow-wrap: anywhere;
}

.activity-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* =====================================================
   ENHANCED SECTIONS
===================================================== */
.enhanced-sections-header {
  text-align: center;
  padding: 90px 40px 30px;
  background: var(--bg-main);
  position: relative;
  z-index: 1;
}

.enhanced-sections-header h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, #9333EA, #C084FC);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.enhanced-sections-header p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.enhanced-sections {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  position: relative;
  z-index: 1;
  background: var(--bg-main);
}

.section-header {
  margin-bottom: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}

.section-icon {
  font-size: 28px;
}

.section-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 40px;
}

.trending-section,
.editors-pick-section {
  background: rgba(18, 22, 34, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(147, 51, 234, 0.3);
  border-radius: 20px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.trending-section,
.editors-pick-section,
.trending-item,
.editor-card,
.map-zone,
.knowledge-card,
.daily-poll,
.predictions-box {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.trending-section::before,
.editors-pick-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #9333EA, #C084FC);
}

.trending-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trending-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: rgba(18, 22, 34, 0.8);
  border: 1px solid rgba(147, 51, 234, 0.25);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.trending-item:hover {
  background: rgba(147, 51, 234, 0.1);
  border-color: #9333EA;
  transform: translateX(6px);
}

.trending-rank {
  font-size: 24px;
  font-weight: 900;
  color: #9333EA;
  min-width: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(147, 51, 234, 0.2);
  border-radius: 8px;
}

.trending-content {
  flex: 1;
}

.trending-game {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, #9333EA, #7C3AED);
  color: #fff;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.trending-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

.editor-pick-carousel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editor-card {
  padding: 16px;
  background: rgba(18, 22, 34, 0.8);
  border: 1px solid rgba(147, 51, 234, 0.25);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.editor-card:hover {
  background: rgba(147, 51, 234, 0.1);
  border-color: #9333EA;
  transform: translateX(6px);
}

.editor-game {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, #9333EA, #7C3AED);
  color: #fff;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.editor-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.3;
}

.editor-summary {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* =====================================================
   NEWS MAP
===================================================== */
.news-map {
  background: radial-gradient(1200px 400px at 50% -20%, rgba(124,92,255,.12), transparent), var(--bg-main);
  padding: 60px clamp(16px, 4vw, 48px);
  position: relative;
  z-index: 2;
  min-height: 600px;
}

.news-map-header {
  text-align: center;
  margin-bottom: 40px;
}

.news-map-header h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: 0.14em;
  background: linear-gradient(90deg, #7c5cff, #06b6d4, #7c5cff);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.news-map-header p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.news-map-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.map-zone {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent), #121826;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 20px;
  min-height: 180px;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  z-index: 5;
  pointer-events: auto;
}

.map-zone[data-game="bgmi"] { --accent: #ff6b35; }
.map-zone[data-game="ffmax"] { --accent: #ff9f1c; }
.map-zone[data-game="valorant"] { --accent: #ff4655; }
.map-zone[data-game="pokemon"] { --accent: #38bdf8; }
.map-zone[data-game="moba"] { --accent: #c89b3c; }
.map-zone[data-game="general"] { --accent: #8b5cf6; }

.zone-core {
  display: grid;
  gap: 6px;
}

.zone-name {
  font-size: 18px;
  letter-spacing: .1em;
  color: #e7e9ee;
}

.zone-game,
.zone-count {
  font-size: 13px;
  color: #9ca3af;
}

.zone-icon {
  font-size: 22px;
  margin-top: 4px;
}

.zone-preview {
  position: absolute;
  inset: 12px;
  background: rgba(10,12,18,0.98);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: all 0.2s ease;
  overflow-y: auto;
  max-height: calc(100% - 24px);
}

.preview-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preview-label {
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.preview-title {
  font-size: 12px;
  color: #ffffff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-action {
  background: rgba(124,58,237,0.14);
  color: #fff;
  border: 1px solid rgba(124,58,237,0.12);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 6px;
  white-space: nowrap;
  text-align: center;
  font-weight: 600;
  align-self: flex-end;
  min-width: 120px;
}

.preview-action:hover {
  background: rgba(124,58,237,0.3);
  border-color: rgba(124,58,237,0.5);
  transform: translateY(-2px);
}

.map-zone:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}

.map-zone:hover .zone-core {
  opacity: .2;
}

.map-zone:hover .zone-preview {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.map-zone.is-active {
  transform: scale(1.05);
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(var(--accent), 0.3);
}

.map-zone.is-dimmed {
  opacity: .3;
  filter: blur(1px);
}

.map-active-indicator {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #9ca3af;
  font-weight: 600;
}

.game-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(124,58,237,0.2);
  color: #9333EA;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

/* =====================================================
   KNOWLEDGE HUB
===================================================== */
.knowledge-hub {
  max-width: 1400px;
  margin: 60px auto;
  padding: 0 40px;
  background: var(--bg-main);
}

.knowledge-hub .section-header {
  text-align: center;
  margin-bottom: 32px;
}

.knowledge-hub h2 {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}

.knowledge-hub .section-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.knowledge-card {
  background: rgba(18, 22, 34, 0.9);
  border: 1px solid rgba(147, 51, 234, 0.2);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.knowledge-card:hover {
  border-color: #9333EA;
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(147, 51, 234, 0.2);
}

.knowledge-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(147, 51, 234, 0.2);
  color: #C084FC;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.knowledge-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.4;
}

.knowledge-card p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* =====================================================
   COMMUNITY SECTION
===================================================== */
.community-section {
  max-width: 1000px;
  margin: 60px auto;
  padding: 0 40px;
}

.community-section .section-header {
  text-align: center;
  margin-bottom: 40px;
}

.community-section h2 {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}

.community-section .section-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

/* Daily Poll */
.daily-poll {
  background: rgba(18, 22, 34, 0.9);
  border: 1px solid rgba(147, 51, 234, 0.2);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.daily-poll h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.poll-question {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.poll-option {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(147, 51, 234, 0.2);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
}

.poll-option:hover:not(:disabled) {
  background: rgba(147, 51, 234, 0.1);
  border-color: #9333EA;
}

.poll-option:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.option-label {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  min-width: 80px;
}

.option-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.option-fill {
  height: 100%;
  background: linear-gradient(90deg, #9333EA, #C084FC);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.option-percent {
  font-size: 13px;
  font-weight: 600;
  color: #9333EA;
  min-width: 40px;
  text-align: right;
}

.poll-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

/* Predictions */
.predictions-box {
  background: rgba(18, 22, 34, 0.9);
  border: 1px solid rgba(147, 51, 234, 0.2);
  border-radius: 16px;
  padding: 24px;
}

.predictions-box h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
}

.prediction-item {
  margin-bottom: 20px;
}

.prediction-matchup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.vs {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.prediction-votes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.vote-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(147, 51, 234, 0.2);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.vote-btn:hover:not(:disabled) {
  background: rgba(147, 51, 234, 0.1);
  border-color: #9333EA;
  transform: translateY(-2px);
}

.vote-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.vote-btn span:first-child {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.confidence {
  font-size: 20px;
  font-weight: 900;
  color: #9333EA;
}

.prediction-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 1024px) {
  .enhanced-sections {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 20px 50px;
  }

  .news-map-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .knowledge-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .live-activity-bar {
    top: 72px;
    padding: 10px 16px;
  }

  .activity-item {
    font-size: 13px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .enhanced-sections-header {
    padding: 100px 20px 20px;
  }

  .enhanced-sections {
    padding: 0 20px 40px;
  }

  .trending-section,
  .editors-pick-section {
    padding: 22px 18px;
  }

  .news-map {
    padding: 40px 16px;
  }

  .news-map-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-hub,
  .community-section {
    padding: 0 20px;
  }

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

  .prediction-votes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .live-activity-bar {
    top: 60px;
    padding: 8px 12px;
  }

  .activity-item {
    font-size: 12px;
    gap: 8px;
  }

  .enhanced-sections-header {
    padding: 80px 16px 16px;
  }

  .section-title {
    font-size: 18px;
  }

  .section-subtitle {
    margin-left: 0;
  }

  .enhanced-sections,
  .knowledge-hub,
  .community-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .trending-section,
  .editors-pick-section,
  .daily-poll,
  .predictions-box {
    padding: 18px 14px;
    border-radius: 14px;
  }

  .trending-item {
    gap: 12px;
    padding: 12px;
  }

  .trending-rank {
    width: 38px;
    min-width: 38px;
    height: 38px;
    font-size: 18px;
    line-height: 1;
    border-radius: 10px;
    flex-shrink: 0;
  }

  .news-map-grid {
    gap: 14px;
  }

  .map-zone {
    min-height: auto;
    padding: 16px;
  }

  .zone-preview {
    position: static;
    opacity: 1;
    transform: none;
    background: transparent;
    border: none;
    padding: 10px 0 0;
    pointer-events: auto;
    inset: auto;
    max-height: none;
    overflow: visible;
  }

  .map-zone:hover .zone-core {
    opacity: 1;
  }

  .preview-action {
    align-self: stretch;
    min-width: 0;
    white-space: normal;
  }
}

@media (min-width: 1500px) {
  .activity-feed-container,
  .enhanced-sections,
  .news-map-grid,
  .knowledge-hub {
    max-width: 1600px;
  }

  .enhanced-sections {
    gap: 48px;
    padding: 0 56px 72px;
  }

  .news-map-grid {
    grid-template-columns: repeat(4, minmax(240px, 1fr));
  }

  .knowledge-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .community-section {
    max-width: 1240px;
  }
}
