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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #ffffff;
  background: #0a0a0a;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Username Gate Modal */
.username-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.username-gate-overlay.active {
  opacity: 1;
  visibility: visible;
}

.username-gate-container {
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 1rem;
  max-width: 450px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.username-gate-overlay.active .username-gate-container {
  transform: scale(1) translateY(0);
}

.username-gate-header {
  text-align: center;
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid #333333;
  background: #1a1a1a;
  border-radius: 1rem 1rem 0 0;
}

.username-gate-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff 0%, #FF55FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.username-gate-subtitle {
  font-size: 1.25rem;
  color: #9ca3af;
  font-weight: 400;
}

.username-gate-content {
  padding: 1.5rem 2rem 2rem;
}

.username-gate-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.username-gate-form label {
  color: #ffffff;
  font-weight: 600;
  font-size: 1.125rem;
}

.username-gate-form input {
  background: #0f0f0f;
  border: 2px solid #333333;
  border-radius: 0.75rem;
  color: #ffffff;
  padding: 1.25rem 1.5rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
  font-size: 1.125rem;
}

.username-gate-form input:focus {
  border-color: #FF55FF;
  box-shadow: 0 0 0 4px rgba(255, 85, 255, 0.1);
  outline: none;
}

.username-gate-form input.valid {
  border-color: #10b981;
}

.username-gate-form input.invalid {
  border-color: #ef4444;
}

.username-gate-form input::placeholder {
  color: #6b7280;
}

.gate-username-validation {
  margin-top: -0.5rem;
  font-size: 0.875rem;
}

.validation-success {
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.validation-error {
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.cancel-btn {
  background: #333333;
  border: 1px solid #555555;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}

.cancel-btn:hover {
  background: #555555;
  border-color: #777777;
}

.save-btn {
  background: linear-gradient(135deg, #FF55FF 0%, #e040e0 100%);
  border: none;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}

.save-btn:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow: 0 0 25px rgba(255, 85, 255, 0.4);
}

.save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.enter-store-btn {
  background: linear-gradient(135deg, #FF55FF 0%, #e040e0 100%);
  border: none;
  padding: 1.25rem 2rem;
  border-radius: 0.75rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.125rem;
  font-family: 'Inter', sans-serif;
}

.enter-store-btn:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow: 0 0 25px rgba(255, 85, 255, 0.4);
}

.enter-store-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #1f1f1f;
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  gap: 1rem;
  position: relative;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-menu a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  position: relative;
}

.nav-menu a:hover {
  background: rgba(255, 85, 255, 0.1);
  color: #FF55FF;
  transform: translateY(-1px);
}

/* Removed external link arrows */

.logo {
  display: flex;
  align-items: center;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: #FF55FF;
  letter-spacing: -0.02em;
}

.logo-extension {
  color: #AAAAAA;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.current-user-display {
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
}

.current-user-display:hover {
  border-color: #FF55FF;
  box-shadow: 0 0 15px rgba(255, 85, 255, 0.2);
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 0.25rem;
  overflow: hidden;
  background: #333333;
  display: flex;
  align-items: center;
  justify-content: center;
}

.minecraft-head {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.head-preview { width: 24px; height: 24px; }
.gate-label-row { display: flex; align-items: center; gap: 0.5rem; }

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-label {
  color: #9ca3af;
  font-weight: 500;
  font-size: 0.875rem;
}

.current-username {
  color: #FF55FF;
  font-weight: 700;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-size: 0.875rem;
}

.change-username-btn {
  background: #333333;
  border: 1px solid #555555;
  border-radius: 0.375rem;
  color: #ffffff;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.change-username-btn:hover {
  background: #FF55FF;
  border-color: #FF55FF;
  box-shadow: 0 0 10px rgba(255, 85, 255, 0.3);
}

.cart-button {
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 0.5rem;
  padding: 0.75rem;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  font-family: inherit;
}

.cart-button:hover {
  background: #FF55FF;
  border-color: #FF55FF;
  box-shadow: 0 0 15px rgba(255, 85, 255, 0.4);
  transform: scale(1.05);
  color: #ffffff;
}

.cart-count {
  background: #FF55FF;
  color: white;
  border-radius: 50%;
  width: 1.25rem;
  height: 1.25rem;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  animation: pulse 2s infinite;
}

.header-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.header-store-gradient {
  font-weight: 800;
  font-size: 1.75rem;
  background: linear-gradient(90deg, #FF55FF 0%, #FF55FF 50%, #AAAAAA 50%, #AAAAAA 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: none;
}
@keyframes gradient-move-rtl {
  0% { background-position: 200% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* Store Layout - FIXED: No grid layout that pushes content */
.store-layout {
  min-height: calc(100vh - 200px);
  padding-top: 4rem;
  padding-bottom: 2rem;
  position: relative;
}

/* Sidebar */
.store-sidebar {
  background: #1a1a1a;
  border-right: 1px solid #333333;
  border-radius: 0 1rem 1rem 0;
  padding: 1rem 2rem;
  position: static;
  top: auto;
  left: auto;
  width: 100%;
  height: auto;
  overflow-y: visible;
  z-index: 100;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.sidebar-header {
  padding: 0;
  border-bottom: 0;
  margin: 0;
  height: 0;
}

.sidebar-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.sidebar-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0;
  justify-content: center;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: #9ca3af;
  text-decoration: none;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 1rem;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: #333333;
  color: white;
  box-shadow: 0 0 15px rgba(51, 51, 51, 0.3);
}

.sidebar-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Dropdown Styles */
.sidebar-dropdown {
  position: relative;
  margin-bottom: 0.25rem;
}

.dropdown-toggle {
  justify-content: space-between;
}

.dropdown-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dropdown-arrow {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.sidebar-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #0f0f0f;
  border-radius: 0.5rem;
  margin: 0.5rem 0 0 1.5rem;
}

.sidebar-dropdown.active .dropdown-menu {
  max-height: 200px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #9ca3af;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.875rem;
  margin: 0.25rem;
}

.dropdown-item:hover,
.dropdown-item.active {
  background: #333333;
  color: white;
  box-shadow: 0 0 10px rgba(51, 51, 51, 0.3);
}

.dropdown-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Main Content - FIXED: Proper margin and no grid interference */
.store-main {
  margin-left: 0;
  padding: 2rem;
  min-height: calc(100vh - 8rem);
  max-width: 100%;
  margin-bottom: 2rem;
  transition: none;
  /* Remove any transitions that might interfere */
}

/* Category Pages */
.category-page {
  display: none;
  width: 100%;
}

.category-page.active {
  display: block;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.store-logo-placeholder {
  margin-bottom: 2rem;
}

.logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 100px;
  background: linear-gradient(135deg, #1f1f1f 0%, #2a1a2a 100%);
  border: 2px dashed #FF55FF;
  border-radius: 1rem;
  color: #FF55FF;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  margin: 0 auto;
}
.logo-placeholder-image {
  width: 320px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Hero Announcements */
.hero-announcements {
  max-width: 1000px;
  margin: 0 auto;
  text-align: left;
}

.announcements-title {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff 0%, #FF55FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2rem;
  text-align: center;
}

.announcement-card {
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.announcement-card::before { display: none; }
.announcement-card:hover { border-color: #333333; box-shadow: none; transform: none; }

.featured-announcement {
  min-height: 300px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a1a2a 100%);
  border: 2px solid #FF55FF;
  box-shadow: none;
}

.announcement-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, #FF55FF 0%, #e040e0 100%);
  border-radius: 1rem;
  color: white;
  flex-shrink: 0;
}

.announcement-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.announcement-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
  text-align: center;
}

.announcement-text {
  color: #e5e7eb;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  background: #0f0f0f;
  border: 1px solid #333333;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.announcement-text a,
.announcement-text a:visited {
  color: #d1d5db;
  font-weight: 700;
  text-decoration: none;
}
.announcement-text a:hover {
  color: #ffffff;
  text-decoration: none;
}
.announcement-text a:active {
  color: #d1d5db;
}

.announcement-thanks {
  display: block;
  text-align: center;
  font-weight: 700;
}

.announcement-date {
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: auto;
}

.category-header {
  text-align: center;
  margin-bottom: 3rem;
}

.category-title {
  font-size: 3rem;
  font-weight: 700;
  color: #FF55FF;
  margin-bottom: 1rem;
}

.category-description {
  font-size: 1.25rem;
  color: #9ca3af;
  font-weight: 400;
  margin-bottom: 2rem;
}

/* Products Grid */
.products-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 1rem;
  padding: 1.5rem;
  min-height: 200px; /* Ensure consistent height across categories */
}

/* UHC (Private Hosting) grid should fit one item */
.category-page[data-category="private-hosting"] .products-grid {
  min-height: auto;
}

/* Unbans grid should fit one item */
.category-page[data-category="unbans"] .products-grid {
  min-height: auto;
}

/* Minecraft color classes */
.mc { font-weight: 700; }
.mc-a { color: #55FF55; }
.mc-2 { color: #00AA00; }
.mc-6 { color: #FFAA00; }
.mc-5 { color: #AA00AA; }
.mc-4 { color: #AA0000; }
.mc-7 { color: #AAAAAA; }
.mc-8 { color: #555555; }
.mc-1 { color: #00AAAA; }
.mc-d { color: #FF55FF; }
.mc-f { color: #FFFFFF; }
.mc-e { color: #FFFF55; }
.mc-c { color: #FF5555; }

/* Rainbow gradient text utility */
.rainbow-text {
  background: linear-gradient(90deg, #ff5555, #ffad33, #ffff55, #55ff55, #55aaff, #aa55ff, #ff55ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 700;
}

/* Modal image placeholder for keys */
.modal-key-placeholder {
  width: 96px;
  height: 48px;
  border: 1px solid #333333;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #1f1f1f 0%, #2a1a2a 100%);
  display: block;
}

/* Back arrow link in header */
.back-arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 0.5rem;
  color: #ffffff;
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 0.5rem;
  padding: 0 0.75rem;
  height: 2.25rem;
  text-decoration: none;
}
.back-arrow-link:visited { text-decoration: none; color: #ffffff; }
.back-arrow-link:focus { text-decoration: none; }
.back-arrow-text { color: #ffffff; font-weight: 700; font-size: 1rem; }
.logo-separator { width: 1.5rem; display: inline-block; }
.back-arrow-link:hover {
  background: #FF55FF;
  border-color: #FF55FF;
  box-shadow: 0 0 10px rgba(255, 85, 255, 0.3);
}

/* Category description list and disclaimer */
.description-heading {
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
}
.category-description-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.category-description-list li {
  background: rgba(255, 85, 255, 0.1);
  color: #FF55FF;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 85, 255, 0.2);
  margin-bottom: 0.5rem;
}
.category-disclaimer {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #444444;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: #e5e7eb;
  display: inline-block;
  font-size: 0.9rem;
}

/* Category spacing placeholder */
.category-spacing-placeholder {
  height: 2rem;
  flex-shrink: 0;
}

.product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: #0f0f0f;
  border: 1px solid #333333;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.product-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 85, 255, 0.05), transparent);
  transition: left 0.5s ease;
}

.product-row:hover::before {
  left: 100%;
}

.product-row:hover {
  border-color: #FF55FF;
  box-shadow: 0 5px 20px rgba(255, 85, 255, 0.15);
  transform: translateY(-2px);
}

.product-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
  flex: 1;
  margin-right: 1rem;
}

.product-pricing {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.original-price {
  font-size: 1rem;
  color: #6b7280;
  text-decoration: line-through;
  font-weight: 500;
}

.current-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #FF55FF;
  text-shadow: 0 0 10px rgba(255, 85, 255, 0.3);
}

.info-btn {
  background: #333333;
  border: 1px solid #555555;
  border-radius: 50%;
  color: #9ca3af;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.info-btn:hover {
  background: #555555;
  border-color: #777777;
  color: #ffffff;
  transform: scale(1.1);
}

.add-to-cart-btn {
  background: linear-gradient(135deg, #FF55FF 0%, #e040e0 100%);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.add-to-cart-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 85, 255, 0.4);
}

/* Product Info Modal */
.product-info-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 15000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.product-info-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 1rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

.product-info-modal.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #333333;
  background: #1a1a1a;
  border-radius: 1rem 1rem 0 0;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.modal-close-btn {
  background: #333333;
  border: 1px solid #555555;
  border-radius: 0.5rem;
  color: #ffffff;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-close-btn:hover {
  background: #FF55FF;
  border-color: #FF55FF;
  box-shadow: 0 0 15px rgba(255, 85, 255, 0.4);
}

.modal-body {
  padding: 1.5rem;
}

.modal-body h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.modal-body p {
  color: #e5e7eb;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.modal-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal-body li {
  background: rgba(255, 85, 255, 0.1);
  color: #FF55FF;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(255, 85, 255, 0.2);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-body li::before {
  content: '✓';
  color: #10b981;
  font-weight: 700;
}

/* Rank Info Section Styling */
.rank-info-section {
  margin-top: 1.5rem;
}

.rank-detail-item {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rank-label {
  font-weight: 600;
  color: #ffffff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rank-value {
  color: #d1d5db;
  font-size: 0.95rem;
  line-height: 1.4;
}

.rank-divider {
  width: 100%;
  height: 1px;
  background: #444444;
  margin: 1.5rem 0;
  position: relative;
}

.rank-divider::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 50px;
  height: 1px;
  background: #FF55FF;
}

/* Modal Sections */
.modal-section {
  margin-bottom: 1.5rem;
  background: #0f0f0f;
  border: 1px solid #333333;
  border-radius: 0.75rem;
  padding: 1rem;
}

.modal-section-title {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #FF55FF;
  padding-bottom: 0.5rem;
  display: inline-block;
}

.modal-section-content {
  margin-top: 0.75rem;
}

/* Custom Cart Panel - FIXED: Overlay instead of grid column */
.cart-panel {
  position: fixed;
  top: 4rem;
  right: 0;
  width: 400px;
  height: calc(100vh - 4rem);
  background: #1a1a1a;
  border-left: 1px solid #333333;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1500;
  /* Higher than sidebar */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  /* Add shadow for overlay effect */
}

.cart-panel.active {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #333333;
  background: linear-gradient(135deg, #1f1f1f 0%, #2a1a2a 100%);
}

.cart-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.close-cart-btn {
  background: #333333;
  border: 1px solid #555555;
  border-radius: 0.5rem;
  color: #ffffff;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-cart-btn:hover {
  background: #FF55FF;
  border-color: #FF55FF;
  box-shadow: 0 0 15px rgba(255, 85, 255, 0.4);
}

.cart-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Empty Cart State */
.empty-cart-message {
  text-align: center;
  padding: 3rem 1rem;
  color: #9ca3af;
}

.empty-cart-icon {
  color: #555555;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.empty-cart-message h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.empty-cart-message p {
  font-size: 0.875rem;
  color: #9ca3af;
}

/* Cart Items */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  background: #0f0f0f;
  border: 1px solid #333333;
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.cart-item:hover {
  border-color: #FF55FF;
  box-shadow: 0 0 15px rgba(255, 85, 255, 0.1);
}

.cart-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.cart-item-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
}

.remove-item-btn {
  background: #ef4444;
  border: 1px solid #dc2626;
  border-radius: 0.375rem;
  color: white;
  padding: 0.375rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-item-btn:hover {
  background: #dc2626;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
  transform: scale(1.05);
}

.cart-item-description {
  color: #9ca3af;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.cart-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #333333;
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.quantity-btn {
  background: #555555;
  border: 1px solid #777777;
  border-radius: 0.25rem;
  color: #ffffff;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quantity-btn:hover {
  background: #FF55FF;
  border-color: #FF55FF;
  transform: scale(1.1);
}

.quantity-value {
  color: #ffffff;
  font-weight: 600;
  min-width: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
}

.cart-item-price {
  text-align: right;
}

.item-total {
  font-size: 1.125rem;
  font-weight: 700;
  color: #FF55FF;
  display: block;
}

.item-unit-price {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Cart Summary */
.cart-summary {
  background: #0f0f0f;
  border: 1px solid #333333;
  border-radius: 0.75rem;
  padding: 1.5rem;
}
/* Unified container look when summary is appended under items */
.cart-items > #cart-summary {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: -1px; /* overlap 1px border to avoid seam */
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  color: #9ca3af;
  font-size: 1rem;
}

.summary-line:last-child {
  margin-bottom: 0;
}

.total-line {
  border-top: 1px solid #333333;
  padding-top: 1rem;
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.total-line span:last-child {
  color: #FF55FF;
  text-shadow: 0 0 10px rgba(255, 85, 255, 0.3);
}

/* Username Confirmation */
.username-confirmation {
  background: #0f0f0f;
  border: 1px solid #333333;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.confirmation-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.confirmation-header svg {
  color: #f59e0b;
}

.confirmation-header h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
}

.username-display {
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 0.5rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.username-display .username-label { flex-shrink: 0; }
.username-display .current-username { flex: 1; min-width: 0; background: #0f0f0f; border: 1px solid #333333; border-radius: 0.375rem; padding: 0.5rem 0.75rem; color: #ffffff; font-size: 0.875rem; }
.username-display .change-username-small { flex-shrink: 0; }

.username-label {
  color: #9ca3af;
  font-weight: 500;
  font-size: 0.875rem;
}

.username-value {
  color: #FF55FF;
  font-weight: 700;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  flex: 1;
  font-size: 0.875rem;
}
/* For input variant in cart */
input.current-username { font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace; }

.change-username-small {
  background: #333333;
  border: 1px solid #555555;
  border-radius: 0.375rem;
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.change-username-small:hover {
  background: #FF55FF;
  border-color: #FF55FF;
  box-shadow: 0 0 10px rgba(255, 85, 255, 0.3);
}

/* Terms Agreement */
.terms-agreement {
  background: #0f0f0f;
  border: 1px solid #333333;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  position: relative;
}

.checkbox-container input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  width: 1.25rem;
  height: 1.25rem;
  background: #333333;
  border: 2px solid #555555;
  border-radius: 0.25rem;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.checkbox-container:hover .checkmark {
  border-color: #FF55FF;
}

.checkbox-container input:checked~.checkmark {
  background: #FF55FF;
  border-color: #FF55FF;
}

.checkbox-container input:checked~.checkmark:after {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.125rem;
  width: 0.25rem;
  height: 0.5rem;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  color: #e5e7eb;
  font-size: 0.875rem;
  line-height: 1.5;
}

.checkbox-text a {
  color: #FF55FF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.checkbox-text a:hover {
  color: #e040e0;
  text-decoration: underline;
}

/* Checkout Section */
.checkout-section {
  margin-top: auto;
}

.checkout-btn {
  background: linear-gradient(135deg, #FF55FF 0%, #e040e0 100%);
  border: none;
  padding: 1.25rem 2rem;
  border-radius: 0.75rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  opacity: 0.5;
}

.checkout-btn.enabled,
.checkout-btn:not(:disabled) {
  opacity: 1;
}

.checkout-btn.enabled:hover,
.checkout-btn:not(:disabled):hover {
  transform: scale(1.02);
  box-shadow: 0 0 25px rgba(255, 85, 255, 0.4);
}

.checkout-btn:disabled {
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Footer */
.footer {
  background: #0f0f0f;
  border-top: 1px solid #1f1f1f;
  padding: 3rem 1.5rem 1rem;
  margin-top: 4rem;
}

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

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

.footer-description {
  color: #9ca3af;
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: #ffffff;
  font-size: 1rem;
}

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

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

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #FF55FF;
}

.server-info {
  color: #9ca3af;
  font-size: 0.875rem;
}

.footer-bottom {
  border-top: 1px solid #1f1f1f;
  padding-top: 2rem;
  text-align: center;
}

.footer-bottom p {
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .store-main {
    margin-left: 0;
    max-width: 100vw;
  }

  .store-sidebar {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #333333;
  }

  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 0 1rem 1rem;
  }

  .sidebar-link {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .cart-panel {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 767px) {
  .product-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    text-align: center;
  }

  .product-name {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }

  .product-pricing {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .nav-content {
    gap: 1rem;
  }

  .nav-menu {
    gap: 1rem;
  }

  .nav-menu a {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .header-actions {
    flex-direction: row;
    gap: 0.5rem;
  }

  .current-user-display {
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    text-align: center;
  }

  .user-info {
    flex-direction: column;
    gap: 0.25rem;
  }

  .cart-button {
    padding: 0.5rem;
  }

  .category-title {
    font-size: 2rem;
  }

  .announcements-title {
    font-size: 1.5rem;
  }

  .announcement-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

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

  .sidebar-nav {
    gap: 0.25rem;
  }

  .sidebar-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .sidebar-link svg {
    width: 16px;
    height: 16px;
  }

  .username-gate-content {
    padding: 2rem;
  }

  .username-gate-title {
    font-size: 2rem;
  }

  .cart-panel {
    width: 100vw;
    max-width: none;
  }

  .cart-content {
    padding: 1rem;
  }
}

/* Scrollbar Styling */
.username-gate-container::-webkit-scrollbar,
.store-sidebar::-webkit-scrollbar,
.cart-content::-webkit-scrollbar {
  width: 8px;
}

.username-gate-container::-webkit-scrollbar-track,
.store-sidebar::-webkit-scrollbar-track,
.cart-content::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.username-gate-container::-webkit-scrollbar-thumb,
.store-sidebar::-webkit-scrollbar-thumb,
.cart-content::-webkit-scrollbar-thumb {
  background: #FF55FF;
  border-radius: 4px;
}

.username-gate-container::-webkit-scrollbar-thumb:hover,
.store-sidebar::-webkit-scrollbar-thumb:hover,
.cart-content::-webkit-scrollbar-thumb:hover {
  background: #e040e0;
}

/* Policy Page Styles */
.policy-page {
  padding: 6rem 1.5rem 4rem;
  min-height: 100vh;
}

.policy-header {
  text-align: center;
  margin-bottom: 4rem;
}

.page-title {
  font-size: 3rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff 0%, #FF55FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.page-subtitle {
  font-size: 1.125rem;
  color: #9ca3af;
  font-weight: 400;
}

.policy-content {
  max-width: 800px;
  margin: 0 auto;
}

.policy-section {
  margin-bottom: 3rem;
}

.policy-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #FF55FF;
}

.policy-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #FF55FF;
  margin: 2rem 0 1rem;
}

.policy-section p {
  color: #e5e7eb;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.policy-section ul,
.policy-section ol {
  color: #e5e7eb;
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.policy-section li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.policy-section strong {
  color: #ffffff;
  font-weight: 600;
}

.policy-section a {
  color: #FF55FF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.policy-section a:hover {
  color: #e040e0;
  text-decoration: underline;
}
