/* ========= Utility ========= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========= Skip Link ========= */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 999;
  padding: 0.75rem 1.5rem;
  background: var(--c-primary);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}

/* ========= Animations ========= */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(65, 158, 189, 0.4); }
  50% { box-shadow: 0 0 20px 4px rgba(65, 158, 189, 0.2); }
}

.animate-fade-in-up {
  animation: fade-in-up 0.6s ease both;
}

.animate-pulse-glow {
  animation: pulse-glow 3s infinite;
}

/* Stagger delays */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }

/* ========= Background Effects ========= */
.bg-grid {
  background-image:
    linear-gradient(var(--c-border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-border-light) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.5;
}

.floating-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--c-primary);
  border-radius: 50%;
  opacity: 0.15;
  animation: float-particle 20s infinite linear;
}

.particle:nth-child(odd) { width: 3px; height: 3px; }
.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 22s; }
.particle:nth-child(2) { left: 20%; top: 60%; animation-delay: -3s; animation-duration: 18s; }
.particle:nth-child(3) { left: 35%; top: 40%; animation-delay: -6s; animation-duration: 25s; }
.particle:nth-child(4) { left: 50%; top: 80%; animation-delay: -9s; animation-duration: 20s; }
.particle:nth-child(5) { left: 65%; top: 15%; animation-delay: -2s; animation-duration: 23s; }
.particle:nth-child(6) { left: 75%; top: 55%; animation-delay: -5s; animation-duration: 19s; }
.particle:nth-child(7) { left: 85%; top: 35%; animation-delay: -8s; animation-duration: 21s; }
.particle:nth-child(8) { left: 90%; top: 70%; animation-delay: -11s; animation-duration: 24s; }
.particle:nth-child(9) { left: 45%; top: 10%; animation-delay: -4s; animation-duration: 26s; }
.particle:nth-child(10) { left: 5%; top: 90%; animation-delay: -7s; animation-duration: 17s; }

@keyframes float-particle {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.15; }
  90% { opacity: 0.15; }
  100% { transform: translate(100px, -200px) rotate(360deg); opacity: 0; }
}

/* ========= Hero Section ========= */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--c-primary-light), var(--c-bg));
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 5rem 0;
}

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-right { display: none; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  background: var(--c-primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.hero-badge svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--c-primary);
}

.hero h1 span {
  color: var(--c-text);
}

.hero-desc {
  font-size: 1.25rem;
  color: var(--c-text-secondary);
  line-height: 1.7;
  max-width: 540px;
  margin-bottom: 2.5rem;
}

@media (max-width: 1024px) {
  .hero-desc { margin: 0 auto 2.5rem; }
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .hero-actions { justify-content: center; }
}

.hero-search {
  margin-top: 2rem;
  max-width: 500px;
  background: var(--c-primary);
  border-radius: var(--radius-2xl);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-primary);
}

@media (max-width: 1024px) {
  .hero-search { margin: 2rem auto 0; }
}

.hero-search svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  flex-shrink: 0;
}

.hero-search-placeholder {
  flex: 1;
  text-align: left;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
}

.hero-search kbd {
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 0.25rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--c-border-light);
}

@media (max-width: 1024px) {
  .hero-stats { justify-content: center; }
}

.stat-item {
  text-align: center;
}

.stat-item .number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--c-primary);
}

.stat-item .label {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
}

.stat-divider {
  width: 1px;
  height: 3rem;
  background: var(--c-border-light);
}

/* Hero right - preview card */
.hero-right {
  position: relative;
}

.preview-card {
  position: relative;
  background: var(--c-bg);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  border: 1px solid rgba(226, 232, 240, 0.5);
  box-shadow: var(--shadow-lg);
}

.preview-card::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: calc(var(--radius-2xl) + 8px);
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  opacity: 0.15;
  filter: blur(20px);
  z-index: -1;
  animation: pulse-glow 4s infinite;
}

.preview-dots {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.preview-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.preview-dots span:nth-child(1) { background: #f87171; }
.preview-dots span:nth-child(2) { background: #fbbf24; }
.preview-dots span:nth-child(3) { background: #34d399; }

.preview-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: var(--c-bg-alt);
  margin-bottom: 0.75rem;
  transition: background 0.2s;
}

.preview-item:hover {
  background: var(--c-primary-light);
}

.preview-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.preview-icon svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
}

.preview-item-text .title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--c-text);
  transition: color 0.2s;
}

.preview-item:hover .preview-item-text .title {
  color: var(--c-primary);
}

.preview-item-text .subtitle {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
}

.preview-arrow {
  margin-left: auto;
  width: 20px;
  height: 20px;
  stroke: var(--c-text-dim);
  transition: stroke 0.2s, transform 0.2s;
}

.preview-item:hover .preview-arrow {
  stroke: var(--c-primary);
  transform: translateX(4px);
}

/* ========= Section ========= */
.section {
  padding: 6rem 0;
  position: relative;
}

.section--alt {
  background: var(--c-bg-alt);
}

.section-label {
  display: inline-block;
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  background: var(--c-primary-light);
  color: var(--c-primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--c-text-secondary);
  max-width: 600px;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header .section-desc {
  margin: 0 auto;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--c-primary);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: gap 0.2s;
}

.section-link:hover {
  gap: 0.75rem;
}

.section-link svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* ========= Game Cards ========= */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.game-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
  background-size: cover;
  background-position: center;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  transition: background 0.3s;
}

.game-card:hover::before {
  background: rgba(0, 0, 0, 0.2);
}

.game-card .platform {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.25rem;
  position: relative;
}

.game-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
  position: relative;
}

.game-card .genre {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.8);
  position: relative;
}

.game-card .arrow-circle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}

.game-card:hover .arrow-circle {
  opacity: 1;
  transform: translateY(0);
}

.game-card .arrow-circle svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
}

/* Game card fallback backgrounds (overridden by inline background-image) */
.game-card--pubg { background-color: #1a1205; }
.game-card--warzone { background-color: #0f1419; }
.game-card--fc25 { background-color: #021a0f; }
.game-card--fivem { background-color: #1a0808; }
.game-card--valorant { background-color: #1a0508; }
.game-card--cs2 { background-color: #1a1005; }
.game-card--fortnite { background-color: #021220; }
.game-card--apex { background-color: #1a0505; }
.game-card--rust { background-color: #140d05; }
.game-card--minecraft { background-color: #041a0a; }
.game-card--lol { background-color: #1a1405; }
.game-card--rocket { background-color: #021030; }

/* ========= Filter Bar ========= */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-full);
  background: var(--c-bg);
  color: var(--c-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.filter-btn.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-full);
  background: var(--c-bg);
  min-width: 200px;
}

.filter-search svg {
  width: 16px;
  height: 16px;
  stroke: var(--c-text-muted);
  flex-shrink: 0;
}

.filter-search input {
  border: none;
  background: none;
  outline: none;
  font-size: 0.85rem;
  color: var(--c-text);
  width: 100%;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--c-text-muted);
  font-size: 1.1rem;
}

/* ========= Article Cards ========= */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.article-card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bg-alt);
}

.article-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card-thumb .gradient-bg {
  position: absolute;
  inset: 0;
}

.article-card-thumb .letter {
  font-size: 5rem;
  font-weight: 700;
  opacity: 0.2;
  position: relative;
}

.article-card-thumb .badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.3rem 0.625rem;
  border-radius: var(--radius-sm);
  color: #fff;
}

.badge--settings { background: #6366f1; }
.badge--guide { background: #F59E0B; }
.badge--tutorial { background: #10B981; }
.badge--review { background: #EC4899; }

.article-card-body {
  padding: 1.5rem;
}

.article-card-game {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  margin-bottom: 0.75rem;
}

.article-card-game svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.article-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  color: var(--c-text);
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card:hover h3 {
  color: var(--c-primary);
}

.article-card-desc {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.article-card-footer time {
  font-size: 0.8125rem;
  color: var(--c-text-dim);
}

.read-more {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--c-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.2s;
}

.read-more:hover {
  gap: 0.5rem;
}

/* ========= Search Overlay ========= */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: grid;
  place-items: start center;
  padding-top: 15vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.search-box {
  width: 90%;
  max-width: 560px;
  background: var(--c-bg);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.2s;
}

.search-overlay.open .search-box {
  transform: translateY(0) scale(1);
}

.search-box-input {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--c-border-light);
}

.search-box-input svg {
  width: 20px;
  height: 20px;
  stroke: var(--c-text-muted);
  flex-shrink: 0;
}

.search-box-input input {
  flex: 1;
  font-size: 1.125rem;
}

.search-box-input input::placeholder {
  color: var(--c-text-dim);
}

.search-hints {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--c-text-dim);
}

.search-hints kbd {
  padding: 0.15rem 0.4rem;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border-light);
  border-radius: 0.25rem;
  font-size: 0.6875rem;
}

/* ========= Search Results ========= */
.search-results {
  max-height: 320px;
  overflow-y: auto;
  margin-top: 1rem;
  border-top: 1px solid var(--c-border-light);
  padding-top: 0.75rem;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.5rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--c-text);
  transition: background 0.15s;
}

.search-result:hover {
  background: var(--c-bg-alt);
}

.search-result-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--c-bg-alt);
}

.search-result-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--c-primary);
}

.search-result-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.search-result-title {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  text-transform: capitalize;
}

.search-empty {
  text-align: center;
  padding: 1.5rem 0.5rem;
  color: var(--c-text-muted);
  font-size: 0.9rem;
}

/* ========= Community Section ========= */
.community-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-primary);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  stroke: #fff;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

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

/* ========= CTA Section ========= */
.cta {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  border-radius: var(--radius-2xl);
  padding: 4rem 3rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: rotate-bg 20s linear infinite;
}

@keyframes rotate-bg {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cta h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
}

.cta p {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto 2rem;
  position: relative;
}

.cta .btn {
  position: relative;
  background: #fff;
  color: var(--c-primary);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.cta .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ========= Reduced Motion ========= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .floating-particles { display: none; }
}
