/* ============================================
   NeoSlime Webstore - Main Stylesheet
   Modern, Dark Theme with Green Accents
   ============================================ */

/* CSS Variables */
:root {
  --primary: #00ff88;
  --primary-dark: #00cc6a;
  --primary-glow: rgba(0, 255, 136, 0.3);
  --secondary: #6c5ce7;
  --background: #0a0a0f;
  --background-light: #12121a;
  --background-card: #1a1a24;
  --background-card-hover: #22222e;
  --text: #ffffff;
  --text-muted: #a0a0b0;
  --text-dark: #6a6a7a;
  --border: #2a2a3a;
  --success: #00ff88;
  --warning: #ffcc00;
  --error: #ff4757;
  --text-primary: #000000;
  --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);

  /* VIP Colors */
  --bronze: #cd7f32;
  --silver: #c0c0c0;
  --gold: #ffd700;
  --diamond: #00d4ff;

  --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--primary-glow);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 16px;
  --radius-sm: 8px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

/* Layout: make footer behave consistently across pages
   - Use flex column so footer is pushed to bottom when content is short
   - Ensure `main` grows to fill available space */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
  /* ensure content isn't hidden under the fixed navbar */
  padding-top: calc(var(--navbar-height, 72px) + 12px);
}

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

ul {
  list-style: none;
}

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

.container {
  /* Responsive container: scale between 720px and 1200px, with viewport fallback */
  max-width: clamp(720px, 92vw, 1200px);
  margin: 0 auto;
  padding: 0 min(4vw, 28px);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 15px 0;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition:
    padding 220ms ease,
    background 220ms ease,
    height 220ms ease;
}

/* Responsive navbar height exposed as CSS variable so overlays can align */
.navbar {
  --navbar-height: clamp(56px, 7vh, 76px);
}

.navbar.scrolled {
  padding: 10px 0;
  background: rgba(10, 10, 15, 0.98);
}

.navbar.scrolled {
  --navbar-height: clamp(48px, 6vh, 64px);
}

.nav-container {
  max-width: clamp(720px, 92vw, 1200px);
  margin: 0 auto;
  padding: 0 min(4vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
}

.logo i {
  color: var(--primary);
  font-size: 1.8rem;
}

.logo .highlight {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 5px 0;
}

.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,
.nav-links a.active {
  color: var(--text);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--background-card);
  color: var(--text);
  font-size: 1.1rem;
  transition: var(--transition);
}

.cart-btn:hover {
  background: var(--primary);
  color: var(--background);
  transform: scale(1.05);
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--error);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: var(--background);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--background);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

/* Contact form styles */
.contact-form {
  margin-top: 18px;
}
.contact-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--background-card);
  color: var(--text);
  margin-bottom: 12px;
}
.contact-form textarea {
  min-height: 140px;
}
.contact-form .btn {
  margin-right: 12px;
}

/* Reusable page section wrapper to avoid inline styles in templates */
.page-content {
  padding: 40px 16px;
  max-width: 860px;
  margin: 0 auto;
}

/* Store support note */
.store-support-note {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--primary);
  opacity: 0.85;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Legal pages */
.legal-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--background-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.legal-section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.legal-section p,
.legal-section li {
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0.4rem;
}

.legal-section ul,
.legal-section ol {
  padding-left: 1.4rem;
  list-style: disc;
}

.legal-section ol {
  list-style: decimal;
}

.legal-section a {
  color: var(--primary);
  text-decoration: underline;
}

.legal-date {
  font-size: 0.85rem;
  color: var(--text-dark);
  margin-top: 0.25rem;
}

/* FAQ accordion */
.faq-item {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

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

.faq-question:hover {
  background: var(--background-card-hover);
}

.faq-question .faq-icon {
  color: var(--primary);
  font-size: 0.85rem;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-question .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 1rem 1.25rem;
  color: var(--text-muted);
  line-height: 1.75;
  background: var(--background-light);
  border-top: 1px solid var(--border);
}

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

/* Staff application form page */
.apply-form-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 16px 60px;
}

.apply-header {
  text-align: center;
  margin-bottom: 2rem;
}

.apply-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.apply-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.apply-card {
  background: var(--background-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.25rem;
}

.apply-card h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field:last-child {
  margin-bottom: 0;
}

.form-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form-field label .required {
  color: var(--error);
  margin-left: 2px;
}

.form-field label .hint {
  font-weight: 400;
  color: var(--text-dark);
  font-size: 0.8rem;
  margin-left: 6px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--background-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--primary);
}

.form-field select option {
  background: var(--background-card);
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
}

.form-field .char-hint {
  font-size: 0.78rem;
  color: var(--text-dark);
  margin-top: 0.25rem;
}

.apply-submit-row {
  display: grid;
  place-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.apply-submit-row .btn {
  min-width: 160px;
  width: fit-content;
}

.apply-submit-row .submit-note {
  font-size: 0.82rem;
  color: var(--text-dark);
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.alert-success {
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid var(--primary);
  color: var(--primary);
}

.alert-error {
  background: rgba(255, 71, 87, 0.08);
  border: 1px solid var(--error);
  color: var(--error);
}

.requirements-note {
  background: rgba(108, 92, 231, 0.08);
  border: 1px solid var(--secondary);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.requirements-note strong {
  color: var(--text);
}

.apply-icon-primary {
  color: var(--primary);
}

/* Discord connect box (staff apply) */
.discord-connect-box {
  background: linear-gradient(135deg, #5865F2 0%, #7289DA 100%);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  color: #fff;
  text-align: center;
}

.discord-connect-box h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.discord-connect-box p {
  opacity: 0.9;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
}

.discord-connect-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: #5865F2;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: var(--transition);
  text-decoration: none;
}

.btn-discord:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  color: #5865F2;
}

.discord-connected-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  text-align: left;
}

.discord-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  flex-shrink: 0;
}

.discord-username {
  font-weight: 600;
  font-size: 1rem;
}

.discord-id {
  font-size: 0.8rem;
  opacity: 0.75;
}

.btn-disconnect {
  margin-left: auto;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.5);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  flex-shrink: 0;
}

.btn-disconnect:hover {
  background: rgba(255,255,255,0.28);
  color: #fff;
}

.apply-hint-login {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 2rem 0;
}

.legal-note-sm {
  font-size: 0.85rem;
  color: var(--text-dark);
  margin-top: 0.5rem;
}

/* Staff CTA box (contact page) */
.staff-apply-box {
  margin-top: 2rem;
  padding: 1.75rem;
  background: linear-gradient(135deg, rgba(0,255,136,0.07) 0%, rgba(108,92,231,0.07) 100%);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  text-align: center;
}

.staff-apply-box h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.staff-apply-box p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.page-content > h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-content > p.intro {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* Small helpers used by contact form */
.form-actions {
  margin-top: 12px;
}
.contact-email {
  margin-top: 18px;
}

/* Replace small inline sidebar helper used in cart */
.cart-sidebar-inline-helper {
  width: 100%;
  display: inline;
  justify-content: center;
  margin-bottom: 12px;
}

/* Small margin utility */
.mb-8 {
  margin-bottom: 8px;
}
.ml-12 {
  margin-left: 12px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  /* Make hero fit the remaining viewport below the fixed navbar to avoid large empty gaps
       when navigating to in-page anchors. The navbar exposes --navbar-height. */
  min-height: calc(100vh - var(--navbar-height, 72px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 120px 20px 60px;
  background:
    radial-gradient(ellipse at top, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
    radial-gradient(
      ellipse at bottom right,
      rgba(108, 92, 231, 0.1) 0%,
      transparent 50%
    ),
    var(--background);
  overflow: hidden;
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2rem, 5.5vw, 4rem);
  font-weight: 800;
  margin-bottom: 0.6rem;
  line-height: 1.15;
}

.highlight {
  color: var(--primary);
  text-shadow: 0 0 30px var(--primary-glow);
}

.hero-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: min(64ch, 92vw);
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 72px;
}

.server-stats {
  display: flex;
  margin-top: 25px;
  gap: 60px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Improve spacing for offline informational block under hero */
.offline-info {
  margin-top: 22px;
  line-height: 1.6;
}

/* Ensure hero buttons have comfortable padding and separation */
.hero-buttons .btn {
  padding: 12px 22px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.stat i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 5px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Server Status Indicator */
.server-status-indicator {
  position: absolute;
  top: -8px;
  right: -8px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.server-status-indicator.online {
  background: rgba(0, 255, 136, 1);
  color: var(--text-primary);
  border: 1px solid var(--primary);
  animation: pulse-glow 2s infinite;
}

.server-status-indicator.offline {
  background: rgba(255, 71, 87, 1);
  color: var(--text-primary);
  border: 1px solid var(--error);
}

/* Admin - Products styling */
.admin-products {
  padding: 100px 0 60px;
}
.admin-products h1 {
  margin-bottom: 12px;
}
.admin-products .admin-actions {
  margin: 18px 0;
  display: flex;
  gap: 12px;
  align-items: center;
}
.admin-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.admin-add-row .form-control {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--background-card);
  color: var(--text);
  border: 1px solid var(--border);
  min-width: 140px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.table thead th {
  text-align: left;
  padding: 12px 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}
.table tbody td {
  padding: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
}
.form-control.form-control-sm {
  padding: 6px 8px;
  border-radius: 6px;
}
.btn-danger {
  background: #ff4757;
  color: white;
  border: none;
}
.btn-danger:hover {
  filter: brightness(0.95);
}

/* ============================================
   Responsive tweaks
   Targets phones and small tablets to improve layout
   ============================================ */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .nav-container {
    align-items: center;
    gap: 12px;
  }
  .logo {
    font-size: 1.25rem;
  }
  .hero {
    padding-top: calc(var(--navbar-height, 72px) + 24px);
  }
  .server-stats {
    gap: 18px;
  }
  .hero-buttons {
    gap: 12px;
  }

  /* Mobile nav overlay (applies for all widths where hamburger is visible) */
  .nav-links.active {
    display: flex;
    position: fixed;
    top: var(--navbar-height, 64px);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.98);
    flex-direction: column;
    padding: clamp(16px, 6vw, 28px);
    gap: 18px;
    align-items: center;
    justify-content: flex-start;
    z-index: 2000;
    overflow-y: auto;
  }

  .nav-links.active a {
    font-size: 1.15rem;
    color: var(--text);
    padding: 12px 8px;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0 16px;
  }
  .nav-actions {
    gap: 8px;
  }
  .cart-btn {
    width: 40px;
    height: 40px;
  }
  .hero-title {
    font-size: clamp(1.6rem, 8vw, 2.6rem);
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
  .hero {
    padding: 100px 12px 40px;
  }
}

/* Tables and cards: allow horizontal scroll on small screens */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
table {
  width: 100%;
}

@media (max-width: 480px) {
  .btn {
    padding: 10px 14px;
  }
  .btn-sm {
    padding: 6px 10px;
  }
  .nav-container {
    padding: 0 12px;
  }
  .logo {
    gap: 8px;
    font-size: 1.1rem;
  }
  .nav-actions {
    gap: 6px;
  }
  .mobile-menu-btn {
    font-size: 1.25rem;
  }
  /* Stack header content to reduce horizontal pressure */
  .nav-container {
    flex-wrap: wrap;
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 5px var(--primary-glow);
  }
  50% {
    box-shadow: 0 0 20px var(--primary-glow);
  }
}

.stat {
  position: relative;
}

.stat.server-offline .stat-value {
  color: var(--text-muted);
}

.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.hero-scroll i {
  font-size: 1.5rem;
  color: var(--text-muted);
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ==============================
   Extracted inline styles (templates)
   ============================== */

/* Server offline banner (from index.html) */
.server-offline-banner {
  background: linear-gradient(
    135deg,
    rgba(244, 67, 54, 0.9),
    rgba(183, 28, 28, 0.9)
  );
  color: white;
  padding: 1rem;
  text-align: center;
  position: fixed;
  /* place immediately below the navbar using the CSS variable */
  top: var(--navbar-height, 70px);
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(244, 67, 54, 0.4);
}

.server-offline-banner {
  transition:
    top 220ms ease,
    opacity 180ms ease;
}
.server-offline-banner i {
  font-size: 1.2rem;
  animation: pulse 1.5s ease-in-out infinite;
}
.server-offline-banner .banner-text {
  font-weight: 500;
}
.server-offline-banner .banner-note {
  opacity: 0.9;
  font-size: 0.9rem;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
/* Adjust hero when banner is shown */
.has-offline-banner .hero {
  /* Keep hero visible below banner and navbar. Use calc with navbar height. */
  padding-top: calc(var(--navbar-height, 70px) + 72px);
}

/* Utility hidden class (replace inline display:none) */
.hidden {
  display: none !important;
}

/* Disabled button styles (use button[disabled] instead of inline style) */
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Language modal hidden state */
.language-modal.hidden {
  display: none;
}

/* Fade-in helper animation used by store.js when showing product sections */
.fade-in {
  animation: fadeIn 0.34s ease-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Server down page styles (extracted from server_down.html) */
.down-page {
  min-height: calc(100vh - var(--navbar-height, 72px));
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 100%
  );
  position: relative;
  overflow: hidden;
}
.down-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      circle at 20% 80%,
      rgba(76, 175, 80, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(76, 175, 80, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}
.down-content {
  text-align: center;
  padding: 3rem;
  max-width: 600px;
  position: relative;
  z-index: 1;
}
.down-icon {
  font-size: 6rem;
  color: var(--danger);
  margin-bottom: 2rem;
  animation: pulse-slow 2s ease-in-out infinite;
}
@keyframes pulse-slow {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}
.down-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.down-title .highlight {
  color: var(--primary);
}
.down-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}
.down-status {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  padding: 1rem 2rem;
  border-radius: 50px;
  margin-bottom: 2rem;
}
.status-dot {
  width: 12px;
  height: 12px;
  background: var(--danger);
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
.status-text {
  font-weight: 600;
  color: var(--danger);
}
.down-info {
  background: var(--bg-tertiary);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.down-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}
.down-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}
.down-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}
.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.refresh-btn i {
  transition: transform 0.3s ease;
}
.refresh-btn:hover i {
  transform: rotate(180deg);
}
.social-links-down {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
.social-links-down a {
  width: clamp(40px, 6vw, 64px);
  height: clamp(40px, 6vw, 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  transition: all 0.3s ease;
}
.social-links-down a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}
.auto-refresh {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2rem;
}
.auto-refresh i {
  margin-right: 0.5rem;
}
.countdown {
  font-weight: 600;
  color: var(--primary);
}
.floating-slime {
  position: absolute;
  font-size: 3rem;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}
.floating-slime:nth-child(1) {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}
.floating-slime:nth-child(2) {
  top: 20%;
  right: 15%;
  animation-delay: 1s;
}
.floating-slime:nth-child(3) {
  bottom: 15%;
  left: 20%;
  animation-delay: 2s;
}
.floating-slime:nth-child(4) {
  bottom: 25%;
  right: 10%;
  animation-delay: 3s;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(10deg);
  }
}
@media (max-width: 768px) {
  .down-title {
    font-size: 1.8rem;
  }
  .down-icon {
    font-size: 4rem;
  }
  .down-content {
    padding: 2rem 1.5rem;
  }
}

/* ============================================
   Section Styles
   ============================================ */
section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 15px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 60px;
}
.mg-fnt-opc{
  text-align: center;
  color: var(--text-muted);
  margin-top:2.5rem;
  font-size:1.15rem; 
  opacity:0.6;
  margin-bottom: 0px;
}

/* ============================================
   Features Section
   ============================================ */
.features {
  background: var(--background-light);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--background-card);
  border-radius: var(--radius);
  padding: 40px 30px;
  text-align: center;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 255, 136, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
}

.feature-icon i {
  font-size: 2rem;
  color: var(--primary);
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================
   VIP Preview Section
   ============================================ */
.vip-preview {
  background: var(--background);
}

.vip-gp-jst-cnt{
  justify-content: center; 
  gap: 2rem
}

.vip-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  align-items: start;
}

.vip-card {
  background: var(--background-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
}

.vip-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.vip-card.featured {
  border-color: var(--gold);
  border-width: 2px;
  box-shadow: 0 0 32px rgba(255, 196, 0, 0.2);
}

.vip-card.featured:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 40px rgba(255, 196, 0, 0.35);
}

.vip-badge {
  position: absolute;
  top: 15px;
  right: -30px;
  background: var(--gold);
  color: var(--background);
  padding: 5px 40px;
  font-size: 0.75rem;
  font-weight: 600;
  transform: rotate(45deg);
}

.vip-header {
  padding: 30px;
  text-align: center;
}

.vip-bronze {
  background: linear-gradient(135deg, var(--bronze), #8b4513);
}
.vip-silver {
  background: linear-gradient(135deg, var(--silver), #808080);
}
.vip-gold {
  background: linear-gradient(135deg, var(--gold), #ff8c00);
}
.vip-diamond {
  background: linear-gradient(135deg, var(--diamond), #0099ff);
}

.vip-header h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.vip-price {
  font-size: 2rem;
  font-weight: 700;
}

.vip-price span {
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.8;
}

.vip-perks {
  padding: 30px;
}

.vip-perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.vip-perks li:last-child {
  border-bottom: none;
}

.vip-perks i {
  color: var(--primary);
}

.vip-card .btn {
  margin: 0 30px 30px;
  width: calc(100% - 60px);
}

/* ============================================
   How to Play Section
   ============================================ */
.how-to-play {
  background: var(--background-light);
}

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 15px;
}

.step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--background);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-content h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.step-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.step-arrow {
  color: var(--primary);
  font-size: 1.5rem;
}

/* ============================================
   Store Header
   ============================================ */
.store-header {
  padding: 140px 0 60px;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
    var(--background);
}

.store-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.store-header p {
  color: var(--text-muted);
  margin-bottom: 30px;
}

.username-input {
  max-width: 400px;
  margin: 0 auto;
  text-align: left;
}

.username-input label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 500;
}

.username-input input {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--background-card);
  color: var(--text);
  font-size: 1rem;
  transition: var(--transition);
}

.username-input input:focus {
  outline: none;
  border-color: var(--primary);
}

.username-input small {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================
   Store Categories
   ============================================ */
.store-categories {
  padding: 30px 0;
  background: var(--background-light);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 70px;
  z-index: 100;
}

.category-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.category-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  background: var(--background-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.category-tab:hover {
  border-color: var(--primary);
  color: var(--text);
}

.category-tab.active {
  background: var(--primary);
  color: var(--background);
  border-color: var(--primary);
}

/* ============================================
   Store Products
   ============================================ */
.store-products {
  padding: 60px 0;
  background: var(--background);
}

.product-section {
  margin-bottom: 60px;
}

.product-section-title {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1.5rem;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.product-section-title i {
  color: var(--primary);
}

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

.product-card {
  background: var(--background-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.product-card.featured {
  border-color: var(--gold);
}

.product-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--secondary);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 1;
}

.product-badge.hot {
  background: var(--error);
}

.product-badge.premium {
  background: linear-gradient(135deg, var(--diamond), var(--secondary));
}

.product-image {
  /* Responsive product image height and scalable icon */
  height: clamp(120px, 18vw, 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2.5rem, 6.5vw, 4rem);
}

.vip-bronze-bg {
  background: linear-gradient(
    135deg,
    rgba(205, 127, 50, 0.2),
    rgba(139, 69, 19, 0.2)
  );
  color: var(--bronze);
}
.vip-silver-bg {
  background: linear-gradient(
    135deg,
    rgba(192, 192, 192, 0.2),
    rgba(128, 128, 128, 0.2)
  );
  color: var(--silver);
}
.vip-gold-bg {
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.2),
    rgba(255, 140, 0, 0.2)
  );
  color: var(--gold);
}
.vip-diamond-bg {
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.2),
    rgba(0, 153, 255, 0.2)
  );
  color: var(--diamond);
}

.kit-starter-bg {
  background: linear-gradient(
    135deg,
    rgba(0, 255, 136, 0.1),
    rgba(0, 200, 100, 0.1)
  );
  color: var(--primary);
}
.kit-tech-bg {
  background: linear-gradient(
    135deg,
    rgba(108, 92, 231, 0.2),
    rgba(80, 70, 180, 0.2)
  );
  color: var(--secondary);
}
.kit-ultimate-bg {
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.2),
    rgba(255, 100, 0, 0.2)
  );
  color: var(--gold);
}

.keys-common-bg {
  background: linear-gradient(
    135deg,
    rgba(100, 200, 100, 0.2),
    rgba(50, 150, 50, 0.2)
  );
  color: #7ec87e;
}
.keys-rare-bg {
  background: linear-gradient(
    135deg,
    rgba(100, 100, 255, 0.2),
    rgba(50, 50, 200, 0.2)
  );
  color: #8080ff;
}
.keys-legendary-bg {
  background: linear-gradient(
    135deg,
    rgba(255, 200, 50, 0.2),
    rgba(255, 150, 0, 0.2)
  );
  color: #ffcc00;
}
.money-bg {
  background: linear-gradient(
    135deg,
    rgba(0, 255, 136, 0.2),
    rgba(0, 200, 100, 0.2)
  );
  color: var(--primary);
}

.booster-xp-bg {
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.2),
    rgba(200, 150, 0, 0.2)
  );
  color: var(--gold);
}
.booster-money-bg {
  background: linear-gradient(
    135deg,
    rgba(0, 255, 136, 0.2),
    rgba(0, 200, 100, 0.2)
  );
  color: var(--primary);
}
.booster-machine-bg {
  background: linear-gradient(
    135deg,
    rgba(108, 92, 231, 0.2),
    rgba(80, 70, 180, 0.2)
  );
  color: var(--secondary);
}

.product-info {
  padding: 25px;
}

.product-info h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.product-info > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.product-features {
  margin-bottom: 20px;
}

.product-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 5px 0;
}

.product-features i {
  color: var(--primary);
  font-size: 0.8rem;
}

.product-price {
  margin-bottom: 20px;
}

.original-price {
  text-decoration: line-through;
  color: var(--text-dark);
  font-size: 0.9rem;
  margin-right: 8px;
}

.price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}

.period {
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

/* ============================================
   Cart Page
   ============================================ */
.cart-section {
  padding: calc(var(--navbar-height, 72px) + 68px) 0 60px;
  min-height: calc(80vh - var(--navbar-height, 72px));
}

.page-title {
  font-size: 2rem;
  margin-bottom: 40px;
}

.cart-layout {
  display: grid;
  /* Make the sidebar flexible: at small sizes it collapses to min 260px, at large screens it caps */
  grid-template-columns: 1fr minmax(260px, min(420px, 38vw));
  gap: clamp(16px, 2.5vw, 40px);
  align-items: start;
}

.cart-items-container {
  background: var(--background-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.cart-header {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(80px, 1fr)) minmax(40px, 80px);
  gap: 12px;
  padding: clamp(12px, 1.6vw, 20px);
  background: var(--background-light);
  font-weight: 600;
  font-size: clamp(0.85rem, 0.9vw, 0.95rem);
  color: var(--text-muted);
}

.cart-item {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(80px, 1fr)) minmax(40px, 80px);
  gap: 12px;
  padding: clamp(12px, 1.6vw, 20px);
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--background-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
}

.cart-item-name {
  font-weight: 600;
}

.cart-item-price,
.cart-item-total {
  font-weight: 500;
}

.cart-item-total {
  color: var(--primary);
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantity-control button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--background-light);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

.quantity-control button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.quantity-control span {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
}

.remove-item {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 71, 87, 0.1);
  color: var(--error);
  cursor: pointer;
  /* Order / generic modal styles (used by showOrderModal and language modal) */
  .order-modal,
  .language-modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
  }
  .order-modal > div,
  .language-modal-content,
  .language-modal .language-modal-content {
    background: linear-gradient(
      180deg,
      rgba(10, 11, 15, 0.98),
      rgba(8, 9, 12, 0.98)
    );
    color: var(--text);
    border-radius: 12px;
    padding: 18px;
    box-shadow: var(--shadow);
    max-width: 520px;
    width: 92%;
  }
  .order-modal code {
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--text);
  }
  .order-modal .btn {
    border-radius: 8px;
    padding: 8px 12px;
  }
  .order-modal .btn.btn-sm {
    padding: 8px 12px;
  }
  .toast .toast-action {
    margin-left: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
  }
  .toast.success {
    background: linear-gradient(
      90deg,
      rgba(0, 255, 136, 0.08),
      rgba(108, 92, 231, 0.04)
    );
  }
  .toast.error {
    background: linear-gradient(
      90deg,
      rgba(255, 71, 87, 0.06),
      rgba(0, 0, 0, 0.04)
    );
  }
  transition: var(--transition);
}

.remove-item:hover {
  background: var(--error);
  color: white;
}

.empty-cart {
  padding: 80px 40px;
  text-align: center;
  display: none;
}

.empty-cart.show {
  display: block;
}

.empty-cart i {
  font-size: 4rem;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.empty-cart h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.empty-cart p {
  color: var(--text-muted);
  margin-bottom: 30px;
}

/* Cart Summary */
.cart-summary {
  background: var(--background-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 30px;
  position: sticky;
  top: 100px;
}

.cart-summary h3 {
  font-size: 1.3rem;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.summary-username {
  margin-bottom: 25px;
}

.summary-username label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 500;
  font-size: 0.9rem;
}

.summary-username input {
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--background-light);
  color: var(--text);
  font-size: 0.95rem;
  transition: var(--transition);
}

.summary-username input:focus {
  outline: none;
  border-color: var(--primary);
}

.summary-username small {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.summary-row.discount {
  color: var(--primary);
}

.summary-row.total {
  font-size: 1.2rem;
  font-weight: 700;
}

.summary-row.total span:last-child {
  color: var(--primary);
}

.coupon-section {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.coupon-section input {
  flex: 1;
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--background-light);
  color: var(--text);
}

.coupon-message {
  font-size: 0.85rem;
  margin-bottom: 15px;
}

.coupon-message.success {
  color: var(--success);
}

.coupon-message.error {
  color: var(--error);
}

.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.checkout-btn {
  margin-bottom: 20px;
}

.payment-methods {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.payment-methods p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.payment-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  font-size: 1.8rem;
  color: var(--text-muted);
}

.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.security-badge i {
  color: var(--primary);
}

/* Recently Viewed */
.recently-viewed {
  padding: 60px 0;
  background: var(--background-light);
}

.recently-viewed h2 {
  text-align: center;
  margin-bottom: 30px;
}

.quick-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  background: var(--background-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.quick-link:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.quick-link i {
  color: var(--primary);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--background-light);
  padding: 60px 0 30px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.footer-section h4 i {
  color: var(--primary);
}

.footer-section p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-section ul a:hover {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  width: clamp(36px, 5.2vw, 56px);
  height: clamp(36px, 5.2vw, 56px);
  border-radius: 50%;
  background: var(--background-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 992px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .server-stats {
    gap: 30px;
  }

  .steps {
    flex-direction: column;
  }

  .step-arrow {
    transform: rotate(90deg);
  }

  .vip-card.featured {
    transform: none;
  }

  .cart-header {
    display: none;
  }

  .cart-item {
    grid-template-columns: 1fr;
    gap: 15px;
    text-align: center;
  }

  .cart-item-info {
    flex-direction: column;
  }

  .quantity-control {
    justify-content: center;
  }

  .category-tabs {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }
}

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

.feature-card,
.vip-card,
.product-card {
  animation: fadeIn 0.5s ease-out;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 15px 25px;
  background: var(--background-card);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-glow);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  animation: slideIn 0.3s ease-out;
}

.toast.success {
  border-color: var(--success);
}

.toast.error {
  border-color: var(--error);
}

.toast i {
  font-size: 1.2rem;
  color: var(--primary);
}

.toast.success i {
  color: var(--success);
}

.toast.error i {
  color: var(--error);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* ============================================
   Language Modal
   ============================================ */
.language-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.language-modal.show {
  opacity: 1;
  visibility: visible;
}

.language-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.language-modal-content {
  position: relative;
  background: var(--background-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 40px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow);
}

.language-modal.show .language-modal-content {
  transform: scale(1) translateY(0);
}

.language-modal-header {
  margin-bottom: 30px;
}

.language-modal-header i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 15px;
  display: block;
}

.language-modal-header h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.language-modal-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.language-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 24px;
  background: var(--background-light);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.language-option:hover {
  border-color: var(--primary);
  background: rgba(0, 255, 136, 0.05);
}

.language-option.selected {
  border-color: var(--primary);
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 20px var(--primary-glow);
}

.language-option .lang-flag {
  font-size: 2rem;
}

.language-option .lang-name {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
}

.language-confirm {
  margin-top: 10px;
}

.language-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   Resource Pack Version Modal
   ============================================ */
.pack-version-modal-content {
  max-width: 480px;
}

.pack-version-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.pack-version-option {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
}

.pack-version-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.pack-version-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.pack-version-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pack-version-badge {
  display: inline-block;
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.7rem;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 6px;
}

.pack-version-loading,
.pack-version-error {
  text-align: center;
  color: var(--text-muted);
  padding: 20px 0;
}

.pack-version-error {
  color: var(--danger, #f87171);
}

/* ============================================
   Language Selector (Navbar)
   ============================================ */
.language-selector {
  position: relative;
  z-index: 2000; /* ensure selector sits above other nav elements */
}

.current-language {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--background-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  color: var(--text);
  position: relative;
  pointer-events: auto;
}

.current-language:hover {
  border-color: var(--primary);
}

.current-language .lang-flag {
  font-size: 1.2rem;
}

.current-language .lang-name {
  font-weight: 500;
}

.current-language i.fa-chevron-down {
  font-size: 0.7rem;
  margin-left: 5px;
  transition: transform 0.2s ease;
}

.language-selector.open .current-language i.fa-chevron-down {
  transform: rotate(180deg);
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--background-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 2001;
  box-shadow: var(--shadow);
}

.language-selector.open .language-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border);
}

.lang-option:last-child {
  border-bottom: none;
}

.lang-option:hover {
  background: rgba(0, 255, 136, 0.1);
}

.lang-option.active {
  background: rgba(0, 255, 136, 0.15);
  color: var(--primary);
}

.lang-option .lang-flag {
  font-size: 1.3rem;
}

.lang-option .lang-name {
  font-weight: 500;
  font-size: 0.9rem;
}

/* Mobile responsive for language modal */
@media (max-width: 480px) {
  .language-modal-content {
    padding: 30px 20px;
  }

  .language-option {
    padding: 15px 18px;
  }

  .language-option .lang-flag {
    font-size: 1.5rem;
  }

  .language-option .lang-name {
    font-size: 1rem;
  }
}

/* Support chat bubble */
.support-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
}
.support-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 14px;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  font-weight: 600;
}
.support-btn i {
  font-size: 1.1rem;
}
.support-modal {
  position: fixed;
  right: 18px;
  bottom: 78px;
  width: 320px;
  max-width: calc(100% - 40px);
  background: var(--background-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.5);
  padding: 12px;
  z-index: 99999;
  display: none;
}
.support-modal.show {
  display: block;
}
.support-modal h4 {
  margin: 0 0 8px 0;
}
.support-modal .support-actions {
  display: flex;
  gap: 8px;
}
.support-modal .support-actions a {
  flex: 1;
}

/* Cart summary buyer inputs and payment select styling */
.cart-summary input[type="text"],
.cart-summary input[type="email"],
.cart-summary select {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--background-light);
  color: var(--text);
  box-sizing: border-box;
  transition:
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.cart-summary label {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cart-summary input[type="text"]:focus,
.cart-summary input[type="email"]:focus,
.cart-summary select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(0, 255, 136, 0.06);
}

/* New styles for buyer fields to replace inline styles in templates */
.buyer-fields label {
  display: block;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.buyer-fields input,
.buyer-fields select {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--background-light);
  color: var(--text);
  box-sizing: border-box;
}
.buyer-fields input::placeholder {
  color: var(--text-muted);
}

/* spacing variants for buyer fields blocks (replaces inline margins) */
.buyer-fields {
  margin-top: 12px;
}
.buyer-fields.payment-select {
  margin-top: 14px;
}

/* Utility: center action buttons and muted note spacing */
.center-actions {
  text-align: center;
  margin-top: 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
}
.muted-note {
  margin-top: 18px;
  color: var(--text-muted);
}

/* Make the buyer fields align nicer on larger screens */
@media (min-width: 900px) {
  .cart-summary .summary-username,
  .cart-summary > div:nth-child(n + 3) {
    margin-bottom: 10px;
  }
}

/* ============================================
   Support Chatbot Panel
   ============================================ */
.chat-panel {
  display: none;
  flex-direction: column;
  position: fixed;
  right: 18px;
  bottom: 78px;
  width: 330px;
  max-width: calc(100% - 40px);
  height: 440px;
  background: var(--background-card, #1a1a2e);
  border: 1px solid var(--border, #2a2a4a);
  border-radius: 14px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.6);
  z-index: 100000;
  overflow: hidden;
  font-family: inherit;
}
.chat-panel.open { display: flex; }

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--primary, #00ff88);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.chat-header-icon { font-size: 1rem; }
.chat-header-status {
  width: 8px;
  height: 8px;
  background: #000;
  border-radius: 50%;
  opacity: 0.6;
  animation: chatPulse 2s infinite;
}
@keyframes chatPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}
.chat-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.chat-msg {
  max-width: 85%;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  word-break: break-word;
}
.chat-msg.bot {
  background: var(--background-light, #12122a);
  color: var(--text, #e0e0e0);
  border-bottom-left-radius: 3px;
  align-self: flex-start;
}
.chat-msg.user {
  background: var(--primary, #00ff88);
  color: #000;
  border-bottom-right-radius: 3px;
  align-self: flex-end;
}
.chat-msg a.chat-link { color: inherit; font-weight: 600; text-decoration: underline; }
.chat-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 8px 12px;
}
.chat-typing span {
  width: 7px;
  height: 7px;
  background: var(--text-muted, #888);
  border-radius: 50%;
  animation: typingBounce 0.9s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-5px); }
}
.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  flex-shrink: 0;
  border-top: 1px solid var(--border, #2a2a4a);
}
.chat-chip {
  background: var(--background-light, #12122a);
  border: 1px solid var(--border, #2a2a4a);
  color: var(--text, #e0e0e0);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: 0.15s;
}
.chat-chip:hover {
  background: var(--primary, #00ff88);
  color: #000;
  border-color: var(--primary, #00ff88);
}
.chat-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--border, #2a2a4a);
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  background: var(--background-light, #12122a);
  border: 1px solid var(--border, #2a2a4a);
  color: var(--text, #e0e0e0);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
}
.chat-input:focus { border-color: var(--primary, #00ff88); }
.chat-send {
  background: var(--primary, #00ff88);
  color: #000;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 700;
  transition: 0.15s;
}
.chat-send:hover { filter: brightness(1.1); }

/* ── Resource Pack Modal ───────────────────────────────────────────────────── */
.rp-modal-content {
  max-width: 520px;
  text-align: left;
}
.rp-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
}
.rp-modal-close:hover { color: var(--text); }

.rp-version-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rp-loading {
  text-align: center;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 1.5rem;
}
.rp-version-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--background-secondary);
  position: relative;
  transition: border-color 0.2s;
}
.rp-version-card.rp-primary {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb, 99, 102, 241), 0.06);
}
.rp-version-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rp-version-info strong {
  font-size: 1rem;
  color: var(--text);
}
.rp-version-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.rp-badge {
  position: absolute;
  top: -10px;
  left: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.rp-dl-btn {
  white-space: nowrap;
  flex-shrink: 0;
}
.rp-error {
  text-align: center;
  color: var(--text-muted);
  padding: 16px 0;
}
@media (max-width: 480px) {
  .rp-version-card { flex-direction: column; align-items: flex-start; }
  .rp-dl-btn { width: 100%; text-align: center; justify-content: center; }
}
