@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap');

:root {
  --bg-dark: #120907;
  --bg-crimson: #2A0D0B;
  --bg-card: #1E120E;
  --bg-card-hover: #291813;
  --wood-border: #4A2E1B;
  --gold-primary: #FFB703;
  --gold-glow: rgba(255, 183, 3, 0.4);
  --crimson-accent: #800E13;
  --red-nepal: #D90429;
  --cream-text: #FDF0D5;
  --muted-text: #C3B091;
  --green-online: #38B000;
  --font-pixel: 'Press Start 2P', monospace, cursive;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --border-radius: 6px;
  --shadow-pixel: 0 4px 0 #000;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--cream-text);
  overflow-x: hidden;
}

body {
  background: radial-gradient(circle at 50% 0%, var(--bg-crimson) 0%, var(--bg-dark) 80%);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
}

/* Background canvas and ambient elements */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* Prayer Flags Banner */
.prayer-flags {
  display: flex;
  height: 14px;
  width: 100%;
  position: relative;
  z-index: 101;
  overflow: hidden;
  background: #000;
}
.flag-pattern {
  display: flex;
  width: 100%;
}
.flag {
  flex: 1;
  height: 100%;
  transform: skewX(-20deg);
}
.flag.blue { background-color: #005f73; }
.flag.white { background-color: #e9d8a6; }
.flag.red { background-color: #ae2012; }
.flag.green { background-color: #2a9d8f; }
.flag.yellow { background-color: #ee9b00; }

/* Sticky Navbar */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(18, 9, 7, 0.92);
  border-bottom: 3px solid var(--gold-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--gold-primary);
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0px #000;
}

.brand-logo img {
  height: 40px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  image-rendering: pixelated;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  list-style: none;
}

.nav-menu a {
  color: var(--cream-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--gold-primary);
  background: rgba(255, 183, 3, 0.1);
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 12px;
  right: 12px;
  height: 3px;
  background: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-primary);
}

.play-now-btn {
  background: linear-gradient(180deg, #FFB703 0%, #D99A24 100%) !important;
  color: #000 !important;
  font-family: var(--font-pixel) !important;
  font-size: 0.7rem !important;
  padding: 10px 18px !important;
  border: 2px solid #FFF !important;
  box-shadow: 0 4px 0 #7A5300;
  transform: translateY(-2px);
}
.play-now-btn:hover {
  transform: translateY(0) !important;
  box-shadow: 0 2px 0 #7A5300 !important;
  filter: brightness(1.1);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
}
.mobile-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--gold-primary);
  border-radius: 2px;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 80px 0 100px;
  text-align: center;
  overflow: hidden;
  border-bottom: 4px solid var(--wood-border);
}

.clouds-bg {
  position: absolute;
  top: 10%;
  left: 0;
  width: 200%;
  height: 120px;
  background: url("data:image/svg+xml,%3Csvg width='100' height='40' viewBox='0 0 100 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 30 h80 v-10 h-10 v-10 h-20 v-5 h-20 v5 h-20 v10 h-10 z' fill='rgba(255,255,255,0.05)'/%3E%3C/svg%3E") repeat-x;
  animation: floatClouds 60s linear infinite;
  pointer-events: none;
}
@keyframes floatClouds {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.hero-badge {
  display: inline-block;
  background: rgba(217, 4, 41, 0.2);
  border: 1px solid var(--red-nepal);
  color: #FFAAA6;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.hero h1 {
  font-family: var(--font-pixel);
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: var(--gold-primary);
  text-shadow: 4px 4px 0 #000, -2px -2px 0 #3A1F04;
  margin-bottom: 15px;
  line-height: 1.2;
}

.subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--cream-text);
  max-width: 750px;
  margin: 0 auto 35px;
  font-weight: 600;
  text-shadow: 1px 1px 2px #000;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* Button Styles */
.btn-primary, .btn-secondary, .btn-accent {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  padding: 14px 24px;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  border: 2px solid #FFF;
  box-shadow: 0 5px 0 #000;
  position: relative;
}

.btn-primary {
  background: var(--gold-primary);
  color: #120907;
  box-shadow: 0 5px 0 #8C6200;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #8C6200;
  background: #FFC300;
}
.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #8C6200;
}

.btn-secondary {
  background: #4A0E17;
  color: var(--cream-text);
  box-shadow: 0 5px 0 #200408;
}
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #200408;
  background: #60141F;
}

.btn-accent {
  background: #1D4E89;
  color: #FFF;
  box-shadow: 0 5px 0 #0F2B4C;
}
.btn-accent:hover {
  background: #2460A7;
}

/* Live Server Status Section */
.status-section {
  margin-top: -30px;
  margin-bottom: 60px;
}

.status-card {
  background: linear-gradient(135deg, rgba(30, 18, 14, 0.95), rgba(42, 13, 11, 0.95));
  border: 3px solid var(--gold-primary);
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7), inset 0 0 15px rgba(255, 183, 3, 0.1);
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 20px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 0.8rem;
}

.online-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green-online);
  box-shadow: 0 0 10px var(--green-online);
  animation: pulse 2s infinite;
}
.offline-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red-nepal);
  box-shadow: 0 0 10px var(--red-nepal);
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 176, 0, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(56, 176, 0, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 176, 0, 0); }
}

.status-info {
  text-align: center;
}
.status-info h3 {
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--gold-primary);
  margin-bottom: 5px;
}
.player-count-display {
  font-size: 1.2rem;
  font-weight: 700;
  color: #FFF;
}

.status-details {
  text-align: right;
  font-size: 0.85rem;
  color: var(--muted-text);
  line-height: 1.4;
}

/* Connection Dashboard */
.connection-box {
  background: var(--bg-card);
  border: 2px solid var(--wood-border);
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 60px;
  box-shadow: var(--shadow-pixel);
}

.connection-title {
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  color: var(--gold-primary);
  margin-bottom: 20px;
  text-align: center;
}

.ip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.ip-card {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,183,3,0.2);
  padding: 18px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ip-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  font-size: 0.9rem;
  color: var(--cream-text);
}

.ip-value {
  font-family: monospace;
  background: #000;
  padding: 8px 12px;
  border-radius: 4px;
  color: var(--gold-primary);
  font-size: 1rem;
  border: 1px dashed var(--wood-border);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--gold-primary);
  color: #000;
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  padding: 14px 24px;
  border-radius: 4px;
  border: 2px solid #FFF;
  box-shadow: 0 10px 25px rgba(0,0,0,0.8);
  transform: translateY(150px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 9999;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* General Section Headings */
.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 45px;
}

.section-title h2 {
  font-family: var(--font-pixel);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--gold-primary);
  text-shadow: 3px 3px 0 #000;
  margin-bottom: 10px;
}

.section-title p {
  color: var(--muted-text);
  font-size: 1rem;
}

/* Store Currency Selector */
.currency-selector-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 35px;
  background: var(--bg-card);
  padding: 12px 20px;
  border: 2px solid var(--wood-border);
  border-radius: 6px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.currency-buttons {
  display: flex;
  gap: 10px;
}
.currency-btn {
  background: #000;
  color: var(--cream-text);
  border: 1px solid var(--wood-border);
  padding: 6px 14px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.2s;
  font-size: 0.85rem;
}
.currency-btn.active, .currency-btn:hover {
  background: var(--gold-primary);
  color: #000;
  border-color: #FFF;
}

.armor-tag {
  font-size: 0.75rem;
  color: var(--muted-text);
  margin-bottom: 10px;
  font-weight: bold;
}

.tier-tag {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.tier-tag.common { background: #555; color: #FFF; }
.tier-tag.uncommon { background: #2a9d8f; color: #FFF; }
.tier-tag.rare { background: #0077b6; color: #FFF; }
.tier-tag.epic { background: #7209b7; color: #FFF; }
.tier-tag.legendary { background: #d90429; color: #FFF; }
.tier-tag.special { background: #ffb703; color: #000; font-weight: bold; }

/* Store Cards Grid */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.store-card {
  background: var(--bg-card);
  border: 2px solid var(--wood-border);
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 0.3s;
}

.store-card.featured {
  border-color: var(--gold-primary);
  box-shadow: 0 0 20px rgba(255, 183, 3, 0.2);
  position: relative;
}

.badge-pop {
  position: absolute;
  top: -12px;
  right: 15px;
  background: var(--red-nepal);
  color: #FFF;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  padding: 4px 8px;
  border-radius: 4px;
}

.store-card h3 {
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  color: var(--gold-primary);
  margin: 15px 0 10px;
}

.store-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFF;
  margin-bottom: 15px;
}

.store-features {
  list-style: none;
  text-align: left;
  margin: 15px 0 25px;
  font-size: 0.85rem;
  color: var(--muted-text);
}

.store-features li {
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.store-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--gold-primary);
  font-weight: bold;
}

/* Payment Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-content {
  background: var(--bg-card);
  border: 3px solid var(--gold-primary);
  padding: 30px;
  border-radius: 8px;
  max-width: 480px;
  width: 90%;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.9);
}
.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: #FFF;
  font-size: 1.5rem;
  cursor: pointer;
}
.payment-methods {
  display: flex;
  gap: 15px;
  margin: 20px 0;
}
.pay-btn {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--wood-border);
  background: #000;
  color: #FFF;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
}
.pay-btn.esewa { border-color: #60BB46; color: #60BB46; }
.pay-btn.khalti { border-color: #5C2D91; color: #AA65EC; }
.pay-btn.active { background: rgba(255,255,255,0.1); border-width: 3px; }

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.feature-card {
  background: var(--bg-card);
  border: 2px solid var(--wood-border);
  padding: 30px 25px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: var(--gold-primary);
  opacity: 0;
  transition: 0.3s;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold-primary);
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

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

.feature-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 183, 3, 0.1);
  border: 1px solid var(--gold-primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--gold-primary);
}

.feature-card h3 {
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  color: var(--cream-text);
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--muted-text);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Team Section Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.team-card {
  background: var(--bg-card);
  border: 2px solid var(--wood-border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: 0.3s;
}

.team-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-4px);
}

.avatar-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  background: #000;
  border: 2px solid var(--gold-primary);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-wrapper img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}

.team-card h3 {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: #FFF;
  margin-bottom: 5px;
}

.team-role {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border: 2px solid var(--wood-border);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 15px;
  background: linear-gradient(0deg, rgba(0,0,0,0.9), transparent);
  font-size: 0.85rem;
  font-weight: 600;
  color: #FFF;
}

/* Footer */
.footer {
  background: #0B0504;
  border-top: 3px solid var(--wood-border);
  padding: 60px 0 30px;
  color: var(--muted-text);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .brand-logo {
  margin-bottom: 15px;
}

.footer-brand .brand-logo img {
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.footer-links h4 {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: var(--gold-primary);
  margin-bottom: 18px;
}

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

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--muted-text);
  text-decoration: none;
  transition: 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 25px;
  text-align: center;
  font-size: 0.8rem;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border-bottom: 3px solid var(--gold-primary);
    flex-direction: column;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.9);
  }
  .nav-menu.show {
    display: flex;
  }
  .mobile-toggle {
    display: flex;
  }
  .status-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .status-details {
    text-align: center;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-primary, .btn-secondary, .btn-accent {
    width: 100%;
  }
}