:root {
  --primary: #C4A24C;
  --primary-hover: #A68940;
  --primary-light: #CCAF66;
  --dark-bg: #121212;
  --mid-bg: #1e1e1e;
  --text-light: #eeeeee;
  --text-muted: #bbbbbb;
}

/* ------------------------------------------------------------- */
/* BASE */
/* ------------------------------------------------------------- */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ------------------------------------------------------------- */
/* HEADER */
/* ------------------------------------------------------------- */
.site-header {
  background-color: var(--mid-bg);
  border-bottom: 2px solid var(--primary);
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  width: 70px;
  height: auto;
  object-fit: contain;
}

.header-how-to-btn {
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  height: auto;
  min-height: auto;
  border-radius: 6px;
}

.game-select {
  padding: 0.6rem;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid var(--primary);
  background-color: var(--mid-bg);
  color: var(--text-light);
}

h1 {
  color: var(--primary);
  font-size: 1.6rem;
  text-transform: uppercase;
  margin: 0;
  text-align: right;
  flex: 1;
}

/* ------------------------------------------------------------- */
/* MAIN LAYOUT */
/* ------------------------------------------------------------- */
.main-layout {
  display: flex;
  justify-content: space-between;
  flex: 1;
  padding: 1rem 2rem;
  gap: 2rem;
}

/* ------------------------------------------------------------- */
/* SEARCH SECTION */
/* ------------------------------------------------------------- */
.search-section {
  flex: 2;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.set-filter {
  flex-basis: 100%; /* always below */
}


.search-input-wrapper {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.search-box input {
  width: 280px;
  padding: 0.6rem;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid var(--primary);
  background-color: var(--mid-bg);
  color: var(--text-light);
}
.search-box input:focus {
  outline: none;
  border: 1px solid var(--primary);
}

.search-box button {
  background-color: var(--primary);
  color: var(--dark-bg);
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}
.search-box button:hover {
  background-color: var(--primary-hover);
}


/* ------------------------------------------------------------- */
/* SET FILTER (inline with search bar) */
/* ------------------------------------------------------------- */
.set-filter {
  width: auto;
  min-width: 220px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--primary);
  border-radius: 5px;
  font-size: 1rem;
  background-color: var(--mid-bg);
  color: var(--text-light);
  transition: border-color 0.2s ease;
  height: 42px; /* aligns with input + button */
}

.set-filter:focus {
  outline: none;
  border-color: var(--primary);
}

.set-filter:disabled {
  background-color: #2a2a2a;
  color: var(--text-muted);
  cursor: not-allowed;
  border: 1px solid var(--primary); /* always gold */
}


@media (max-width: 600px) {
  .search-box {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box input,
  .search-box button,
  .set-filter {
    width: 100%;
  }
}

/* ------------------------------------------------------------- */
/* RESULTS AREA */
/* ------------------------------------------------------------- */
.card-results {
  background-color: var(--mid-bg);
  border-radius: 10px;
  padding: 1rem 2rem;
  border: 1px solid var(--primary);
  min-height: 300px;
  margin-top: 1rem;
}

.card {
  padding: 1rem 0;
  border-bottom: 1px solid #333;
  cursor: pointer;
  transition: background 0.2s;
}

.card:last-child {
  border-bottom: none;
}

.card:hover {
  background-color: color-mix(in srgb, var(--primary) 8%, transparent);
}

/* --- Card content layout --- */
.card-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
}

/* --- Card image container --- */
.card-img-container {
  width: 90px;
  height: 130px;
  background-color: #0e0e0e;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

/* --- Card image itself --- */
.card-img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  transition: opacity 0.3s ease;
  opacity: 0;
}

/* When image loads, fade in */
.card-img[src] {
  opacity: 1;
}

/* --- Loading / error text placeholder --- */
.image-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  pointer-events: none;
}

/* --- Card details (right side) --- */
.card-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 130px;
}

.card h3 {
  margin-top: 0;
  color: var(--primary);
  font-size: 1.1rem;
}

.card p {
  margin: 0.3rem 0;
  color: var(--text-muted);
  line-height: 1.3;
}

.card strong {
  color: var(--text-light);
}

.suggestion-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  transition: opacity 0.3s ease;
}

.image-loading-small {
  width: 40px;
  height: 40px;
  background: var(--mid-bg, #222);
  border: 1px solid var(--primary, #c9a33b);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #aaa);
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}


.suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  position: relative;
}

.suggestion-item:hover {
  background-color: #f5f5f5;
}



/* ------------------------------------------------------------- */
/* RIGHT PANEL: CART */
/* ------------------------------------------------------------- */
.cart {
  flex: 1;
  background-color: var(--mid-bg);
  border: 1px solid var(--primary);
  border-radius: 10px;
  padding: 1rem;
  height: fit-content;
  max-height: 85vh;
  overflow-y: auto;
}

.cart h2 {
  margin-top: 0;
  color: var(--primary);
  text-align: center;
  font-size: 1.3rem;
}


/* ------------------------------------------------------------- */
/* ENHANCED CART ITEM STYLING WITH QUANTITY CONTROLS - FIXED */
/* ------------------------------------------------------------- */
#cartList {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 400px;
  overflow-y: auto;
}

.cart-item {
  border-bottom: 1px solid #333;
  padding: 0.8rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative; /* Add this for proper positioning context */
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.cart-item-name {
  flex: 1;
  min-width: 0;
}

.cart-item-name strong {
  display: block;
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.2rem;
  word-wrap: break-word;
}

.cart-item-details {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
  line-height: 1;
  position: static; /* Remove absolute positioning */
}

.cart-item-remove:hover {
  color: #ff6b6b;
  transform: scale(1.1);
}

.cart-item-pricing {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: color-mix(in srgb, var(--primary) 10%, transparent);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--primary);
  position: static; /* Remove absolute positioning */
}

.qty-btn {
  background-color: var(--primary);
  color: var(--dark-bg);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.1s;
  padding: 0;
  line-height: 1;
  position: static; /* Remove absolute positioning */
}

.qty-btn:hover {
  background-color: var(--primary-hover);
  transform: scale(1.05);
}

.qty-btn:active {
  transform: scale(0.95);
}

.quantity-display {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  font-size: 1rem;
}

.price-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 0;
}

.unit-prices,
.line-totals {
  font-size: 0.9rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.unit-prices {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.line-totals {
  font-weight: 600;
}

.price-label {
  color: var(--primary);
  font-weight: 600;
}

.divider {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .cart-item-pricing {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .quantity-controls {
    justify-content: center;
  }

  .price-info {
    font-size: 0.85rem;
  }
}

.totals {
  margin-top: 1rem;
  border-top: 1px solid var(--primary);
  padding-top: 1rem;
  text-align: right;
  color: var(--text-light);
  font-weight: bold;
}
.totals strong {
  color: var(--primary);
}

.cart-actions {
  display: flex;
  gap: 0.8rem;
  position: sticky;
  bottom: 0;
  background: var(--mid-bg);
  padding-top: 0.8rem;
  border-top: 1px solid var(--primary);
}

.cart-actions button {
  flex: 1;
}

.cart-prices {
  font-size: 0.9rem;
  color: var(--text-light);
}

.cart-prices strong {
  color: var(--primary);
}



/* ------------------------------------------------------------- */
/* AUTOCOMPLETE DROPDOWN */
/* ------------------------------------------------------------- */
.suggestions {
  position: absolute;
  top: 2.5rem;
  width: 100%;
  background: var(--mid-bg);
  border: 1px solid var(--primary);
  border-radius: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 10;
  max-height: 250px;
  overflow-y: auto;
}

.suggestions:empty {
  display: none;
  border: none;
}

.suggestions li {
  padding: 0.4rem 0.8rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
}

.suggestions li:hover {
  background-color: rgba(255, 215, 0, 0.1);
}

.card-thumb {
  width: 28px;
  height: 40px;
  object-fit: cover;
  margin-right: 0.6rem;
  border-radius: 3px;
  border: 1px solid var(--primary);
}

.suggestion-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card-name {
  color: var(--text-light);
  font-weight: 500;
}

.set-code {
  color: var(--primary);
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ------------------------------------------------------------- */
/* FOOTER */
/* ------------------------------------------------------------- */
footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  background-color: var(--mid-bg);
  border-top: 1px solid var(--primary);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

footer p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.footer-links {
  margin-bottom: 0.3rem;
}

.footer-link {
  color: var(--primary-light);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-separator {
  color: var(--text-muted);
  margin: 0 0.5rem;
}

/* Link and logo styling */
.nephbox-link {
  color: #8e63f3;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nephbox-link:hover {
  color: #8e63f3;
}

.nephbox-logo {
  width: 20px;
  height: auto;
  vertical-align: middle;
  filter: brightness(1.2);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.nephbox-link:hover .nephbox-logo {
  transform: scale(1.1);
  filter: brightness(1.5);
}

/* Mobile scaling */
@media (max-width: 480px) {
  .nephbox-logo {
    width: 18px;
  }

  footer {
    font-size: 0.85rem;
  }
}


/* ------------------------------------------------------------- */
/* SCROLLBAR STYLING */
/* ------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}


/* ------------------------------------------------------------- */
/* UPDATED GAME SELECT DROPDOWN */
/* ------------------------------------------------------------- */
.game-select {
  padding: 0.6rem 1rem;
  font-size: 1.1rem;
  border-radius: 6px;
  border: 1px solid #000000;
  background-color: var(--primary);
  color: #000000;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23000000' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.7rem top 50%;
  background-size: 0.65rem auto;
  padding-right: 2rem;
  min-width: 200px;
}

.game-select:focus {
  outline: none;
  border-color: #000000;
}

.game-select:hover {
  border-color: #000000;
  background-color: var(--primary-light);
}

.game-select option {
  background-color: var(--primary);
  color: #000000;
  padding: 0.5rem;
}

.game-select option:hover {
  background-color: var(--primary-light);
}

/* ------------------------------------------------------------- */
/* GAME STATUS MESSAGE */
/* ------------------------------------------------------------- */
.game-status {
  background-color: rgba(196, 76, 76, 0.1);
  border: 1px solid #c44c4c;
  border-radius: 5px;
  padding: 1rem;
  margin: 1rem 0;
  text-align: center;
  color: #ff6b6b;
}

.game-status p {
  margin: 0;
  font-weight: 500;
}

/* ------------------------------------------------------------- */
/* CART ACTION BUTTONS â€” perfectly aligned side-by-side */
/* ------------------------------------------------------------- */
.cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center; /* aligns buttons perfectly on the same baseline */
  gap: 0.8rem;
  position: sticky;
  bottom: 0;
  background: var(--mid-bg);
  padding-top: 0.8rem;
  border-top: 1px solid var(--primary);
}

/* Ensure both buttons share identical layout metrics */
.cart-actions button {
  flex: 1;
  height: 50px; /* identical height */
  box-sizing: border-box;
  padding: 0.8rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease;
}

/* --- Export Button --- */
.export-btn {
  background-color: var(--mid-bg);
  color: var(--text-light);
  border: 2px solid var(--primary);
}

.export-btn:hover {
  background-color: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
}

/* --- Clear Cart Button --- */
.clear-cart-btn {
  background-color: var(--primary);
  color: var(--dark-bg);
  border: 2px solid var(--primary);
}

.clear-cart-btn:hover {
  background-color: var(--primary-hover);
  transform: scale(1.02);
}

/* --- How To Use Button --- */
.how-to-use-btn {
  background-color: var(--mid-bg);
  color: var(--text-light);
  border: 2px solid #17a2b8;
}

.how-to-use-btn:hover {
  background-color: rgba(23, 162, 184, 0.1);
  color: #17a2b8;
}

/* --- Disclaimer --- */
.disclaimer {
  margin-top: 1rem;
  padding: 1rem;
  background-color: color-mix(in srgb, var(--primary) 10%, transparent);
  border: 1px solid var(--primary);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

.disclaimer strong {
  color: var(--primary);
}

.disclaimer p {
  margin: 0;
}

/* Stack vertically on mobile */
@media (max-width: 600px) {
  .cart-actions {
    flex-direction: column;
  }
}


/* ------------------------------------------------------------- */
/* PRICE LINE STYLING */
/* ------------------------------------------------------------- */
.price-line {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #333;
}

.price-label {
  color: var(--primary);
  font-weight: 600;
}

.divider {
  color: var(--text-muted);
  margin: 0 0.5rem;
}

/* ------------------------------------------------------------- */
/* FOIL TOGGLE SWITCH */
/* ------------------------------------------------------------- */
.foil-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.foil-label {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Toggle switch container */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

/* Hide default checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Slider design */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #444;
  transition: 0.3s;
  border-radius: 24px;
  border: 1px solid var(--primary);
}

/* Knob */
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 2px;
  background-color: var(--primary);
  transition: 0.3s;
  border-radius: 50%;
}

/* Checked state */
.switch input:checked + .slider {
  background-color: var(--primary);
}

.switch input:checked + .slider:before {
  transform: translateX(22px);
  background-color: var(--dark-bg);
}


/* ------------------------------------------------------------- */
/* ðŸ“± MOBILE LAYOUT ADJUSTMENT â€” FINAL REFINEMENT */
/* ------------------------------------------------------------- */
@media (max-width: 768px) {
  /* HEADER: logo + select side-by-side, title below */
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem;
  }

  .header-left {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .header-center {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .header-how-to-btn {
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
  }

  .game-select {
    width: auto;
    min-width: 150px;
    font-size: 0.95rem;
  }

  h1 {
    order: 3;
    font-size: 1.2rem;
    margin-top: 0.4rem;
    text-align: left;
    width: 100%;
  }

  /* MAIN: stack vertically â€” search/results first, cart last */
  .main-layout {
    flex-direction: column;
    padding: 0.8rem;
    gap: 1rem;
  }

  /* SEARCH INPUTS â€” full width fit */
  .search-box {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }

  .search-box input {
    width: 100%;
    box-sizing: border-box;
  }

  .search-box button {
    width: 100%;
  }

  .set-filter {
    width: 100%;
    box-sizing: border-box;
  }

  /* Card results area */
  .card-results {
    padding: 0.8rem 1rem;
    border-radius: 8px;
  }

  /* Cart (Selected Cards) section */
  .cart {
    order: 3;
    width: 100%;
    margin-top: 1rem;
    border: 1px solid var(--primary);
    border-radius: 10px;
    padding: 1rem;
    box-sizing: border-box;
    background-color: var(--mid-bg);
  }

  .cart h2 {
    text-align: left;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }

  #cartList li {
    font-size: 0.95rem;
    padding: 0.5rem 0;
  }

  .totals {
    text-align: left;
    font-size: 0.95rem;
  }

  /* Buttons stack neatly */
  .cart-actions {
    flex-direction: column;
    gap: 0.6rem;
  }

  .cart-actions button {
    width: 100%;
    font-size: 1rem;
  }

  /* Keep footer readable and padded */
  footer {
    font-size: 0.85rem;
    padding: 0.8rem;
  }
}

/* ------------------------------------------------------------- */
/* ðŸŽ¨ THEMED ALERTS & PROMPTS */
/* ------------------------------------------------------------- */

/* Alert Styles */
.theme-alert {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 300px;
  max-width: 500px;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border: 2px solid;
  background-color: var(--mid-bg);
  color: var(--text-light);
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  animation: slideInRight 0.3s ease-out;
}

.theme-alert-message {
  flex: 1;
  white-space: pre-line;
  line-height: 1.4;
}

.theme-alert-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: background-color 0.2s ease;
}

.theme-alert-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Alert Types */
.theme-alert-success {
  border-color: #4caf50;
  background: linear-gradient(135deg, var(--mid-bg) 0%, rgba(76, 175, 80, 0.1) 100%);
}

.theme-alert-error {
  border-color: #f44336;
  background: linear-gradient(135deg, var(--mid-bg) 0%, rgba(244, 67, 54, 0.1) 100%);
}

.theme-alert-warning {
  border-color: #ff9800;
  background: linear-gradient(135deg, var(--mid-bg) 0%, rgba(255, 152, 0, 0.1) 100%);
}

.theme-alert-info {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--mid-bg) 0%, color-mix(in srgb, var(--primary) 10%, transparent) 100%);
}

/* Prompt Styles */
.theme-prompt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  animation: fadeIn 0.2s ease-out;
}

.theme-prompt {
  background-color: var(--mid-bg);
  border: 2px solid var(--primary);
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: scaleIn 0.2s ease-out;
}

.theme-prompt-header {
  padding: 1.2rem 1.5rem 0.5rem;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.theme-prompt-header h3 {
  margin: 0;
  color: var(--primary);
  font-size: 1.3rem;
}

.theme-prompt-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: background-color 0.2s ease;
}

.theme-prompt-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.theme-prompt-body {
  padding: 1.5rem;
}

.theme-prompt-body p {
  margin: 0 0 1rem 0;
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.4;
}

.theme-prompt-input {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid var(--primary);
  background-color: var(--dark-bg);
  color: var(--text-light);
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.theme-prompt-input:focus {
  outline: none;
  border-color: var(--primary-hover);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent);
}

.theme-prompt-textarea {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid var(--primary);
  background-color: var(--dark-bg);
  color: var(--text-light);
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.theme-prompt-textarea:focus {
  outline: none;
  border-color: var(--primary-hover);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent);
}

.theme-prompt-textarea::placeholder {
  color: var(--text-muted);
}

.theme-prompt-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  gap: 0.8rem;
  justify-content: center; /* Changed from flex-end to center */
  align-items: center;
}

.theme-prompt-btn {
  padding: 0.7rem 1.5rem;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid;
  min-width: 100px; /* Added for consistent button sizing */
}

.theme-prompt-cancel {
  background-color: transparent;
  color: var(--text-light);
  border-color: #666;
}

.theme-prompt-cancel:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

.theme-prompt-confirm {
  background-color: var(--primary);
  color: var(--dark-bg);
  border-color: var(--primary);
}

.theme-prompt-confirm:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

/* Animations */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .theme-alert {
    top: 10px;
    right: 10px;
    left: 10px;
    min-width: auto;
    max-width: none;
  }

  .theme-prompt {
    width: 95%;
    margin: 1rem;
  }

  .theme-prompt-footer {
    flex-direction: column;
  }

  .theme-prompt-btn {
    width: 100%;
  }
}

/* ------------------------------------------------------------- */
/* ENHANCED FORM STYLES FOR EXPORT PROMPT - MAINTAINING GOLD THEME */
/* ------------------------------------------------------------- */

/* Enhanced form styles for email prompt */
.form-group {
  margin-bottom: 1.5rem; /* Increased spacing between form groups */
  text-align: left;
}

.form-label {
  display: block;
  margin-bottom: 0.75rem; /* Increased spacing between label and input */
  font-weight: 600;
  color: var(--text-light); /* Using your theme variable */
  font-size: 1rem;
}

.form-help {
  display: block;
  margin-top: 0.5rem; /* Increased spacing above help text */
  font-size: 0.8rem;
  color: var(--text-muted); /* Using your theme variable */
  font-style: italic;
  line-height: 1.4;
}

.theme-prompt-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--primary); /* Using your gold theme */
  border-radius: 5px; /* Matching your theme's border radius */
  font-size: 1rem;
  background-color: var(--dark-bg); /* Using your theme variable */
  color: var(--text-light); /* Using your theme variable */
  transition: border-color 0.3s ease;
  margin-top: 0.25rem; /* Extra spacing above input */
  box-sizing: border-box;
}

.theme-prompt-input:focus {
  outline: none;
  border-color: var(--primary-hover);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent);
}

/* Additional spacing improvements for the prompt body */
.theme-prompt-body {
  padding: 1.5rem;
}

.theme-prompt-body p {
  margin-bottom: 1.5rem; /* More space below the main instruction */
  line-height: 1.5;
  color: var(--text-light); /* Using your theme variable */
}

/* Ensure the form groups in the export prompt use these styles */
.theme-prompt .form-group {
  margin-bottom: 1.5rem;
}

.theme-prompt .form-label {
  margin-bottom: 0.75rem;
}

.theme-prompt .theme-prompt-input {
  margin-top: 0.25rem;
}
/* ------------------------------------------------------------- */
/* NO IMAGE PLACEHOLDER */
/* ------------------------------------------------------------- */
.no-image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  border-radius: 6px;
  padding: 8px;
  box-sizing: border-box;
  animation: fadeIn 0.3s ease-in;
}

.no-image-placeholder svg {
  color: #666;
  margin-bottom: 6px;
  opacity: 0.8;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.no-image-placeholder span {
  color: #888;
  font-size: 10px;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  word-wrap: break-word;
}

/* Responsive sizing for smaller containers */
@media (max-width: 768px) {
  .no-image-placeholder svg {
    width: 28px;
    height: 28px;
  }

  .no-image-placeholder span {
    font-size: 9px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* ========================================
   Search Guide Styles (Dark Theme)
   ======================================== */
.search-guide {
  margin-top: 1rem;
  border-top: 1px solid #333;
  padding-top: 1rem;
}

.search-guide-toggle {
  width: 100%;
  background: var(--mid-bg);
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 12px 15px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-guide-toggle:hover {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-color: var(--primary-hover);
}

#searchGuideIcon {
  font-size: 10px;
  color: var(--primary);
  transition: transform 0.2s ease;
}

.search-guide-content {
  padding: 15px;
  background: var(--dark-bg);
  border: 1px solid #333;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 13px;
}

.search-guide-content h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
}

.search-example {
  margin: 12px 0;
  padding: 8px 12px;
  background: var(--mid-bg);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
}

.search-example strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text-light);
  font-size: 12px;
}

.search-example code {
  background: color-mix(in srgb, var(--primary) 20%, transparent);
  padding: 3px 8px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--primary-light);
  margin-right: 8px;
}

.search-tip {
  margin-top: 15px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  font-size: 12px;
}

.search-tip strong {
  color: var(--primary);
}

.search-tip code {
  background: color-mix(in srgb, var(--primary) 20%, transparent);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--primary-light);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .search-guide {
    margin-top: 15px;
  }

  .search-guide-content {
    font-size: 12px;
  }

  .search-example {
    padding: 6px 10px;
  }
}

/* -----------------------------------------
   Filter Info Message (Admin Filters)
   ----------------------------------------- */
.filter-info-message {
  background: var(--mid-bg);
  border: 2px solid var(--primary);
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  color: var(--text-light);
}

.filter-info-message p {
  margin: 0 0 10px 0;
  line-height: 1.6;
}

.filter-info-message p:last-of-type {
  margin-bottom: 15px;
}

.filter-info-message ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.filter-info-message li {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-left: 3px solid var(--primary);
  padding: 10px 15px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.filter-info-message li:last-child {
  margin-bottom: 0;
}

.filter-info-message strong {
  color: var(--primary);
}
