/* ============================================================================
   Bootstrap Overrides & Modern Custom Design
   ============================================================================ */

:root {
  --color-primary: #FF3B3B;
  --color-background: #0A0A0A;
  --color-secondary-bg: #1A1A1A;
  --color-tertiary-bg: #242424;
  --color-accent: #FF3B3B;
  --bs-primary: #FF3B3B;
  --bs-body-bg: #0A0A0A;
  --bs-body-color: #E5E7EB;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.6);
  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.5rem;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--color-background);
  color: var(--bs-body-color);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  padding-top: 70px;
  scroll-behavior: smooth;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 3.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

p {
  margin-bottom: 1.25rem;
}

/* ============================================================================
   LAYOUT & SPACING
   ============================================================================ */

.container {
  max-width: 1400px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

main {
  min-height: calc(100vh - 70px);
}

section {
  padding: 4rem 0;
}

@media (max-width: 768px) {
  section {
    padding: 2.5rem 0;
  }
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero-section {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 600px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--color-background) 0%, rgba(10, 10, 10, 0.7) 50%, transparent 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero-section .display-1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
  margin-bottom: 1.5rem;
}

.hero-section p {
  font-size: clamp(1.125rem, 3vw, 1.75rem);
  color: #D1D5DB;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  margin-bottom: 2rem;
}

/* ============================================================================
   GAME DETAILS HERO
   ============================================================================ */

.game-details-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  height: 50vh;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
}

.game-details-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--color-background) 0%, transparent 100%);
}

/* ============================================================================
   NAVBAR
   ============================================================================ */

.navbar {
  background: rgba(0, 0, 0, 0.8) !important;
  backdrop-filter: blur(10px);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid rgba(255, 59, 59, 0.05);
  padding: 0.75rem 0 !important;
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.95) !important;
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.02);
}

.navbar-brand span {
  color: #fff;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 0.5rem 1rem !important;
  position: relative;
}

.nav-link:hover {
  color: var(--color-primary) !important;
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
  border-radius: var(--radius-lg);
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-transform: uppercase;
  font-size: 0.95rem;
}

.btn-primary,
.btn-danger {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(255, 59, 59, 0.3);
}

.btn-primary:hover,
.btn-danger:hover {
  background-color: #ff5252 !important;
  border-color: #ff5252 !important;
  box-shadow: 0 8px 20px rgba(255, 59, 59, 0.5);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 0.875rem 2.5rem !important;
  border-radius: var(--radius-lg);
  font-size: 1rem;
}

/* ============================================================================
   GLOBAL SEARCH
   ============================================================================ */

.global-search-wrap {
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 59, 59, 0.1);
  padding: 1.25rem 0;
}

.global-search-container {
  width: 100%;
  max-width: 400px;
  position: relative;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  background: transparent;
  border: none;
  color: #9CA3AF;
  padding: 0.65rem 0.85rem;
  transition: color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

#global-search-input {
  background: rgba(26, 26, 26, 0.85);
  border: 1.5px solid rgba(255, 59, 59, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  color: #E5E7EB;
  flex: 1;
  width: 100%;
}

#global-search-input::placeholder {
  color: #666;
}

#global-search-input:focus {
  background: rgba(26, 26, 26, 0.95);
  border-color: rgba(255, 59, 59, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 59, 59, 0.1), inset 0 0 8px rgba(255, 59, 59, 0.05);
  outline: none;
}

#global-search-input:not(:placeholder-shown) {
  border-color: rgba(255, 59, 59, 0.4);
}

#global-search-input:focus ~ .search-icon {
  color: var(--color-primary);
  transform: scale(1.1);
}

/* Search results */
.search-results-wrapper {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.75rem;
  z-index: 2000;
}

.search-results-list {
  background: rgba(10, 10, 10, 0.97);
  border: 1px solid rgba(255, 59, 59, 0.25);
  border-radius: var(--radius-md);
  max-height: 55vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(8px);
}

.search-results-list .list-group-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem;
  color: #E5E7EB;
  transition: all 0.2s ease;
  cursor: pointer;
}

.search-results-list .list-group-item:last-child {
  border-bottom: none;
}

.search-results-list .list-group-item:hover {
  background-color: rgba(255, 59, 59, 0.15);
  padding-left: 1.25rem;
}

.search-results-list strong {
  color: var(--color-primary);
  font-weight: 700;
  display: block;
  margin-bottom: 0.35rem;
}

.search-results-list small {
  color: #9CA3AF;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ============================================================================
   CARDS - MODERN UNIFIED DESIGN
   ============================================================================ */

.card {
  background: var(--color-secondary-bg);
  border: 1px solid rgba(255, 59, 59, 0.1);
  border-radius: var(--radius-xl);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 59, 59, 0.3);
  box-shadow: var(--shadow-xl);
}

/* Modern News/Game Cards */
.modern-card {
  position: relative;
}

/* News Card Styles */
.modern-card-img {
  height: 220px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  width: 100%;
}

.modern-card:hover .modern-card-img {
  transform: scale(1.08);
}

.card-body {
  padding: 1.75rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.modern-card-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #FF3B3B;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.modern-card:hover .modern-card-title {
  color: #ff5252;
}

.modern-card-date {
  font-size: 0.9rem;
  color: #9CA3AF;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.modern-card-summary {
  color: #D1D5DB;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modern-card-cta {
  color: #E5E7EB;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.modern-card:hover .modern-card-cta {
  color: var(--color-primary);
}

.modern-card:hover .modern-card-cta span {
  transform: translateX(4px);
}

/* Game Card Styles */
.modern-game-card {
  cursor: pointer;
  overflow: visible;
}

.modern-game-card-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modern-game-card:hover .modern-game-card-img {
  transform: scale(1.1) rotate(0.5deg);
}

.modern-game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(255, 59, 59, 0.15) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.25rem 1.75rem;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-radius: var(--radius-xl);
}

.modern-game-card:hover .modern-game-card-overlay {
  opacity: 1;
}

.modern-game-card-title {
  font-size: 1.65rem;
  font-weight: 900;
  color: #FF3B3B;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.modern-game-card-desc {
  color: #E5E7EB;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modern-game-card-link {
  color: #FF3B3B;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.modern-game-card-link:hover {
  color: #ff5252;
}

.modern-game-card-link:hover span {
  transform: translateX(4px);
}

/* ============================================================================
   ARTICLE GRID
   ============================================================================ */

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

@media (max-width: 768px) {
  .article-grid,
  .game-grid {
    gap: 1.5rem;
  }
}

/* ============================================================================
   FORM CONTROLS
   ============================================================================ */

.form-control {
  background-color: var(--color-tertiary-bg);
  border: 1.5px solid rgba(255, 59, 59, 0.2);
  border-radius: var(--radius-md);
  color: #E5E7EB;
  padding: 0.875rem 1.125rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control::placeholder {
  color: #666;
}

.form-control:focus {
  background-color: var(--color-tertiary-bg);
  border-color: var(--color-primary);
  color: #E5E7EB;
  box-shadow: 0 0 0 3px rgba(255, 59, 59, 0.15);
  outline: none;
}

.form-control:hover {
  border-color: rgba(255, 59, 59, 0.3);
}

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

/* ============================================================================
   FOOTER
   ============================================================================ */

footer {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(15, 15, 15, 0.95) 100%);
  border-top: 1px solid rgba(255, 59, 59, 0.1);
  margin-top: 4rem;
  padding: 4rem 0 2rem 0;
}

.footer-link {
  color: #9CA3AF;
  transition: all 0.3s ease;
  text-decoration: none;
  font-weight: 500;
}

.footer-link:hover {
  color: var(--color-primary);
  transform: translateX(4px);
}

.footer-social-link {
  color: #9CA3AF;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem;
  border-radius: var(--radius-md);
}

.footer-social-link:hover {
  color: var(--color-primary) !important;
  transform: translateY(-3px);
  background: rgba(255, 59, 59, 0.1);
}

footer h4 {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
  color: #fff;
}

/* ============================================================================
   LOADING ANIMATION
   ============================================================================ */

.loading-animation {
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================================================
   REVEAL ANIMATIONS
   ============================================================================ */

.reveal-on-load {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
}

.reveal-on-load.visible {
  opacity: 1;
  transform: none;
  transition: opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
}

.reveal-on-scroll.visible {
  opacity: 1;
  transform: none;
  transition: opacity 800ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-entry {
  opacity: 0;
  transform: translateY(25px) scale(0.98);
}

.hero-entry.visible {
  opacity: 1;
  transform: none;
  transition: opacity 900ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-shadow-lg {
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
}

.z-0 { z-index: 0; }
.z-3 { z-index: 3; }

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.bg-hero-image {
  background-image: url('/Assets/Images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 768px) {
  body {
    padding-top: 65px;
  }

  .navbar {
    padding: 0.5rem 0 !important;
  }

  .navbar-brand {
    font-size: 1.35rem;
  }

  .nav-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem !important;
  }

  .hero-section {
    min-height: 500px;
  }

  section {
    padding: 2.5rem 0;
  }

  .card {
    border-radius: var(--radius-lg);
  }

  .modern-card-img {
    height: 180px;
  }

  .modern-game-card-img {
    height: 240px;
  }

  .card-body {
    padding: 1.5rem;
  }

  .modern-card-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .btn-lg {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9rem;
  }

  .article-grid,
  .game-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  footer {
    margin-top: 2.5rem;
    padding: 2.5rem 0 1.5rem 0;
  }
}