/* Mobile-first critical CSS for Glitchify WRLD */
/* This file contains only the most essential styles for mobile performance */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Nunito', 'Comic Sans MS', cursive, sans-serif;
  background: linear-gradient(black, rgb(50,50,50));
  color: silver;
  margin: 0;
  -webkit-overflow-scrolling: touch;
  min-height: 100vh;
  line-height: 1.4;
  background-size: contain;
  background-position: center;
  background-repeat: repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Font loading states */
body.fonts-loading {
  font-family: 'Comic Sans MS', cursive, sans-serif;
}

body.fonts-loaded {
  font-family: 'Nunito', 'Comic Sans MS', cursive, sans-serif;
}

body.fonts-fallback {
  font-family: 'Comic Sans MS', cursive, sans-serif;
}

/* Import local fonts */
@import url('fonts.css');

/* Comic-style font system */
:root {
  --font-comic-heading: 'Fredoka One', 'Comic Sans MS', cursive, sans-serif;
  --font-comic-body: 'Nunito', 'Comic Sans MS', cursive, sans-serif;
  --font-comic-fallback: 'Comic Sans MS', cursive, sans-serif;
}

/* Comic-style typography */
h1, h2, h3, h4, h5, h6, .comic-heading {
  font-family: var(--font-comic-heading);
  font-weight: 400;
  letter-spacing: 0.5px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.comic-text {
  font-family: var(--font-comic-body);
  font-weight: 600;
}

.comic-bold {
  font-family: var(--font-comic-body);
  font-weight: 800;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #000;
  background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                    url('images/rdr2-logo.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 2px solid grey;
  padding: 0.5rem 1rem;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.navbar-brand {
  color: grey;
  font-weight: bold;
  text-decoration: none;
  font-size: 1.2rem;
  text-shadow: 1px 0 2px black;
}

.navbar-toggler {
  border: 2px solid grey;
  border-radius: 8px;
  background: #181818;
  padding: 0.25rem 0.5rem;
  box-shadow: 0 2px 8px rgba(220,38,38,0.10);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.navbar-toggler:focus, .navbar-toggler:hover {
  border-color: #ff2222;
  box-shadow: 0 4px 16px rgba(220,38,38,0.18);
}

/* Main content */
main {
  margin-top: 110px;
  text-align: center;
}

/* Hero section - mobile optimized */
#hero {
  text-align: center;
  padding: 2rem 1rem;
  color: #fff;
  background: linear-gradient(rgba(0,0,0,0.8), rgba(50,50,50,0.8));
  border-radius: 15px;
  margin: 20px;
  border-top: 4.5px solid grey;
  border-top-left-radius: 32px;
  border-top-right-radius: 32px;
  border-left: 2px solid grey;
  border-right: 2px solid grey;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  box-shadow: 0 -2px 12px rgba(229,57,53,0.08), 0 10px 30px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(59, 130, 246, 0.1) 50%, transparent 70%);
  pointer-events: none;
}

#hero h1 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  line-height: 1.2;
  position: relative;
  z-index: 2;
}

#hero h1 strong {
  color: greenyellow;
}

#hero h1 span {
  color: grey;
}

#hero p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: #ccc;
  max-width: 100%;
  position: relative;
  z-index: 2;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-bottom: 2rem;
}

.hero-btn {
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  background: #111;
  color: #fff;
  border: 2px solid grey;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 280px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
}

.hero-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.3s ease;
}

.hero-btn:hover::before {
  left: 100%;
}

.hero-btn:hover {
  transform: scale(1.02);
  background: #181818;
  border-color: white;
  color: #fff;
  box-shadow: 0 6px 18px rgba(59,130,246,0.2), 0 2px 8px rgba(0,0,0,0.3);
}

/* Game cards - mobile optimized */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.game-card {
  background: #181818;
  border: 2px solid grey;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
  position: relative;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(59, 130, 246, 0.1) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

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

.game-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2), 0 4px 12px rgba(0,0,0,0.3);
  border-color: #3b82f6;
}

.game-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.game-info {
  padding: 0.8rem;
  background: linear-gradient(180deg, #1a1a1a, #0f0f0f);
}

.game-info h3 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #fff;
  font-weight: 600;
}

.platform, .download-btn {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  margin-right: 0.3rem;
  color: #fff;
  background: #111;
  border: 1.5px solid grey;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.platform.pc { border-color: #18701b; }
.platform.ps4 { border-color: #0d7fb4; }
.platform.ps3 { border-color: #9416aa; }
.platform.ps2 { border-color: rgb(175,25,5); }
.platform.xbox { border-color: #18701b; }

.download-btn:hover, .platform:hover {
  background: #181818;
  color: #fff;
  border-color: white;
  box-shadow: 0 4px 12px rgba(220,38,38,0.2);
  transform: scale(1.04);
}

/* Featured showcase - mobile optimized */
.featured-showcase {
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(0,0,0,0.9), rgba(20,20,20,0.95));
  border-radius: 20px;
  margin: 1rem;
  position: relative;
  overflow: hidden;
}

.featured-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(220, 38, 38, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.showcase-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.showcase-header h1 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, #fff, #3b82f6, #dc2626);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.showcase-subtitle {
  font-size: 1rem;
  color: #ccc;
  margin-bottom: 1rem;
}

.showcase-mobile {
  display: block;
  position: relative;
  z-index: 2;
}

/* Mobile featured games grid - no carousel */
.mobile-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 0 1rem;
}

.mobile-card {
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #333;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  position: relative;
}

.mobile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(59, 130, 246, 0.1) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.mobile-card:hover::before {
  opacity: 1;
}

.mobile-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: #3b82f6;
  box-shadow: 0 12px 25px rgba(59, 130, 246, 0.2), 0 4px 12px rgba(0,0,0,0.3);
}

.mobile-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.mobile-info {
  padding: 1.2rem;
  background: linear-gradient(180deg, #1a1a1a, #0f0f0f);
}

.mobile-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.platform-badge {
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.75rem;
  text-transform: uppercase;
  transition: all 0.3s ease;
  transform: rotate(-90deg);
  transform-origin: center center;
}

.platform-badge.pc { 
  background: linear-gradient(45deg, #3b82f6, #1d4ed8); 
  color: #fff; 
}
.platform-badge.ps4 { 
  background: linear-gradient(45deg, #0066cc, #003d7a); 
  color: #fff; 
}
.platform-badge.ps3 { 
  background: linear-gradient(45deg, #003d7a, #001a3d); 
  color: #fff; 
}
.platform-badge.ps2 { 
  background: linear-gradient(45deg, #000080, #000040); 
  color: #fff; 
}
.platform-badge.xbox { 
  background: linear-gradient(45deg, #107c10, #0a5a0a); 
  color: #fff; 
}

.platform-badge:hover {
  transform: rotate(-90deg) scale(1.1) translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.rating {
  color: #ffd700;
  font-weight: bold;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.rating:hover {
  transform: scale(1.1);
  text-shadow: 0 0 10px #ffd700;
}

.mobile-info h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #fff;
  font-weight: 600;
  transition: all 0.3s ease;
}

.mobile-card:hover .mobile-info h4 {
  transform: scale(1.02);
  text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.mobile-info p {
  color: #ccc;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
  transition: all 0.3s ease;
}

.mobile-card:hover .mobile-info p {
  color: #fff;
  transform: translateY(-2px);
}

.mobile-download {
  background: linear-gradient(45deg, #3b82f6, #dc2626);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  display: block;
  text-align: center;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.mobile-download::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.3s ease;
}

.mobile-download:hover::before {
  left: 100%;
}

.mobile-download:hover {
  background: linear-gradient(45deg, #2563eb, #b91c1c);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
  color: #fff;
}

/* Trust section - mobile optimized */
#trust {
  padding: 2rem 1rem;
  text-align: center;
  background: #181818;
  border: 2px solid grey;
  border-radius: 14px;
  margin: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
}

#trust h2 {
  color: grey;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 8px rgba(220,38,38,0.3);
  letter-spacing: 1px;
}

.trust-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.trust-list > div {
  background: #222;
  border: 2px solid grey;
  border-radius: 12px;
  color: #fff;
  font-weight: bold;
  padding: 1rem 0.8rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.trust-list > div:hover {
  transform: translateY(-5px) scale(1.04);
  background: #181818;
  border-color: grey;
  box-shadow: 0 6px 18px rgba(220,38,38,0.18), 0 2px 8px rgba(0,0,0,0.3);
}

.trust-list h3 {
  color: #fff;
  margin: 0.5rem 0 0.2rem 0;
  font-size: 1rem;
}

.trust-list p {
  color: #fff;
  font-size: 0.8rem;
}

/* Footer - mobile optimized */
footer {
  background: #000;
  background-image: linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)), 
                    url('images/rdr2-footer.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #aaa;
  margin-top: 2rem;
  border-top: 4px solid grey;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  overflow: hidden;
}

.footer-title {
  color: grey;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-shadow: 0 0 15px rgba(220,38,38,0.5);
  letter-spacing: 2px;
}

.footer-links {
  margin-bottom: 1rem;
}

.footer-links a {
  margin: 0 0.5rem;
  font-weight: bold;
  color: #00ffee;
  text-decoration: none;
  transition: color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.footer-links a:hover {
  color: grey;
  border-bottom-color: grey;
  text-shadow: 0 0 8px rgba(220,38,38,0.5);
}

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

.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 2px solid #333;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.social a:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
  border-color: grey;
}

.social a[title="Youtube"]:hover {
  color: grey;
  background: rgba(220,38,38,0.1);
}

.social a[title="Telegram"]:hover {
  color: rgb(0, 119, 255);
  background: rgba(0,119,255,0.1);
}

.social a[title="Whatsapp"]:hover {
  color: rgb(8, 196, 8);
  background: rgba(8,196,8,0.1);
}

.social a[title="Instagram"]:hover {
  color: rgb(255, 53, 255);
  background: rgba(255,53,255,0.1);
}

/* Additional mobile styling improvements */
.hero-desc {
  background: #181818;
  color: #fff;
  border: 2px solid grey;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 auto 1.5rem auto;
  max-width: 480px;
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  text-align: center;
}

.hero-desc p {
  margin: 0;
  color: #fff;
  background: none !important;
}

/* Time display container */
#time-display-container {
  color: #cccccc;
  font-family: 'Arial', 'Roboto', sans-serif;
  font-size: 0.9em;
  text-align: center;
  padding: 8px 0;
  background-color: #1a1a1a;
  border-bottom: 1px solid grey;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  letter-spacing: 0.5px;
  top: 42px;
  position: fixed;
  width: 100%;
  z-index: 1;
  border-top-color: 1px solid greenyellow;
  display: none;
}

/* Notification button */
#notification-btn {
  border: 2px solid #dc2626;
  background: rgba(0, 0, 0, 0.3);
  color: #dc2626;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 1.1rem;
}

#notification-btn:hover {
  background: #dc2626;
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

#notification-count {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Offcanvas styling */
.offcanvas.offcanvas-end {
  border-left: 4px solid grey;
  border-top-left-radius: 22px;
  border-bottom-left-radius: 22px;
  background: #000 !important;
  box-shadow: -4px 0 18px rgba(220,38,38,0.08), -2px 0 8px rgba(0,0,0,0.3);
  z-index: 9999;
  width: 320px;
  max-width: 90vw;
}

.offcanvas .offcanvas-title,
.offcanvas .navbar-nav .nav-link,
.offcanvas .dropdown-menu .dropdown-item {
  font-weight: 700 !important;
  font-size: 1.08em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  letter-spacing: 0.02em;
}

.offcanvas .navbar-nav .nav-link,
.offcanvas .dropdown-menu .dropdown-item {
  color: grey !important;
}

.offcanvas .navbar-nav .nav-link.active,
.offcanvas .navbar-nav .nav-link:focus,
.offcanvas .navbar-nav .nav-link:hover {
  color: #fff !important;
  text-shadow: 0 2px 6px rgba(220,38,38,0.5);
}

.offcanvas .btn[type="submit"] {
  background: black;
  color: grey;
  border: 2px solid grey;
  border-radius: 7px;
  font-weight: bold;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(220,38,38,0.08);
}

.offcanvas .btn[type="submit"]:hover {
  background: grey;
  color: #fff;
  border-color: #fff;
  box-shadow: 0 4px 12px rgba(220,38,38,0.18);
}

.offcanvas .form-control[type="search"] {
  background: black;
  color: #fff;
  border: 2px solid grey;
  border-radius: 7px;
  font-weight: 500;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(220,38,38,0.08);
}

.offcanvas .form-control[type="search"]:focus {
  background: black;
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 2px grey;
}

.offcanvas .form-control[type="search"]::placeholder {
  color: #fff !important;
  opacity: 1;
}

/* Glitchify buttons in offcanvas */
.glitchify-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 2px solid grey;
  background: #111;
  color: #fff;
  font-weight: bold;
  border-radius: 8px;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.22s ease;
  box-shadow: 0 2px 8px rgba(220,38,38,0.08);
  outline: none;
  cursor: pointer;
}

.glitchify-btn:hover {
  background: grey;
  color: #fff;
  transform: scale(1.04);
  box-shadow: 0 4px 18px rgba(220,38,38,0.18);
  border-color: #fff;
}

/* Close button styling */
.btn-close, .btn-close-white {
  background: #ff0000 !important;
  background-color: #ff0000 !important;
  background-image: none !important;
  border: 2px solid #fff !important;
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  position: relative !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
  z-index: 1000 !important;
  overflow: visible !important;
  cursor: pointer !important;
  opacity: 1 !important;
  filter: none !important;
  color: transparent !important;
}

.btn-close:hover, .btn-close:focus,
.btn-close-white:hover, .btn-close-white:focus {
  background: #cc0000 !important;
  background-color: #cc0000 !important;
  background-image: none !important;
  transform: scale(1.15) !important;
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.3) !important;
  opacity: 1 !important;
  filter: none !important;
}

/* HR styling */
hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, grey, transparent);
  margin: 2rem 0;
}

/* H5 styling for donation text */
h5 {
  color: #fff;
  font-size: 1.1rem;
  margin: 1rem 0;
  text-align: center;
  font-weight: bold;
}

/* Popular searches styling */
.popular-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
}

.popular-label {
  color: #ccc;
  font-size: 0.9rem;
}

.popular-tag {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
  border-radius: 15px;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.2);
}

.popular-tag:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
  color: #fff;
}

/* How-to section */
#how-to {
  padding: 2rem 1rem;
  background: #181818;
  border: 2px solid grey;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
  margin: 2rem auto;
  max-width: 700px;
}

#how-to h2 {
  text-align: center;
  margin-bottom: 1rem;
  color: grey;
  font-size: 1.5rem;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(220,38,38,0.3);
}

#how-to ol {
  max-width: 600px;
  margin: 0 auto;
  padding-left: 1.2rem;
  color: #fff;
  font-size: 1.08rem;
}

#how-to li {
  margin-bottom: 0.8rem;
  position: relative;
  padding-left: 1.5em;
}

#how-to li::marker {
  color: grey;
  font-weight: bold;
  font-size: 1.2em;
}

/* Contact section */
#contact {
  padding: 2rem 1rem;
  background: #181818;
  border: 2px solid grey;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
  margin: 2rem auto 1.5rem auto;
  max-width: 700px;
  text-align: center;
}

#contact h2 {
  color: grey;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(220,38,38,0.3);
}

#contact p {
  margin-bottom: 1rem;
  color: #fff;
  font-weight: bold;
}

#contact a {
  color: #0ff;
  text-decoration: none;
}

#contact a:hover {
  color: #fff;
  text-shadow: 0 0 8px rgba(0,255,255,0.5);
}

/* Mobile featured games grid - no carousel needed */

/* Showcase footer */
.showcase-footer {
  text-align: center;
  margin-top: 2rem;
  position: relative;
  z-index: 2;
}

.view-all-btn {
  background: linear-gradient(45deg, #3b82f6, #dc2626);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.view-all-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.3s ease;
}

.view-all-btn:hover::before {
  left: 100%;
}

.view-all-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 35px rgba(59, 130, 246, 0.5);
  color: #fff;
}

/* Featured tags */
.featured-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tag {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
  transition: left 0.3s ease;
}

.tag:hover::before {
  left: 100%;
}

.tag:hover {
  transform: translateY(-2px) scale(1.05);
  background: rgba(59, 130, 246, 0.3);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}

/* Featured meta */
.featured-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.year {
  color: #ccc;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.year:hover {
  color: #fff;
  transform: translateY(-1px);
}

/* Featured download button */
.featured-download-btn {
  background: linear-gradient(45deg, #3b82f6, #dc2626);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  position: relative;
  overflow: hidden;
}

.featured-download-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.3s ease;
}

.featured-download-btn:hover::before {
  left: 100%;
}

.featured-download-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 35px rgba(59, 130, 246, 0.5);
  color: #fff;
}

/* Featured badge */
.featured-badge {
  background: linear-gradient(45deg, #3b82f6, #dc2626);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  align-self: flex-start;
  transition: all 0.3s ease;
}

.featured-badge:hover {
  transform: scale(1.1) rotate(2deg);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

/* Featured actions */
.featured-actions {
  display: flex;
  gap: 1rem;
  align-self: flex-end;
}

.play-btn, .info-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.play-btn::before, .info-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.play-btn:hover::before, .info-btn:hover::before {
  width: 100%;
  height: 100%;
}

.play-btn:hover, .info-btn:hover {
  background: rgba(59, 130, 246, 0.8);
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Donate button styling */
.donate-btn {
  padding: 13px 32px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  border: 2px solid grey;
  font-weight: bold;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
  transition: all 0.22s cubic-bezier(.4,2,.3,1);
  outline: none;
  cursor: pointer;
  margin: 0.5rem 0;
}

.donate-btn:hover, .donate-btn:focus {
  background: #181818;
  color: #fff;
  border-color: grey;
  box-shadow: 0 6px 18px rgba(220,38,38,0.18), 0 2px 8px rgba(0,0,0,0.3);
  transform: scale(1.025);
}

/* Library and Public Domain buttons */
.library-btn, .public-domain-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 13px 32px;
  background: #111;
  color: #fff;
  font-weight: bold;
  border: 2px solid grey;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
  transition: all 0.22s cubic-bezier(.4,2,.3,1);
  outline: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.public-domain-btn {
  margin-left: 15px;
  border-color: #22c55e;
}

.library-btn:hover, .library-btn:focus,
.public-domain-btn:hover, .public-domain-btn:focus {
  background: #181818;
  color: #fff;
  border-color: grey;
  box-shadow: 0 6px 18px rgba(220,38,38,0.18), 0 2px 8px rgba(0,0,0,0.3);
  transform: scale(1.025);
}

.public-domain-btn:hover, .public-domain-btn:focus {
  border-color: #22c55e;
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.2), 0 2px 8px rgba(0,0,0,0.3);
}

/* Search section styling */
#quick-search {
  padding: 2rem 1rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(50,50,50,0.7));
  border-radius: 15px;
  margin: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}

#quick-search h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

#quick-search p {
  color: #ccc;
  margin-bottom: 1.5rem;
}

.search-input-group {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.18);
  background: #181818;
  border: 2px solid grey;
  min-width: 280px;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  outline: none;
  font-size: 1rem;
  background: #181818;
  color: #fff;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  min-width: 0;
}

.search-input:focus {
  background: #222;
  color: #fff;
  box-shadow: 0 0 0 2px grey;
}

.search-btn {
  padding: 12px 16px;
  background: #111;
  border: none;
  color: grey;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.2s ease;
  border-left: 2px solid grey;
  flex-shrink: 0;
}

.search-btn:hover, .search-btn:focus {
  background: #181818;
  color: #fff;
  box-shadow: 0 4px 12px rgba(220,38,38,0.18);
  transform: scale(1.04);
}

/* Responsive breakpoints */
@media (min-width: 480px) {
  #hero h1 { font-size: 2rem; }
  .hero-buttons { flex-direction: row; }
  .hero-btn { width: auto; max-width: 200px; }
  .games-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

@media (min-width: 768px) {
  #hero { padding: 3rem 2rem; }
  #hero h1 { font-size: 2.5rem; }
  .games-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .trust-list { grid-template-columns: repeat(3, 1fr); }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .hero-btn, .game-card, .mobile-card {
    border-width: 3px;
  }
}
