/* ===== DESIGN SYSTEM - goskins.store Style ===== */

:root {
  /* Colors */
  --bg-primary: #0d0d0f;
  --bg-secondary: #151518;
  --bg-card: #1a1a1f;
  --bg-card-hover: #222228;
  --accent-orange: #ff6b35;
  --accent-green: #00d26a;
  --accent-red: #ff4757;
  --accent-blue: #00b4d8;
  --accent-purple: #a855f7;
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border-color: #2a2a30;

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(255, 107, 53, 0.3);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ===== HEADER ===== */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-orange);
}

.logo img {
  width: 40px;
  height: 40px;
}

.logo-text {
  background: linear-gradient(135deg, var(--accent-orange), #ff8c5a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border-color);
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  width: 180px;
  font-size: 0.875rem;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-icon {
  color: var(--text-muted);
  margin-right: var(--spacing-sm);
}

.currency-selector {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  background: var(--bg-card);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.cart-balance {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: var(--bg-card);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
}

.cart-icon {
  font-size: 1.1rem;
}

.weekly-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-sm);
  background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
}

.weekly-giveaway {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--accent-orange);
  font-weight: 600;
}

.discord-link {
  color: var(--accent-blue);
  font-size: 0.875rem;
}

.discord-link:hover {
  text-decoration: underline;
}

/* ===== GAME TABS ===== */
.game-tabs-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.game-tabs {
  display: flex;
  gap: var(--spacing-sm);
}

.game-tab {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.game-tab:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.game-tab.active {
  background: var(--accent-orange);
  color: white;
  border-color: var(--accent-orange);
}

.game-tab-icon {
  font-size: 1rem;
}

.sort-filter {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
}

/* ===== CATEGORY FILTERS ===== */
.category-filters {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--bg-primary);
  overflow-x: auto;
  scrollbar-width: none;
}

.category-filters::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  background: transparent;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.filter-btn.active {
  color: var(--accent-orange);
  background: rgba(255, 107, 53, 0.1);
}

.filter-icon {
  font-size: 1rem;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  padding: var(--spacing-lg);
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.section-icon {
  font-size: 1.25rem;
  color: var(--accent-orange);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
}

/* ===== ITEMS GRID ===== */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

/* ===== ITEM CARD ===== */
.item-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.item-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--accent-orange);
}

/* Rarity-based glow on hover */
.item-card.rarity-legendary:hover {
  box-shadow: 0 20px 40px rgba(245, 158, 11, 0.3), 0 0 30px rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}

.item-card.rarity-epic:hover {
  box-shadow: 0 20px 40px rgba(168, 85, 247, 0.3), 0 0 30px rgba(168, 85, 247, 0.2);
  border-color: #a855f7;
}

.item-card.rarity-rare:hover {
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3), 0 0 30px rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
}

.item-badge {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--accent-green);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.item-info-btn {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  backdrop-filter: blur(8px);
  z-index: 2;
}

/* ===== ITEM IMAGE WITH COLORFUL BACKGROUNDS ===== */
.item-image {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
  position: relative;
  overflow: hidden;
}

/* Category-based vibrant gradient backgrounds */
.item-image.bg-guns {
  background:
    radial-gradient(ellipse at center, rgba(59, 130, 246, 0.3) 0%, transparent 60%),
    linear-gradient(180deg, #0a1628 0%, #1a365d 50%, #0f2744 100%);
}

.item-image.bg-knives {
  background:
    radial-gradient(ellipse at center, rgba(168, 85, 247, 0.3) 0%, transparent 60%),
    linear-gradient(180deg, #1a0a2e 0%, #4c1d95 50%, #2e1065 100%);
}

.item-image.bg-pets {
  background:
    radial-gradient(ellipse at center, rgba(34, 197, 94, 0.3) 0%, transparent 60%),
    linear-gradient(180deg, #0a1f14 0%, #166534 50%, #14532d 100%);
}

.item-image.bg-bundles {
  background:
    radial-gradient(ellipse at center, rgba(239, 68, 68, 0.3) 0%, transparent 60%),
    linear-gradient(180deg, #1f0a0a 0%, #7f1d1d 50%, #450a0a 100%);
}

.item-image.bg-sets {
  background:
    radial-gradient(ellipse at center, rgba(245, 158, 11, 0.3) 0%, transparent 60%),
    linear-gradient(180deg, #1a1500 0%, #78350f 50%, #451a03 100%);
}

.item-image.bg-units {
  background:
    radial-gradient(ellipse at center, rgba(6, 182, 212, 0.3) 0%, transparent 60%),
    linear-gradient(180deg, #0a1a1a 0%, #115e59 50%, #134e4a 100%);
}

/* Default gradient for items without category */
.item-image.bg-default {
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.1) 0%, transparent 60%),
    linear-gradient(180deg, #1a1a2e 0%, #2d2d44 50%, #1e1e30 100%);
}

/* Rarity-based glow overlay */
.item-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.item-card:hover .item-image::before {
  opacity: 1;
}

.item-image.glow-legendary::before {
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
}

.item-image.glow-epic::before {
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.2) 0%, transparent 70%);
}

.item-image.glow-rare::before {
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
}

/* Animated gradient border effect */
.item-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-orange), transparent);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.item-card:hover .item-image::after {
  transform: scaleX(1);
}

.item-image img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  transition: transform 0.4s ease, filter 0.4s ease;
  z-index: 1;
  /* Fix PNG transparency - add solid bg behind image */
  background: transparent;
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.item-card:hover .item-image img {
  transform: scale(1.1) translateY(-4px);
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.6));
}

.sparkles {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.sparkle {
  position: absolute;
  color: var(--accent-blue);
  font-size: 0.75rem;
  animation: sparkle 2s infinite;
  text-shadow: 0 0 10px currentColor;
}

.sparkle:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  color: #f59e0b;
}

.sparkle:nth-child(2) {
  top: 30%;
  right: 15%;
  animation-delay: 0.5s;
  color: #a855f7;
}

.sparkle:nth-child(3) {
  bottom: 20%;
  left: 20%;
  animation-delay: 1s;
  color: #00d26a;
}

.sparkle:nth-child(4) {
  bottom: 30%;
  right: 10%;
  animation-delay: 1.5s;
  color: #3b82f6;
}

@keyframes sparkle {

  0%,
  100% {
    opacity: 0;
    transform: scale(0.5) rotate(0deg);
  }

  50% {
    opacity: 1;
    transform: scale(1.2) rotate(180deg);
  }
}

/* Floating animation for images */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.item-card:hover .item-image img {
  animation: float 2s ease-in-out infinite;
}

.item-details {
  padding: var(--spacing-md);
}

.item-name {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-pricing {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.original-price {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.discount-badge {
  display: inline-block;
  padding: 2px 6px;
  background: var(--accent-red);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  margin-left: var(--spacing-xs);
}

.current-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.free-badge {
  background: linear-gradient(135deg, var(--accent-green), #00f5a0);
  color: #000;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
}

.limited-badge {
  display: block;
  color: var(--accent-orange);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.add-to-cart {
  width: 36px;
  height: 36px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.add-to-cart:hover {
  background: var(--accent-orange);
  color: white;
  border-color: var(--accent-orange);
}

/* ===== FLOATING CART ===== */
.floating-cart {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  background: var(--accent-orange);
  color: white;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 600;
  box-shadow: var(--shadow-glow);
  transition: all 0.3s ease;
  z-index: 100;
}

.floating-cart:hover {
  transform: scale(1.05);
}

.cart-count {
  background: white;
  color: var(--accent-orange);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {

  /* Header Mobile */
  .header-top {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .logo {
    font-size: 1.2rem;
  }

  .header-actions {
    gap: 8px;
  }

  .search-box {
    order: 3;
    width: 100%;
    padding: 10px 14px;
  }

  .search-box input {
    width: 100%;
    font-size: 14px;
  }

  .cart-balance,
  .currency-selector {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .weekly-banner {
    padding: 6px;
    font-size: 0.85rem;
  }

  /* Game Tabs Mobile */
  .game-tabs-container {
    padding: 8px 12px;
    overflow-x: auto;
  }

  .game-tabs {
    overflow-x: auto;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .game-tab {
    padding: 8px 12px;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .sort-filter {
    display: none;
  }

  /* Category Filters Mobile */
  .category-filters {
    padding: 8px 12px;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Main Content Mobile */
  .main-content {
    padding: 12px;
  }

  .section-header {
    margin-bottom: 12px;
  }

  .section-title {
    font-size: 1.1rem;
  }

  /* Items Grid - 2 columns on mobile */
  .items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* Item Card Mobile */
  .item-card {
    border-radius: 12px;
  }

  .item-badge {
    padding: 2px 6px;
    font-size: 0.65rem;
    top: 6px;
    left: 6px;
  }

  .item-info-btn {
    width: 20px;
    height: 20px;
    font-size: 0.6rem;
    top: 6px;
    right: 6px;
  }

  .item-image {
    height: 90px;
    padding: 8px;
  }

  .item-details {
    padding: 10px;
  }

  .item-name {
    font-size: 0.75rem;
    margin-bottom: 4px;
  }

  .limited-badge {
    font-size: 0.65rem;
    margin-bottom: 4px;
  }

  .item-pricing {
    gap: 6px;
  }

  .original-price {
    font-size: 0.65rem;
  }

  .discount-badge {
    font-size: 0.55rem;
    padding: 1px 4px;
  }

  .current-price {
    font-size: 0.85rem;
  }

  .free-badge {
    padding: 3px 8px;
    font-size: 0.7rem;
  }

  .add-to-cart {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  /* Floating Cart Mobile */
  .floating-cart {
    bottom: 70px;
    right: 12px;
    padding: 10px 16px;
    font-size: 0.9rem;
    border-radius: 12px;
  }

  .cart-count {
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
  }

  /* Sparkles smaller on mobile */
  .sparkle {
    font-size: 0.6rem;
  }
}

/* Extra Small Screens (under 400px) */
@media (max-width: 400px) {
  .items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .item-image {
    height: 75px;
  }

  .item-details {
    padding: 8px;
  }

  .item-name {
    font-size: 0.7rem;
  }

  .current-price {
    font-size: 0.8rem;
  }

  .free-badge {
    padding: 2px 6px;
    font-size: 0.65rem;
  }

  .add-to-cart {
    width: 28px;
    height: 28px;
  }

  .logo {
    font-size: 1rem;
  }

  .game-tab {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .filter-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

/* ===== BOTTOM NAV (Mobile) ===== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 8px 0;
  justify-content: space-around;
  z-index: 100;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
  }

  body {
    padding-bottom: 55px;
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 0.7rem;
  transition: color 0.2s ease;
}

.nav-item.active,
.nav-item:hover {
  color: var(--accent-orange);
}

.nav-icon {
  font-size: 1.25rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.item-card {
  animation: fadeIn 0.4s ease forwards;
}

.item-card:nth-child(1) {
  animation-delay: 0.05s;
}

.item-card:nth-child(2) {
  animation-delay: 0.1s;
}

.item-card:nth-child(3) {
  animation-delay: 0.15s;
}

.item-card:nth-child(4) {
  animation-delay: 0.2s;
}

.item-card:nth-child(5) {
  animation-delay: 0.25s;
}

.item-card:nth-child(6) {
  animation-delay: 0.3s;
}

/* ===== LOADING SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg,
      var(--bg-card) 25%,
      var(--bg-card-hover) 50%,
      var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}