:root {
  --bg-color: #06060c;
  --surface-color: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --accent-color: #3b82f6;
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(10, 10, 25, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.5);
  --font-main: 'Inter', system-ui, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

body::before {
  content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 90% 90%, rgba(45, 212, 191, 0.05) 0%, transparent 50%);
  z-index: -1; pointer-events: none;
}

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

/* Header - Premium Glassmorphism */
.main-header {
  height: 80px; background: var(--glass-bg);
  backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center;
  transition: all 0.3s ease;
}

.main-header nav { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

#logo-link { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: white; transition: transform 0.3s ease; flex-shrink: 0; }
#logo-link:hover { transform: scale(1.02); }
#logo-link:hover .logo-icon { filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.6)); }

.logo-icon { 
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
}

.logo h1 { font-family: var(--font-heading); font-size: 1.6rem; letter-spacing: -1px; margin: 0; line-height: 1; font-weight: 700; }
.logo h1 span { background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.logo h1 small { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); margin-left: 4px; text-transform: uppercase; letter-spacing: 2px; }

/* Search Container */
.search-container {
  flex: 1; max-width: 500px; display: flex; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color); border-radius: 16px; padding: 4px 12px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.search-container:focus-within { 
  border-color: var(--accent-color); 
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}
.search-container input { flex: 1; background: transparent; border: none; color: white; padding: 10px; outline: none; font-size: 1rem; }
.search-container button { background: transparent; border: none; color: var(--text-secondary); cursor: pointer; padding: 8px; transition: color 0.2s; }
.search-container button:hover { color: white; }

.nav-controls { display: flex; align-items: center; gap: 1.5rem; flex-shrink: 0; }

/* Filters */
.filter-group { display: flex; gap: 0.75rem; align-items: center; }
#game-filter, #price-sort {
  background: rgba(255,255,255,0.03); color: white;
  border: 1px solid var(--border-color); padding: 10px 16px; border-radius: 12px; 
  font-size: 0.85rem; font-weight: 600; cursor: pointer; outline: none; transition: all 0.3s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
#game-filter:hover, #price-sort:hover { border-color: var(--accent-color); background-color: rgba(255,255,255,0.08); }

#game-filter option, #price-sort option {
  background-color: #12121e;
  color: white;
}

/* Lang Switcher */
.lang-switcher {
  display: flex; background: rgba(255,255,255,0.03); 
  padding: 4px; border-radius: 12px; border: 1px solid var(--border-color);
  gap: 2px;
}
.lang-btn {
  background: transparent; border: none; color: var(--text-secondary);
  padding: 6px 12px; border-radius: 8px; font-size: 0.75rem; 
  font-weight: 800; cursor: pointer; transition: all 0.2s;
}
.lang-btn:hover { color: white; }
.lang-btn.active { background: white; color: black; }

/* Main Section */
#hero { text-align: center; padding: 6rem 1rem; max-width: 800px; margin: 0 auto; }
#hero h2 { font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 1.5rem; font-family: var(--font-heading); color: white; letter-spacing: -2px; }
#hero p { font-size: 1.15rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

/* Results Grid */
#results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
  padding: 3rem 0;
}

.price-disclaimer {
  grid-column: 1 / -1; color: var(--text-secondary); font-size: 0.85rem;
  background: rgba(59, 130, 246, 0.05); padding: 1.25rem 1.5rem;
  border-radius: 16px; border-left: 4px solid var(--accent-color); margin-bottom: 1rem;
}

.card-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.card-item:hover {
  transform: translateY(-8px);
  border-color: var(--accent-color);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 30px 60px -12px rgba(0,0,0,0.5);
}

.card-image {
  position: relative; aspect-ratio: 2.5/3.5; background: #000;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card-image img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.6s ease; }
.card-item:hover .card-image img { transform: scale(1.05); }

.game-tag {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: 8px;
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase; z-index: 5;
  letter-spacing: 0.5px;
}
.game-magic { background: #7c2d12; color: #fff; }
.game-pokemon { background: #854d0e; color: #fff; }
.game-yu-gi-oh { background: #4c1d95; color: #fff; }

.card-info { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; gap: 1rem; }
.card-info h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.3; color: white; }
.set-name { color: var(--text-secondary); font-size: 0.9rem; font-style: italic; }

.price-table { width: 100%; border-top: 1px solid var(--border-color); padding-top: 1rem; margin-top: auto; border-collapse: collapse; }
.price-table td { padding: 8px 0; font-size: 0.9rem; }
.price-cell { text-align: right; }
.price-value { 
  display: inline-block; background: rgba(16, 185, 129, 0.1); color: #10b981;
  padding: 4px 12px; border-radius: 8px; font-weight: 700; text-decoration: none;
  transition: all 0.2s; border: 1px solid transparent;
}
.price-value:hover { background: rgba(16, 185, 129, 0.25); border-color: #10b981; transform: scale(1.05); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  z-index: 10001; opacity: 0; animation: fadeIn 0.3s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

.modal-content {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: #0a0a14; border: 1px solid var(--glass-border);
  border-radius: 32px; width: 95%; max-width: 900px; max-height: 90vh;
  overflow-y: auto; z-index: 10002; display: flex; flex-direction: column;
  box-shadow: 0 50px 100px -20px rgba(0,0,0,1);
}

.modal-body { display: flex; padding: 3rem; gap: 3rem; }
.modal-image { flex: 0 0 320px; }
.modal-image img { width: 100%; border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.6); }

.modal-info { flex: 1; display: flex; flex-direction: column; gap: 1.5rem; }
.modal-info h2 { font-size: 2.25rem; font-weight: 800; line-height: 1.1; letter-spacing: -1px; }

.card-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.detail-item { background: rgba(255,255,255,0.03); padding: 1rem; border-radius: 14px; border: 1px solid var(--border-color); }
.detail-item .label { display: block; font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.detail-item .value { font-weight: 600; font-size: 0.95rem; }

.modal-prices h3 { font-size: 1.25rem; margin-bottom: 1rem; }
.prices-links-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.purchase-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem; background: rgba(255,255,255,0.03); border-radius: 16px;
  text-decoration: none; color: white; border: 1px solid var(--border-color);
  transition: all 0.3s;
}
.purchase-link:hover { border-color: var(--accent-color); background: rgba(59, 130, 246, 0.05); transform: translateX(5px); }
.purchase-link .price { color: #10b981; font-weight: 800; font-size: 1.25rem; }

/* Responsive adjustments */
@media (max-width: 1024px) {
  .main-header nav { gap: 1rem; }
  .search-container { max-width: 350px; }
  #hero h2 { font-size: 2.75rem; }
}

@media (max-width: 768px) {
  .main-header { height: auto; padding: 1rem 0; position: relative; }
  .main-header nav { flex-direction: column; gap: 1.25rem; align-items: flex-start; }
  .logo { width: 100%; justify-content: center; }
  .search-container { max-width: 100%; width: 100%; }
  .nav-controls { width: 100%; flex-direction: column; align-items: stretch; gap: 1rem; }
  .filter-group { flex-direction: column; align-items: stretch; width: 100%; }
  .lang-switcher { justify-content: center; }
  
  #hero { padding: 4rem 1rem; }
  #hero h2 { font-size: 2.25rem; }
  
  .modal-body { flex-direction: column; padding: 2rem; gap: 2rem; }
  .modal-image { flex: none; width: 100%; max-width: 280px; margin: 0 auto; }
  .modal-info h2 { font-size: 1.75rem; text-align: center; }
  
  #results-grid { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1rem; }
}

.hidden { display: none !important; }
.skeleton { background: linear-gradient(90deg, #12121e 25%, #1a1a2e 50%, #12121e 75%); background-size: 200% 100%; animation: skeletonLoading 1.5s infinite linear; }
@keyframes skeletonLoading { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton-card { height: 450px; border-radius: 24px; }

/* FAQ Section Styling */
.seo-faq {
  margin-top: 4rem;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 24px;
}
.seo-faq h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--accent-color);
}
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.faq-item h4 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: white;
}
.faq-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .faq-grid { grid-template-columns: 1fr; }
  .seo-faq { padding: 1.5rem; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
