/* ============================================= */
/* Baji Live Saudi Arabia - Static CSS v1.0     */
/* Optimized for SEO & Core Web Vitals          */
/* ============================================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Tajawal:wght@400;500;700;800;900&display=swap');

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

:root {
  /* Baji Brand Colors */
  --background: hsl(240, 10%, 8%);
  --foreground: hsl(0, 0%, 98%);
  --card: hsl(240, 10%, 12%);
  --card-foreground: hsl(0, 0%, 98%);
  --primary: hsl(340, 82%, 52%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(45, 100%, 50%);
  --secondary-foreground: hsl(240, 10%, 8%);
  --muted: hsl(240, 10%, 18%);
  --muted-foreground: hsl(240, 5%, 65%);
  --accent: hsl(45, 100%, 50%);
  --border: hsl(240, 10%, 20%);
  --baji-pink: hsl(340, 82%, 52%);
  --baji-pink-glow: hsl(340, 82%, 62%);
  --baji-gold: hsl(45, 100%, 50%);
  --baji-gold-dark: hsl(45, 100%, 40%);
  --baji-dark: hsl(240, 10%, 8%);
  --baji-darker: hsl(240, 10%, 4%);
  --radius: 0.75rem;
}

html {
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

/* Gradients */
.text-gradient-gold {
  background: linear-gradient(135deg, var(--baji-gold), hsl(35, 100%, 45%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-pink {
  background: linear-gradient(135deg, var(--baji-pink), hsl(320, 82%, 45%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-gold {
  background: linear-gradient(135deg, var(--baji-gold), hsl(35, 100%, 45%));
}

.bg-gradient-pink {
  background: linear-gradient(135deg, var(--baji-pink), hsl(320, 82%, 45%));
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(to left, var(--baji-pink), var(--baji-pink), var(--baji-gold));
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

@media (min-width: 768px) {
  .header-inner {
    height: 5rem;
  }
}

.header-logo img {
  height: 3.5rem;
  width: auto;
  transition: transform 0.3s, filter 0.3s;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
}

.header-logo:hover img {
  transform: scale(1.1);
  filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.8));
}

.header-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .header-nav {
    display: flex;
  }
}

.header-nav a {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s, background-color 0.2s;
  border-radius: 0.375rem;
  letter-spacing: 0.05em;
}

.header-nav a:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

.header-cta {
  display: none;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .header-cta {
    display: flex;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
}

.btn-outline:hover {
  background: #fff;
  color: var(--baji-pink);
}

.btn-gold {
  background: linear-gradient(135deg, var(--baji-gold), hsl(35, 100%, 45%));
  color: var(--baji-dark);
  font-weight: 700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.btn-pink {
  background: linear-gradient(135deg, var(--baji-pink), hsl(320, 82%, 45%));
  color: #fff;
  font-weight: 700;
}

.btn-pink:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 105, 180, 0.4);
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: flex;
  padding: 0.5rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu {
  display: none;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

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

.mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  border-radius: 0.375rem;
}

.mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 5rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, 
    rgba(10, 10, 15, 0.8) 0%, 
    rgba(10, 10, 15, 0.4) 50%, 
    rgba(10, 10, 15, 1) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 56rem;
  padding: 0 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 215, 0, 0.2);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.hero-badge span {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--baji-gold);
  letter-spacing: 0.05em;
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 4.5rem;
  }
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 6rem;
  }
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 42rem;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.25rem;
  }
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .hero-cta {
    flex-direction: row;
    justify-content: center;
  }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 42rem;
  margin: 0 auto 1.5rem;
}

@media (min-width: 768px) {
  .hero-stats {
    gap: 2rem;
  }
}

.hero-stat {
  text-align: center;
  padding: 1rem;
  background: rgba(26, 26, 36, 0.3);
  backdrop-filter: blur(4px);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.hero-stat-value {
  font-family: 'Tajawal', sans-serif;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--baji-gold);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

@media (min-width: 768px) {
  .hero-stat-value {
    font-size: 2.25rem;
  }
}

.hero-stat-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .hero-stat-label {
    font-size: 0.875rem;
  }
}

/* Sections */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-dark {
  background-color: var(--baji-darker);
}

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

.section-title h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .section-title h2 {
    font-size: 3rem;
  }
}

.section-title p {
  color: var(--muted-foreground);
  font-size: 1.125rem;
  max-width: 42rem;
  margin: 0 auto;
}

/* Game Cards Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .games-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.game-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.5s;
}

.game-card:hover {
  transform: scale(1.05);
  z-index: 10;
}

.game-card-image {
  aspect-ratio: 4/5;
  position: relative;
  overflow: hidden;
}

.game-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.game-card:hover .game-card-image img {
  transform: scale(1.1);
}

.game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--baji-darker) 0%, rgba(10, 10, 15, 0.6) 50%, transparent 100%);
}

.game-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
}

.game-card-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--baji-gold);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.game-card-title {
  font-size: 1.5rem;
  color: var(--foreground);
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.game-card:hover .game-card-title {
  color: var(--baji-gold);
}

.game-card-desc {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  opacity: 0;
  transition: opacity 0.3s;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card:hover .game-card-desc {
  opacity: 1;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.3s, transform 0.3s;
}

.blog-card:hover {
  border-color: rgba(255, 215, 0, 0.5);
  transform: translateY(-4px);
}

.blog-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.1);
}

.blog-card-content {
  padding: 1rem;
}

.blog-card-category {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--baji-pink);
}

.blog-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--foreground);
  margin: 0.5rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s;
}

.blog-card:hover .blog-card-title {
  color: var(--baji-gold);
}

.blog-card-excerpt {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Footer */
.footer {
  background: linear-gradient(to left, var(--baji-pink), var(--baji-pink), var(--baji-gold));
  padding: 4rem 0 2rem;
}

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

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand img {
  height: 4rem;
  width: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 28rem;
  margin-bottom: 1rem;
}

.footer-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.footer-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
}

.footer-title {
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}

.footer-links a:hover {
  color: #fff;
  transform: translateX(-4px);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 2rem;
}

.footer-social a {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background-color 0.3s, color 0.3s;
}

.footer-social a:hover {
  background: #fff;
  color: var(--baji-pink);
}

.footer-disclaimer {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-disclaimer p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  line-height: 1.7;
  text-align: center;
  max-width: 56rem;
  margin: 0 auto 0.75rem;
}

.footer-copyright {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-copyright p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

.footer-copyright p:last-child {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.5rem;
}

/* FAQ Section */
.faq-section {
  padding: 5rem 0;
  background-color: var(--baji-darker);
}

.faq-list {
  max-width: 48rem;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: right;
  background: none;
  border: none;
  color: var(--foreground);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--baji-gold);
}

.faq-question svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 0 1.25rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--baji-gold);
  color: var(--baji-dark);
  border-color: var(--baji-gold);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  padding: 0 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Loading States */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 0;
  gap: 0.75rem;
  color: var(--muted-foreground);
}

.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border);
  border-top-color: var(--baji-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error State */
.error-state {
  text-align: center;
  padding: 5rem 0;
}

.error-state p {
  font-size: 1.25rem;
  color: var(--muted-foreground);
}

/* Live Ticker */
.live-ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: linear-gradient(to left, var(--baji-pink), var(--baji-gold));
  padding: 0.75rem 0;
  overflow: hidden;
}

.live-ticker-inner {
  display: flex;
  gap: 3rem;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}

.live-ticker-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--baji-dark);
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Utility Classes */
.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

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

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

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.6s ease-out;
}

/* Noscript fallback styles */
noscript .noscript-content {
  display: block;
}

/* Category emoji badges */
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 215, 0, 0.2);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--baji-gold);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  padding: 1rem 0;
}

.breadcrumbs a {
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--baji-gold);
}

.breadcrumbs span {
  color: var(--foreground);
}

/* Jump to page input */
.jump-to-page {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.jump-to-page input {
  width: 4rem;
  padding: 0.5rem;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 0.875rem;
}

.jump-to-page input:focus {
  outline: none;
  border-color: var(--baji-gold);
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .hero-cta-link {
    width: 100%;
    justify-content: center;
  }
  
  .footer-grid {
    text-align: center;
  }
  
  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .footer-brand p {
    text-align: center;
  }
  
  .footer-features {
    justify-content: center;
  }
  
  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .footer-links li {
    margin-bottom: 0;
  }
  
  .footer-social {
    justify-content: center;
  }
}
