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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
}

header {
  background: #1e293b;
  border-bottom: 2px solid #334155;
  padding: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title {
  font-size: 2.2rem;
  font-weight: bold;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pokeball-icon {
  width: 60px;
  height: 60px;
  background: white;
  border: 4px solid #60a5fa;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 6px 12px rgba(96, 165, 250, 0.4);
  overflow: hidden;
  animation: bounce 2s infinite;
}

/* Top red half */
.pokeball-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to bottom, #ef4444, #dc2626);
}

/* Black horizontal line */
.pokeball-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 6px;
  background: #334155;
  transform: translateY(-50%);
  z-index: 1;
}

/* Center white button */
.pokeball-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  background: white;
  border: 3px solid #334155;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.4);
}

/* Bounce animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.social-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.discord-invite, .reddit-link {
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.discord-invite {
  background: #5865f2;
  border: 2px solid #4752c4;
}

.discord-invite:hover {
  background: #4752c4;
  transform: translateY(-2px);
}

.reddit-link {
  background: #ff4500;
  border: 2px solid #e03d00;
}

.reddit-link:hover {
  background: #e03d00;
  transform: translateY(-2px);
}

.social-icon {
  width: 20px;
  height: 20px;
}

.pokemon-town-icon {
  width: 60px;
  height: 60px;
  background-image: url('img/logo.png');
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(96, 165, 250, 0.4);
  animation: bounce 2s infinite;
}

main {
  background: #1e293b;
  border-radius: 8px;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 3rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  border: 2px solid #334155;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: #60a5fa;
  font-weight: bold;
}

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-align: center;
  border: 2px solid #334155;
  transition: all 0.2s;
}

.stat-item:hover {
  border-color: #60a5fa;
  transform: translateY(-4px);
}

.stat-item:nth-child(2) {
  border-color: #10b981;
}

.stat-item:nth-child(2):hover {
  border-color: #059669;
}

.stat-item:nth-child(3) {
  border-color: #f59e0b;
}

.stat-item:nth-child(3):hover {
  border-color: #d97706;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: bold;
  display: block;
  color: #60a5fa;
}

.stat-label {
  font-size: 0.9rem;
  color: #94a3b8;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
}

.product-card {
  background: #0f172a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  border: 2px solid #334155;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: #60a5fa;
}

.product-image-container {
  position: relative;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  overflow: hidden;
  flex-shrink: 0;
  border-bottom: 2px solid #334155;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s ease;
  padding: 0.5rem;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.countdown-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #dc2626;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.countdown-overlay.urgent {
  background: #f59e0b;
  animation: urgentPulse 2s infinite;
}

.countdown-overlay.tbd {
  background: #64748b;
  font-style: italic;
}

@keyframes urgentPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.product-info {
  padding: 1.5rem 2rem 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
  color: #f1f5f9;
  line-height: 1.4;
  min-height: 3.5rem;
  display: flex;
  align-items: flex-start;
}

.product-date {
  font-size: 1rem;
  color: #94a3b8;
  margin-bottom: auto;
  font-weight: 500;
  padding-bottom: 1rem;
}

.product-tags {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: auto;
  gap: 0;
}

.market-button {
  margin-top: 12px;
  padding: 8px 14px;
  border: none;
  background: #3b82f6;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: 0.2s ease;
}

.market-button:hover {
  background: #2563eb;
  transform: translateY(-2px);
}

.product-type,
.product-price {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: white;
  font-weight: 600;
  border: 2px solid transparent;
}

.product-type {
  background: #334155;
  color: #94a3b8;
}

.product-price {
  background: #065f46;
  color: #d1fae5;
}

.product-price.tba {
  background: #64748b;
  color: #e2e8f0;
}

.notification-bar {
  background: #1e293b;
  border: 2px solid #60a5fa;
  color: #e2e8f0;
  padding: 1.2rem 2rem;
  text-align: center;
  margin: 2rem 0 0 0;
  border-radius: 8px;
  font-weight: 500;
  line-height: 1.5;
}

footer {
  text-align: center;
  padding: 3rem 0;
  color: #94a3b8;
  font-size: 1rem;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
  background: #1e293b;
  border-radius: 8px;
  padding: 0.5rem;
  border: 2px solid #334155;
}

.tab-button {
  background: transparent;
  color: #94a3b8;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.tab-button:hover {
  color: #e2e8f0;
  background: #0f172a;
}

.tab-button.active {
  background: #60a5fa;
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.past-releases-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem 2rem;
  background: #1e293b;
  border-radius: 8px;
  border: 2px solid #334155;
}

.past-releases-controls label {
  font-weight: bold;
  color: #e2e8f0;
  font-size: 1.1rem;
}

.custom-dropdown {
  position: relative;
  min-width: 160px;
}

.dropdown-selected {
  background: #3b82f6;
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: 2px solid #2563eb;
}

.dropdown-selected:hover {
  background: #2563eb;
  transform: translateY(-2px);
}

.dropdown-selected.open {
  border-radius: 6px 6px 0 0;
  background: #2563eb;
}

.dropdown-arrow {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  opacity: 0.8;
}

.dropdown-selected.open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1e293b;
  border: 2px solid #334155;
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
  margin-top: -2px;
}

.custom-dropdown.open .dropdown-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-option {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: #94a3b8;
  transition: all 0.2s ease;
  position: relative;
}

.dropdown-option:hover {
  background: #0f172a;
  color: #e2e8f0;
  transform: translateX(4px);
}

.dropdown-option.active {
  background: #0f172a;
  color: #60a5fa;
  font-weight: 600;
}

.dropdown-option.active::after {
  content: '✓';
  position: absolute;
  right: 1rem;
  color: #60a5fa;
  font-weight: bold;
}

.option-icon {
  font-size: 1.1rem;
}

.past-group {
  margin-bottom: 2rem;
}

.past-group h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #60a5fa;
}

.past-group .products-grid {
  margin-top: 1rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: #1e293b;
  border: 2px solid #334155;
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  animation: fadeIn 0.3s ease;
  position: relative;
  color: #e2e8f0;
}

body.modal-open {
  overflow: hidden;
}

.modal-content img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  margin: 0 auto 1rem auto;
  display: block;
  border-radius: 8px;
  border: 2px solid #334155;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 2rem;
  font-weight: bold;
  color: #e2e8f0;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: 0.2s ease;
  background: #0f172a;
  border: 2px solid #334155;
}

.modal-close:hover {
  background: #60a5fa;
  color: white;
  transform: scale(1.15);
}

#modal-contents {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
  color: #94a3b8;
}

#modal-contents li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.4rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .header-content {
    justify-content: center;
    text-align: center;
  }

  .site-title {
    font-size: 1.8rem;
  }

  .social-section {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
  }

  .discord-invite, .reddit-link {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  main {
    margin: 1rem;
    padding: 2rem 1.5rem;
  }

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

  .stats-bar {
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .stat-item {
    padding: 0.75rem 1rem;
    flex: 1;
    min-width: 100px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

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

  .product-card {
    margin: 0 auto;
    max-width: 100%;
  }

  .product-image-container {
    height: 200px;
  }

  .product-info {
    padding: 1.25rem 1.5rem 1.75rem;
  }

  .product-title {
    font-size: 1.1rem;
    line-height: 1.4;
    min-height: 3rem;
  }

  .product-tags {
    gap: 8px;
  }

  .product-type,
  .product-price {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .notification-bar {
    margin: 2rem 0 0 0;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 8px;
  }

  .past-releases-controls {
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1.25rem 1.5rem;
  }
  
  .custom-dropdown {
    min-width: 140px;
  }
  
  .dropdown-selected {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  
  .dropdown-option {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 1.5rem;
  }

  .social-section {
    gap: 0.5rem;
  }

  .discord-invite, .reddit-link {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    flex: 1;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }

  .stats-bar {
    flex-direction: row;
    gap: 0.5rem;
  }

  .stat-item {
    padding: 0.5rem 0.75rem;
    min-width: 80px;
  }

  .stat-number {
    font-size: 1.3rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .product-image-container {
    height: 180px;
  }

  .product-info {
    padding: 1rem 1.25rem 1.5rem;
  }

  .product-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    min-height: 2.5rem;
  }

  .product-date {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .product-tags {
    flex-direction: column;
    gap: 6px;
  }

  .countdown-overlay {
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .notification-bar {
    padding: 0.9rem 1rem;
    font-size: 0.85rem;
    border-radius: 6px;
  }

  .past-releases-controls {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
  }
  
  .custom-dropdown {
    width: 100%;
    max-width: 200px;
  }
}