/* ============================================================
   MatrixForges.info — Main Stylesheet
   ============================================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-dark:     #0d0d1a;
  --bg-card:     #13132a;
  --bg-section:  #0f0f22;
  --accent:      #7c3aed;
  --accent-light:#a78bfa;
  --accent-glow: rgba(124,58,237,0.35);
  --text-main:   #e2e8f0;
  --text-muted:  #94a3b8;
  --border:      rgba(124,58,237,0.25);
  --radius:      10px;
  --shadow:      0 4px 24px rgba(0,0,0,0.5);
  --transition:  0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.7;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { color: var(--text-main); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---- Utility ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-section); }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

.section-header { margin-bottom: 3rem; }
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p { color: var(--text-muted); max-width: 600px; }
.section-header.text-center p { margin: 0 auto; }

.badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #6d28d9;
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--accent-light);
  border: 2px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}
.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.85rem; }

/* ---- Navigation ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(13,13,26,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 68px;
  display: flex;
  align-items: center;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent-light); }
.nav-logo img { width: 36px; height: 36px; border-radius: 6px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(124,58,237,0.15);
}

.nav-cta { margin-left: 0.5rem; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.4rem;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile nav */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: rgba(13,13,26,0.98);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 0.15rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.65rem 1rem; display: block; }
  .nav-cta { margin-left: 0; margin-top: 0.5rem; width: 100%; text-align: center; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 68px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('img/hero.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(0.35);
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,13,26,0.85) 0%, rgba(124,58,237,0.15) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}
.hero-content h1 { margin-bottom: 1.25rem; }
.hero-content h1 span { color: var(--accent-light); }
.hero-content p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 540px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.hero-stat strong { display: block; font-size: 1.75rem; color: var(--accent-light); }
.hero-stat span { font-size: 0.85rem; color: var(--text-muted); }

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--accent-glow);
}
.card-img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.5rem; }
.card-body h3 { margin-bottom: 0.5rem; }
.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.card-meta .tag {
  background: rgba(124,58,237,0.2);
  color: var(--accent-light);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.card-rating { display: flex; align-items: center; gap: 0.4rem; margin-top: 1rem; }
.stars { color: #f59e0b; letter-spacing: 0.05em; }
.rating-num { font-weight: 700; font-size: 1rem; }

/* ---- Grid layouts ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ---- Featured review ---- */
.featured-review {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.featured-review img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.featured-review-body { padding: 2.5rem; }
.featured-review-body h2 { margin-bottom: 1rem; }
.featured-review-body p { color: var(--text-muted); margin-bottom: 1.5rem; }
@media (max-width: 768px) {
  .featured-review { grid-template-columns: 1fr; }
  .featured-review img { min-height: 220px; }
}

/* ---- Tournament table ---- */
.tournament-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.tournament-table th {
  background: rgba(124,58,237,0.2);
  color: var(--accent-light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.85rem 1.25rem;
  text-align: left;
}
.tournament-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}
.tournament-table tr:last-child td { border-bottom: none; }
.tournament-table tr:hover td { background: rgba(124,58,237,0.06); }
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-live { background: rgba(239,68,68,0.2); color: #f87171; }
.status-upcoming { background: rgba(245,158,11,0.2); color: #fbbf24; }
.status-completed { background: rgba(34,197,94,0.2); color: #4ade80; }

/* ---- About section ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-grid img { border-radius: var(--radius); width: 100%; }
.about-text h2 { margin-bottom: 1.25rem; }
.about-text p { color: var(--text-muted); margin-bottom: 1rem; }
.about-features { list-style: none; margin-top: 1.5rem; }
.about-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  color: var(--text-muted);
}
.about-features li::before {
  content: "✓";
  color: var(--accent-light);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }

/* ---- Newsletter ---- */
.newsletter-box {
  background: linear-gradient(135deg, rgba(124,58,237,0.2) 0%, rgba(13,13,26,0.9) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3.5rem 2rem;
  text-align: center;
}
.newsletter-box h2 { margin-bottom: 0.75rem; }
.newsletter-box p { color: var(--text-muted); margin-bottom: 2rem; }
.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 0;
}
.newsletter-form input {
  flex: 1;
  padding: 0.8rem 1.25rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition);
}
.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form button {
  border-radius: 0 var(--radius) var(--radius) 0;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { border-right: 1px solid var(--border); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0; }
  .newsletter-form button { border-radius: 0 0 var(--radius) var(--radius); }
}
.newsletter-success {
  display: none;
  color: #4ade80;
  font-weight: 600;
  margin-top: 1rem;
  font-size: 0.95rem;
}

/* ---- Contact form ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
}
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info h3 { margin-bottom: 1.25rem; }
.contact-info p { color: var(--text-muted); margin-bottom: 1.5rem; }
.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.contact-detail-icon {
  width: 40px; height: 40px;
  background: rgba(124,58,237,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.contact-detail-text strong { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.15rem; }
.contact-detail-text span { font-size: 0.95rem; }

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); background: rgba(124,58,237,0.07); }
.form-group textarea { resize: vertical; min-height: 130px; }
.form-group select option { background: #1a1a2e; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-success {
  display: none;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: #4ade80;
  font-weight: 600;
  margin-top: 1rem;
}

/* ---- Page hero (inner pages) ---- */
.page-hero {
  padding: 7rem 0 3.5rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(124,58,237,0.12) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { margin-bottom: 0.75rem; }
.page-hero p { color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-light); }
.breadcrumb span { color: var(--text-muted); }

/* ---- Review detail ---- */
.review-detail-header { margin-bottom: 2rem; }
.review-detail-header h1 { margin-bottom: 0.75rem; }
.review-detail-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}
.review-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-light);
  flex-shrink: 0;
}
.review-score-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.75rem;
  margin-bottom: 2rem;
}
.review-score-wrap p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.review-score-wrap strong { display: block; font-size: 1rem; color: #fff; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.tab-btn {
  padding: 0.7rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
}
.tab-btn:hover { color: #fff; }
.tab-btn.active { color: var(--accent-light); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- Pros/Cons ---- */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1.5rem 0; }
@media (max-width: 600px) { .pros-cons { grid-template-columns: 1fr; } }
.pros-box, .cons-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.pros-box { border-top: 3px solid #4ade80; }
.cons-box { border-top: 3px solid #f87171; }
.pros-box h4 { color: #4ade80; margin-bottom: 0.75rem; }
.cons-box h4 { color: #f87171; margin-bottom: 0.75rem; }
.pros-box ul, .cons-box ul { list-style: none; }
.pros-box li, .cons-box li {
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
}
.pros-box li::before { content: "+"; color: #4ade80; font-weight: 700; }
.cons-box li::before { content: "−"; color: #f87171; font-weight: 700; }

/* ---- Sidebar ---- */
.content-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 900px) { .content-sidebar { grid-template-columns: 1fr; } }
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-widget h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-list { list-style: none; }
.sidebar-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { color: var(--text-main); }
.sidebar-list a:hover { color: var(--accent-light); }

/* ---- Footer ---- */
.footer {
  background: #080812;
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.75rem; max-width: 280px; }
.footer-col h5 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--text-muted); font-size: 0.88rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent-light); }

/* ---- Cookie Banner ---- */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: #13132a;
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
}
.cookie-banner p { font-size: 0.88rem; color: var(--text-muted); margin: 0; flex: 1; min-width: 200px; }
.cookie-banner p a { color: var(--accent-light); }
.cookie-actions { display: flex; gap: 0.75rem; flex-shrink: 0; }

/* ---- Policy pages ---- */
.policy-content { max-width: 800px; margin: 0 auto; }
.policy-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.4rem; }
.policy-content h3 { margin-top: 1.75rem; margin-bottom: 0.75rem; font-size: 1.1rem; color: var(--accent-light); }
.policy-content p { color: var(--text-muted); margin-bottom: 1rem; }
.policy-content ul { list-style: disc; padding-left: 1.5rem; color: var(--text-muted); margin-bottom: 1rem; }
.policy-content ul li { margin-bottom: 0.4rem; }
.policy-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 0.88rem; }
.policy-content table th { background: rgba(124,58,237,0.15); color: var(--accent-light); padding: 0.7rem 1rem; text-align: left; }
.policy-content table td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-muted); }

/* ---- Scroll to top ---- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 500;
  width: 44px; height: 44px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.scroll-top:hover { background: #6d28d9; transform: translateY(-3px); }
.scroll-top.visible { display: flex; }

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.55s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
