#cart-items {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

#cart-items::-webkit-scrollbar {
  width: 6px;
}

#cart-items::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

#cart-items::-webkit-scrollbar-thumb {
  background: #ff3131;
  border-radius: 10px;
}

#cart-items::-webkit-scrollbar-thumb:hover {
  background: #e62a2a;
}
/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'League Spartan', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
}

/* Body */
body {
  background: #ff3131;
  color: white;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 1rem;
  backdrop-filter: blur(20px);
  background: #ff3131;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.trade-cart-icon {
  position: relative;
  font-size: 2rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s;
  margin-left: auto;
}

.trade-cart-icon:hover {
  transform: scale(1.1);
}

.cart-icon {
  display: inline-block;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -12px;
  background: #ff0000;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.logo {
  height: 50px;
}

.beta-badge {
  margin-left: 0.5rem;
  font-weight: 700;
  color: #ffd1d1;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Navbar-aligned sprite GIF */
.navbar .sprite-gif {
  position: static;
  height: 40px; /* smaller than logo height */
  width: auto;
  margin-left: auto;
}

@media (max-width: 640px) {
  .navbar .sprite-gif {
    height: 32px;
  }
}

.nav-links a {
  margin-left: 2rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: 0.3s;
}

.nav-links a:hover {
  color: white;
}

.cta-btn {
  padding: 0.5rem 1.5rem;
  background-color: #ff3b3b;
  border: none;
  border-radius: 999px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 2px 10px rgba(255, 59, 59, 0.3);
}

.cta-btn:hover {
  background-color: #e62a2a;
}

/* Hero */
.hero {
  text-align: center;
  padding: 6rem 2rem;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: white;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.7);
}

.hero-buttons a, .hero-buttons button {
  padding: 1.05rem 2.7rem;
  margin: 0 0.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.5rem;
  transition: 0.3s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

/* Hero badge under buttons */
.hero-badge {
  margin-top: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-radius: 999px;
  backdrop-filter: none;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.hero-badge-logo {
  height: 28px;
  width: auto;
  display: block;
}

@media (max-width: 640px) {
  .hero-badge {
    margin-top: 1rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.95rem;
  }
  .hero-badge-logo {
    height: 24px;
  }
}

/* Prevent overlapping: make buttons flex and wrap */
.hero-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* Mobile: stack buttons vertically with full width */
@media (max-width: 640px) {
  .hero h1 { font-size: 2.6rem; }
  .hero p { font-size: 1rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons a, .hero-buttons button {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0;
  }
}

.btn-primary {
  background-color: #ff3b3b;
  color: white;
}

.btn-primary:hover {
  background-color: #e62a2a;
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.6);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding: 3rem;
}

.card {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.3s;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card:hover {
  transform: scale(1.05);
}

.card img {
  width: 100%;
  display: block;
  transition: opacity 0.3s ease-in-out;
}

.card-image-container {
  position: relative;
  overflow: hidden;
}

.card-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s;
  z-index: 10;
  line-height: 1;
  padding: 0;
}

.card-image-container:hover .card-nav-btn {
  opacity: 1;
}

.card-nav-prev {
  left: 10px;
}

.card-nav-next {
  right: 10px;
}

.card-nav-btn:hover {
  background: rgba(255, 49, 49, 0.8);
  border-color: rgba(255, 49, 49, 0.5);
  transform: translateY(-50%) scale(1.1);
}

.card-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.card-image {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0.7;
  }
  to {
    opacity: 1;
  }
}

.card-info {
  padding: 1rem;
  text-align: center;
}

.card-info h3 {
  margin-bottom: 0.5rem;
  color: white;
}

.card-info p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.75rem;
}

/* Add to Trade Cart Button */
.atc-btn {
  background: linear-gradient(135deg, #ff3131, #e62a2a);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.95rem;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(255, 49, 49, 0.3);
  width: 100%;
  font-family: 'League Spartan', sans-serif;
}

.atc-btn:hover {
  background: linear-gradient(135deg, #e62a2a, #d12222);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 49, 49, 0.5);
}

.atc-btn:active {
  transform: translateY(0);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

footer a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: underline;
}

footer a:hover {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: 1rem 0 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
  font-weight: 600;
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.static-page {
  max-width: 900px;
  margin: 2.5rem auto 4rem;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.static-page h1 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.static-page .lede {
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
}

.static-page section h2 {
  margin-bottom: 0.4rem;
}

.static-page ul {
  padding-left: 1.25rem;
  color: rgba(255, 255, 255, 0.85);
}

.static-page li {
  margin-bottom: 0.35rem;
}

.static-page .disclaimer {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
}

/* Toggle switch for trades/sales */
.toggle-switch {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.5rem;
  border-radius: 50px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.toggle-btn {
  padding: 0.75rem 2rem;
  background: transparent;
  color: white;
  border: none;
  border-radius: 50px;
  font-family: 'League Spartan', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: lowercase;
}

.toggle-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.toggle-btn.active {
  background: linear-gradient(135deg, #ff3131 0%, #cc0000 100%);
  box-shadow: 0 4px 15px rgba(255, 49, 49, 0.3);
}

.toggle-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.toggle-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.love-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
}

.love-badge {
  width: 200px;
  height: auto;
  display: block;
}

/* Inventory */
.inventory {
  padding: 3rem 2rem;
  text-align: center;
}

.inventory h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: white;
}

.inventory p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.7);
}

.sort-container {
  text-align: center;
  margin-bottom: 2rem;
}

.search-sort-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.search-wrapper input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 15px;
  font-family: 'League Spartan', sans-serif;
  font-size: 1rem;
}

.search-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-wrapper input:focus {
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.6);
}

.sort-container {
  text-align: center;
}

.sort-container label {
  color: white;
  margin-right: 10px;
}

.sort-container select {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: 'League Spartan', sans-serif;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Inventory-specific larger thumbnails (50% bigger than 60x90) */
.inventory .trade-thumb-single {
  width: 90px;
  height: 135px;
}

/* Breathing room for inventory add-to-cart buttons */
.inventory .trade-item .atc-btn {
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

/* Cart Grid Layout */
.cart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.cart-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.cart-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-4px);
}

.cart-card-image {
  width: 100%;
  aspect-ratio: 2/3;
  background: rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-image {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
}

.cart-card-info {
  padding: 1rem;
  position: relative;
}

.cart-card-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  padding-right: 2rem;
}

.remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 49, 49, 0.8);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.remove-btn:hover {
  background: rgba(255, 49, 49, 1);
  transform: scale(1.1);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  margin: 5% auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  width: 80%;
  max-width: 800px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.close {
  color: white;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #ff3131;
}

.carousel {
  position: relative;
  text-align: center;
}

#carousel-img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: 12px;
}

.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
  font-size: 18px;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

.thumbnails {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.thumbnails img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
}

.thumbnails img:hover {
  border-color: #ff3131;
}

.description {
  text-align: center;
}

#modal-title {
  color: white;
  margin-bottom: 10px;
}

#modal-price {
  color: #ff3131;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

#modal-desc {
  color: rgba(255, 255, 255, 0.7);
}

/* Sell Page */
.sell-section {
  padding: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.sell-section h1 {
  text-align: center;
  margin-bottom: 1rem;
}

.sell-section p {
  text-align: center;
  margin-bottom: 3rem;
  color: rgba(255, 255, 255, 0.7);
}

.payout-note {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: -0.5rem 0 2.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.5rem;
}

.payout-note .payout-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.sell-form {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.contact-form {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.sell-form h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.contact-form h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.sell-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.sell-form input,
.sell-form textarea,
.sell-form select {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
}

.contact-form input {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
}

.sell-form select {
  color: white;
}

.sell-form select option {
  color: white;
  background: #111;
}

.sell-form input::placeholder,
.sell-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.contact-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.sell-form select:focus,
.sell-form input:focus,
.sell-form textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 10px rgba(255, 49, 49, 0.3);
}

.contact-form input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 10px rgba(255, 49, 49, 0.3);
}

.sell-form textarea {
  resize: vertical;
  min-height: 100px;
}

/* Narrow form layout */
.sell-form form,
.contact-form form,
.trade-form form {
  max-width: 640px;
  margin: 0 auto;
}

/* Fancy file input styled like other buttons */
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
  margin-top: 0.35rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff3131, #e62a2a);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 49, 49, 0.3);
  cursor: pointer;
  font-weight: bold;
  font-size: 0.95rem;
  text-align: center;
  transition: all 0.3s;
  font-family: 'League Spartan', sans-serif;
  width: 100%;
  max-width: 240px;
  margin-left: 0;
  margin-right: auto;
  position: relative;
  overflow: hidden;
}

.file-button:hover {
  background: linear-gradient(135deg, #e62a2a, #d12222);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 49, 49, 0.5);
}

.file-button:active {
  transform: translateY(0);
}

.file-button input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.selected-photos {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.selected-photos img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Make the add-to-cart and checkout buttons match site style */
#add-to-cart, #checkout, #add-card {
  background: linear-gradient(135deg, #ff3131, #e62a2a);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.95rem;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(255, 49, 49, 0.3);
  width: 100%;
  max-width: 320px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 2rem;
  font-family: 'League Spartan', sans-serif;
}

#add-to-cart:hover, #checkout:hover, #add-card:hover {
  background: linear-gradient(135deg, #e62a2a, #d12222);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 49, 49, 0.5);
}

#add-to-cart:active, #checkout:active, #add-card:active {
  transform: translateY(0);
}

.cart-section {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.cart-section h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.cart-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-item h3 {
  margin-bottom: 0.5rem;
}

.cart-item p {
  margin-bottom: 0.25rem;
  color: rgba(255, 255, 255, 0.8);
}

.cart-item button {
  background: #ff3131;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.cart-item button:hover {
  background: #e62a2a;
}

/* Trade Checkout Styling */
.trade-checkout-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.trade-summary {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  height: fit-content;
}

.trade-summary,
.declared-section,
.trade-form,
.progress-section {
  margin-bottom: 1.75rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.trade-summary h2,
.declared-section h2,
.trade-form h2,
.progress-section h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

#trade-cart-display {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

#trade-cart-display::-webkit-scrollbar {
  width: 6px;
}

#trade-cart-display::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

#trade-cart-display::-webkit-scrollbar-thumb {
  background: #ff3131;
  border-radius: 10px;
}

#trade-cart-display::-webkit-scrollbar-thumb:hover {
  background: #e62a2a;
}

.trade-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.trade-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.trade-thumb-single {
  width: 60px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.trade-item-header > div {
  flex: 1;
}

.trade-item p {
  margin-bottom: 0.25rem;
  color: rgba(255, 255, 255, 0.8);
}

.trade-item-price {
  font-weight: bold;
  color: #ff3131;
  font-size: 1rem;
}

.remove-btn {
  background: rgba(255, 49, 49, 0.3);
  color: #ff3131;
  border: 1px solid #ff3131;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  font-size: 1.1rem;
  min-width: 40px;
  flex-shrink: 0;
}

.remove-btn:hover {
  background: #ff3131;
  color: white;
}

/* Progress Bar */
.progress-section {
  margin-top: 2rem;
}

.progress-bar-wrapper {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  height: 50px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  margin-bottom: 1rem;
}

.progress-bar {
  background: linear-gradient(90deg, #ff3131, #ff6b6b);
  height: 100%;
  width: 0%;
  transition: width 0.4s ease-out, background 0.4s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 49, 49, 0.5);
  min-width: 50px;
  padding-left: 10px;
  position: relative;
}

.progress-bar.filled {
  background: linear-gradient(90deg, #00d084, #00ff9a);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 208, 132, 0.5);
}

.progress-text {
  font-weight: bold;
  color: #ff3131;
  margin-bottom: 0.25rem;
}

.progress-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Trade Form */
.trade-section {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 1100px;
  margin: 0 auto 3rem;
}

.trade-section h2 {
  margin-bottom: 1.5rem;
  font-size: 1.9rem;
}

.trade-section h1 {
  text-align: left;
  font-size: 2.6rem;
  margin-bottom: 1.5rem;
}

.trade-section label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.9);
}

.trade-section input,
.trade-section textarea,
.trade-section select {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  font-family: 'League Spartan', sans-serif;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}

.trade-section select {
  color: black;
}

.trade-section select option {
  color: black;
  background: white;
}

.trade-section input:focus,
.trade-section textarea:focus,
.trade-section select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 49, 49, 0.5);
  box-shadow: 0 0 15px rgba(255, 49, 49, 0.3);
}

.trade-section input::placeholder,
.trade-section textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Card Add to Trade Form */
.card-input-group {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-input-group h3 {
  margin-bottom: 1rem;
  color: #ff3131;
}

.add-card-btn {
  background: #ff3131;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  margin-bottom: 1rem;
}

.add-card-btn:hover {
  background: #e62a2a;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 49, 49, 0.4);
}

/* Declared Cards List */
.declared-section {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  height: fit-content;
  margin-top: 2rem;
}

.declared-section h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

#declared-cards {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

#declared-cards::-webkit-scrollbar {
  width: 6px;
}

#declared-cards::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

#declared-cards::-webkit-scrollbar-thumb {
  background: #ff3131;
  border-radius: 10px;
}

#declared-cards::-webkit-scrollbar-thumb:hover {
  background: #e62a2a;
}

.declared-item {
  background: rgba(255, 49, 49, 0.1);
  border-left: 3px solid #ff3131;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.declared-item-info p {
  margin-bottom: 0.25rem;
  color: rgba(255, 255, 255, 0.8);
}

.declared-item-info .price {
  color: #ff3131;
  font-weight: bold;
  font-size: 1.1rem;
}

.remove-declared-btn {
  background: rgba(255, 49, 49, 0.3);
  color: #ff3131;
  border: 1px solid #ff3131;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
}

.remove-declared-btn:hover {
  background: #ff3131;
  color: white;
}

/* Cash Payment Section */
.cash-payment {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cash-payment p {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  line-height: 1;
}

.cash-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: bold;
  white-space: nowrap;
  vertical-align: middle;
}

.cash-checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #ff3131;
  margin: 0;
  vertical-align: middle;
  flex-shrink: 0;
}

.remaining-balance {
  background: rgba(255, 49, 49, 0.1);
  border-left: 3px solid #ff3131;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 4px;
  display: none;
}

.remaining-balance.show {
  display: block;
}

.remaining-balance p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.remaining-balance .amount {
  font-size: 1.5rem;
  color: #ff3131;
  font-weight: bold;
}

/* Submit Button */
.submit-btn {
  background: linear-gradient(135deg, #ff3131, #e62a2a);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  width: 100%;
  max-width: 320px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(255, 49, 49, 0.3);
  margin-top: 1.5rem;
}

.submit-btn:hover {
  background: linear-gradient(135deg, #e62a2a, #d12222);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 49, 49, 0.5);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Custom Alert Modal */
.custom-alert-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.custom-alert-content {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(30px);
  border-radius: 28px;
  padding: 2.5rem;
  border: 2px solid rgba(255, 49, 49, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 49, 49, 0.15);
  max-width: 420px;
  width: 90%;
  text-align: center;
  animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.custom-alert-content p {
  color: rgba(255, 255, 255, 0.98);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.custom-alert-content .btn-primary {
  background: linear-gradient(135deg, #ff3131, #e62a2a);
  color: white;
  padding: 0.85rem 2.5rem;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 20px rgba(255, 49, 49, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.custom-alert-content .btn-primary:hover {
  background: linear-gradient(135deg, #e62a2a, #d12222);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 49, 49, 0.5);
}

.custom-alert-content .btn-primary:active {
  transform: translateY(-1px);
}


@media (max-width: 1024px) {
  .trade-checkout-container {
    grid-template-columns: 1fr;
  }
  
  .trade-summary {
    order: 2;
  }
  
  .trade-section {
    order: 1;
  }
}
/* Loading overlay */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.loading-overlay.active {
  display: flex;
}

.loading-content {
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 49, 49, 0.3);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  min-width: 300px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 49, 49, 0.2);
  border-top-color: #ff3131;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: white;
}

.loading-progress {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
}