/* Modern Clean Glassmorphism & Fast E-Commerce Theme */
:root {
  --primary: #1e3c72;
  --primary-accent: #2a5298;
  --accent-gold: #ffd166;
  --accent-blue: #0070ba;
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-focus: #38bdf8;
  --success: #10b981;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Announcement Bar */
.announcement-bar {
  background: linear-gradient(90deg, #1e3c72, #2a5298, #0284c7);
  color: #fff;
  text-align: center;
  padding: 10px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Header */
.header {
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 24px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.brand-badge {
  display: inline-block;
  background: var(--accent-gold);
  color: #0f172a;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  line-height: 1.1;
}

.brand-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-ebay {
  background: #3b82f6;
  color: #fff;
}

.btn-ebay:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

/* Controls Section */
.controls-section {
  padding: 30px 0 15px 0;
}

.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto 20px auto;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 14px 45px 14px 48px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.clear-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Theme Filter Pills */
.theme-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.pill {
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill:hover {
  background: var(--bg-card-hover);
  color: #fff;
}

.pill.active {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
}

/* Results Bar */
.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 25px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.condition-tag {
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 0.85rem;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding-bottom: 60px;
}

.card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.card-item:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 140%; /* Aspect ratio for standard cards */
  background: #111;
  overflow: hidden;
}

.card-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.card-img-wrap .img-back {
  opacity: 0;
}

.card-item:hover .card-img-wrap .img-front {
  opacity: 0;
}
.card-item:hover .card-img-wrap .img-back {
  opacity: 1;
}

.flip-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  pointer-events: none;
}

.card-details {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-theme-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 4px 0 2px 0;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-set-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.btn-card-buy {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-card-buy:hover {
  background: #3b82f6;
  color: #fff;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1001;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 10;
}

.modal-body {
  display: flex;
  flex-wrap: wrap;
  padding: 30px;
  gap: 30px;
}

.modal-images {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-view-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.toggle-btn {
  padding: 6px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.toggle-btn.active {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
}

.modal-img-container {
  width: 100%;
  max-width: 320px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-img {
  width: 100%;
  height: auto;
  display: block;
}

.modal-info {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
}

.modal-theme {
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 4px 0 2px 0;
  color: #fff;
}

.modal-meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.modal-condition-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
}

.condition-badge {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.condition-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-pricing {
  margin-bottom: 20px;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.price-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.price-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.deal-box {
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.3);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.85rem;
}

.deal-box strong {
  color: #38bdf8;
  display: block;
  margin-bottom: 4px;
}

.deal-box ul {
  padding-left: 20px;
  color: var(--text-muted);
}

.btn-buy-ebay {
  background: #10b981;
  color: #fff;
  padding: 14px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  margin-top: auto;
  transition: all 0.2s;
}

.btn-buy-ebay:hover {
  background: #059669;
  transform: translateY(-2px);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 30px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.disclaimer {
  font-size: 0.75rem;
  margin-top: 8px;
  color: #64748b;
}

/* Responsive */
@media (max-width: 600px) {
  .brand-title {
    font-size: 1.4rem;
  }
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .modal-body {
    padding: 20px;
  }
}
