/* ==========================================
   MatchZone — Free Match-3 & Puzzle Games
   Complete Responsive Stylesheet
   ========================================== */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #E94560;
  --secondary: #0F3460;
  --accent: #FFD700;
  --bg: #1A1A2E;
  --card-bg: #16213E;
  --text: #EAEAEA;
  --light: #F5F5F5;
  --gem-ruby: #E94560;
  --gem-sapphire: #0F3460;
  --gem-emerald: #2ECC71;
  --gem-topaz: #F39C12;
  --gem-amethyst: #9B59B6;
  --gem-diamond: #3498DB;
  --shadow: rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--light);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: rgba(234, 234, 234, 0.85);
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(22, 33, 62, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(233, 69, 96, 0.2);
  padding: 0.75rem 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Nunito', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 0.25rem 0;
  font-size: 0.95rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  width: 100%;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: var(--light);
  border-radius: 3px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 999;
  padding-top: 80px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--light);
  padding: 0.5rem 1rem;
}

.mobile-menu a:hover {
  color: var(--primary);
}

/* ---------- Hero Section ---------- */
.hero {
  padding: 10rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--secondary) 0%, var(--bg) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(233, 69, 96, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: rgba(234, 234, 234, 0.8);
  margin-bottom: 2rem;
  font-weight: 500;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Gem Decorations */
.gem-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.gem {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  transform: rotate(45deg);
  animation: float 3s ease-in-out infinite;
}

.gem:nth-child(1) { background: linear-gradient(135deg, var(--gem-ruby), #ff7b8a); animation-delay: 0s; }
.gem:nth-child(2) { background: linear-gradient(135deg, var(--gem-sapphire), #1a5aa8); animation-delay: 0.2s; }
.gem:nth-child(3) { background: linear-gradient(135deg, var(--gem-emerald), #58d68d); animation-delay: 0.4s; }
.gem:nth-child(4) { background: linear-gradient(135deg, var(--gem-topaz), #f7b500); animation-delay: 0.6s; }
.gem:nth-child(5) { background: linear-gradient(135deg, var(--gem-amethyst), #c39bd3); animation-delay: 0.8s; }
.gem:nth-child(6) { background: linear-gradient(135deg, var(--gem-diamond), #5dade2); animation-delay: 1s; }

@keyframes float {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(-10px); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #ff6b7a);
  color: white;
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(233, 69, 96, 0.5);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--light);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #ffed4a);
  color: var(--bg);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.4);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* ---------- Cards Grid ---------- */
.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  margin-bottom: 0.5rem;
}

.section-title p {
  color: rgba(234, 234, 234, 0.7);
  font-size: 1.1rem;
}

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

.cards-grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* ---------- Game Card ---------- */
.game-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(233, 69, 96, 0.1);
  position: relative;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(233, 69, 96, 0.2);
  border-color: var(--primary);
}

.game-card-image {
  height: 160px;
  background: linear-gradient(135deg, var(--secondary), var(--bg));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.game-card-image .game-icon {
  font-size: 3rem;
  z-index: 1;
}

.game-card-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--card-bg));
}

.category-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.category-badge.match3 { background: var(--gem-ruby); }
.category-badge.puzzle { background: var(--gem-sapphire); }
.category-badge.arcade { background: var(--gem-emerald); }
.category-badge.strategy { background: var(--gem-topaz); }
.category-badge.casual { background: var(--gem-amethyst); }

.game-card-content {
  padding: 1.25rem;
}

.game-card-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.game-card-content p {
  font-size: 0.875rem;
  color: rgba(234, 234, 234, 0.7);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.game-card .btn {
  width: 100%;
}

/* ---------- Article Card ---------- */
.article-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(255, 215, 0, 0.1);
}

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

.article-card-image {
  height: 180px;
  overflow: hidden;
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.article-card:hover .article-card-image img {
  transform: scale(1.05);
}

.article-card-content {
  padding: 1.25rem;
}

.article-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: rgba(234, 234, 234, 0.6);
}

.article-category {
  color: var(--accent);
  font-weight: 600;
}

.article-card-content h3 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  line-height: 1.3;
}

.article-card-content h3 a:hover {
  color: var(--accent);
}

.article-card-content p {
  font-size: 0.875rem;
  color: rgba(234, 234, 234, 0.7);
  margin-bottom: 1rem;
}

/* ---------- Filter Tabs ---------- */
.filter-tabs {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding: 0.5rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(233, 69, 96, 0.1);
}

.filter-tab {
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}

.filter-tab:hover {
  background: rgba(233, 69, 96, 0.1);
  color: var(--primary);
}

.filter-tab.active {
  background: var(--primary);
  color: white;
}

/* ---------- Why Choose Us ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid rgba(233, 69, 96, 0.1);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(233, 69, 96, 0.15);
  border-color: var(--primary);
}

.feature-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.feature-card h3 {
  margin-bottom: 0.75rem;
  color: var(--light);
}

.feature-card p {
  font-size: 0.9rem;
  color: rgba(234, 234, 234, 0.7);
  margin: 0;
}

/* ---------- Stats ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

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

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.stat-label {
  color: rgba(234, 234, 234, 0.7);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid rgba(233, 69, 96, 0.1);
  overflow: hidden;
}

.faq-question {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--light);
  transition: var(--transition);
}

.faq-question:hover {
  background: rgba(233, 69, 96, 0.05);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
  transition: var(--transition);
}

.faq-item.active .faq-question::after {
  content: '−';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-content {
  padding: 0 1.5rem 1.25rem;
  color: rgba(234, 234, 234, 0.8);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--light);
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg);
  border: 2px solid rgba(233, 69, 96, 0.2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

.form-control::placeholder {
  color: rgba(234, 234, 234, 0.5);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* ---------- Contact Page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid rgba(233, 69, 96, 0.1);
}

.contact-info h3 {
  margin-bottom: 1.5rem;
  color: var(--light);
}

.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.contact-icon {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--light);
}

.contact-item p {
  font-size: 0.9rem;
  color: rgba(234, 234, 234, 0.7);
  margin: 0;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-link {
  width: 45px;
  height: 45px;
  background: var(--bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: var(--transition);
  border: 1px solid rgba(233, 69, 96, 0.2);
}

.social-link:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

/* ---------- Page Header ---------- */
.page-header {
  padding: 8rem 0 4rem;
  text-align: center;
  background: linear-gradient(180deg, var(--secondary) 0%, var(--bg) 100%);
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(233, 69, 96, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.page-header h1 {
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto;
  color: rgba(234, 234, 234, 0.8);
}

/* ---------- Table of Contents ---------- */
.toc {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  border: 1px solid rgba(233, 69, 96, 0.1);
}

.toc h4 {
  margin-bottom: 1rem;
  color: var(--light);
  font-size: 1.1rem;
}

.toc ol {
  counter-reset: toc-counter;
}

.toc li {
  counter-increment: toc-counter;
  margin-bottom: 0.5rem;
  padding-left: 2rem;
  position: relative;
}

.toc li::before {
  content: counter(toc-counter) ".";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 600;
}

.toc a {
  color: rgba(234, 234, 234, 0.8);
  font-size: 0.95rem;
}

.toc a:hover {
  color: var(--primary);
}

/* ---------- Legal Pages ---------- */
.legal-content {
  background: var(--card-bg);
  padding: 3rem;
  border-radius: var(--radius);
  border: 1px solid rgba(233, 69, 96, 0.1);
  margin-bottom: 3rem;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--light);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(233, 69, 96, 0.2);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  color: rgba(234, 234, 234, 0.85);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal-content ul {
  margin: 1rem 0 1.5rem 1.5rem;
}

.legal-content li {
  color: rgba(234, 234, 234, 0.85);
  line-height: 1.8;
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.legal-content li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* ---------- 404 Page ---------- */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

.error-content {
  position: relative;
}

.error-gems {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.error-gems .gem {
  width: 60px;
  height: 60px;
}

.error-content h1 {
  font-size: 6rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.error-content h2 {
  margin-bottom: 1rem;
  color: var(--light);
}

.error-content p {
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--card-bg);
  border-top: 1px solid rgba(233, 69, 96, 0.2);
  padding: 4rem 0 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-about .logo {
  margin-bottom: 1rem;
}

.footer-about p {
  font-size: 0.9rem;
  color: rgba(234, 234, 234, 0.7);
  line-height: 1.7;
}

.footer h4 {
  color: var(--light);
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

.footer-links a {
  display: block;
  color: rgba(234, 234, 234, 0.7);
  padding: 0.375rem 0;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(233, 69, 96, 0.1);
  padding: 1.5rem 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.875rem;
  color: rgba(234, 234, 234, 0.6);
  margin: 0;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hero {
    padding: 8rem 0 4rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-about {
    max-width: 100%;
  }
  
  .footer-links a:hover {
    padding-left: 0;
  }
  
  .filter-tabs {
    gap: 0.5rem;
  }
  
  .filter-tab {
    padding: 0.5rem 0.875rem;
    font-size: 0.85rem;
  }
  
  .legal-content {
    padding: 1.5rem;
  }
  
  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .gem {
    width: 40px;
    height: 40px;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
  }
  
  .error-content h1 {
    font-size: 4rem;
  }
  
  .stats-row {
    grid-template-columns: 1fr;
  }
}

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

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ---------- Game Sections ---------- */
.game-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 30px;
  margin: 20px 0;
  border: 1px solid rgba(233, 69, 96, 0.2);
}

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 20px 0;
  margin-bottom: 20px;
}
.filter-btn {
  background: var(--card-bg);
  color: var(--text);
  border: 2px solid var(--primary);
  padding: 8px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: white;
}

/* ---------- Games Grid ---------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  padding: 20px 0;
}
.game-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 25px;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.game-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(233, 69, 96, 0.2);
}
.game-icon { font-size: 3rem; }
.game-card h3 { font-size: 1.2rem; color: var(--light); }
.game-card p { color: #aaa; font-size: 0.9rem; }

/* ---------- Articles Grid ---------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  padding: 20px 0;
}
.article-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
  border: 2px solid transparent;
}
.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.article-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.article-card-body h3 { font-size: 1rem; color: var(--light); }

/* ---------- Page Header ---------- */
.page-header {
  background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
  padding: 60px 0 40px;
  text-align: center;
  border-bottom: 3px solid var(--primary);
}
.page-header h1 {
  font-size: 2.5rem;
  color: var(--light);
  margin: 10px 0;
}
.page-header .lead {
  font-size: 1.15rem;
  color: #aaa;
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Widgets ---------- */
.widget {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 215, 0, 0.2);
}
.widget h3 {
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}
.widget ul { list-style: none; padding: 0; }
.widget ul li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.widget ul li:last-child { border: none; }
.widget a { color: #aaa; transition: color 0.3s; }
.widget a:hover { color: var(--primary); }

/* ---------- FAQ ---------- */
.faq-item {
  background: rgba(233, 69, 96, 0.1);
  border-left: 3px solid var(--primary);
  padding: 15px 20px;
  margin: 12px 0;
  border-radius: 0 8px 8px 0;
}
.faq-item h3 { font-size: 1rem; color: var(--primary); margin-bottom: 8px; }
.faq-item p { color: #ccc; font-size: 0.95rem; }

/* ---------- Lead Paragraph ---------- */
.lead { font-size: 1.15rem; color: #bbb; line-height: 1.7; margin: 15px 0; }

/* ---------- Buttons ---------- */
.btn-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s;
}
.btn-link:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  padding: 40px 0;
}
.footer-col h4 {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 15px;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { padding: 6px 0; }
.footer-col ul li a { color: #aaa; }
.footer-col ul li a:hover { color: var(--primary); }
.footer-col p { color: #aaa; line-height: 1.6; }
.footer-bottom {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #666;
  font-size: 0.9rem;
}

/* ---------- Mobile Menu ---------- */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 5px;
}

/* ---------- Content Grid ---------- */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-menu-btn { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--card-bg);
    padding: 20px;
    border-top: 2px solid var(--primary);
    z-index: 999;
  }
  .nav-links.active { display: flex; }
  .navbar .container { flex-wrap: wrap; position: relative; }
}

/* ---------- Main Content ---------- */
.main-content { min-width: 0; }
.sidebar { min-width: 0; }
.article-content h2 {
  color: var(--primary);
  font-size: 1.5rem;
  margin: 25px 0 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(233,69,96,0.3);
}
.article-content p { color: #ccc; line-height: 1.8; margin: 12px 0; }
.article-content img { border-radius: 12px; margin: 15px 0; }

/* ---------- TOC List ---------- */
.toc-list { list-style: none; padding: 0; }
.toc-list li { padding: 4px 0; }
.toc-list a { color: var(--accent); font-size: 0.9rem; }

/* ---------- Article Meta ---------- */
.article-meta { display: flex; gap: 20px; justify-content: center; color: #aaa; font-size: 0.9rem; }
.article-header { background: linear-gradient(135deg, #16213e, #0f3460); }

/* ---------- Article Footer ---------- */
.article-footer {
  background: rgba(255,215,0,0.1);
  border-radius: 12px;
  padding: 25px;
  margin-top: 30px;
}
.article-footer h3 { color: var(--accent); margin: 15px 0 10px; font-size: 1.1rem; }
.article-footer ul { list-style: none; padding: 0; }
.article-footer ul li { padding: 5px 0; }
.article-footer a { color: var(--primary); }
.article-footer a:hover { color: var(--accent); }
