:root {
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.4);
  --bg-dark: #0c0c14;
  --card-bg: rgba(12, 12, 20, 0.9);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --border: #2a2a2d;
  --text: #fff;
  --text-muted: #94949e;
  --rarity-common-bg: #3c3d41;
  --rarity-common-text: #b5bac1;
  --rarity-uncommon-bg: #004d00;
  --rarity-uncommon-text: #66cc00;
  --rarity-rare-bg: #00a2ed;
  --rarity-rare-text: #003e6d;
  --rarity-epic-bg: #4a0e8f;
  --rarity-epic-text: #d63aff;
  --rarity-legendary-bg: #d35400;
  --rarity-legendary-text: #fff3cd;
  --rarity-mythic-bg: #a17c00;
  --rarity-mythic-text: #f4d35e;
  --rarity-iconic-bg: #003e3e;
  --rarity-iconic-text: #66ffff;
  --rarity-crew-bg: #2d2d5a;
  --rarity-crew-text: #aaccff;
  --rarity-gaming-bg: #1a0044;
  --rarity-gaming-text: #7b61ff;
  --rarity-dc-bg: #002147;
  --rarity-dc-text: #0084ff;
  --rarity-marvel-bg: #5a0000;
  --rarity-marvel-text: #ff2d2d;
  --rarity-starwars-bg: #0a0b0d;
  --rarity-starwars-text: #ffe81f;
  --rarity-frozen-bg: #0050ff;
  --rarity-frozen-text: #d0f0ff;
  --rarity-lava-bg: #4c004c;
  --rarity-lava-text: #ffb81c;
  --rarity-dark-bg: #441b7c;
  --rarity-dark-text: #ff4dfc;
  --rarity-shadow-bg: #111111;
  --rarity-shadow-text: #ffffff;
  --rarity-slurp-bg: #0072ff;
  --rarity-slurp-text: #00f2ff;
  --rarity-lamborghini-bg: #8c7300;
  --rarity-lamborghini-text: #ffe066;
  --rarity-mclaren-bg: #994d00;
  --rarity-mclaren-text: #ffb366;
  --rarity-ferrari-bg: #800000;
  --rarity-ferrari-text: #ff8080;
  --rarity-porsche-bg: #3c3d41;
  --rarity-porsche-text: #b5bac1;
  --rarity-bmw-bg: #003366;
  --rarity-bmw-text: #66b2ff;
  --rarity-ford-bg: #000428;
  --rarity-ford-text: #1e88e5;
  --rarity-nissan-bg: #400000;
  --rarity-nissan-text: #ff4d4d;
  --rarity-tesla-bg: #1a1a1a;
  --rarity-tesla-text: #e81c23;
  --rarity-chevrolet-bg: #664d00;
  --rarity-chevrolet-text: #ffcc00;
  --rarity-dodge-bg: #4d0000;
  --rarity-dodge-text: #ff3333;
  --rarity-aston-bg: #00332a;
  --rarity-aston-text: #00ffcc;
  --rarity-mercedes-bg: #333333;
  --rarity-mercedes-text: #ffffff;
  --rarity-jeep-bg: #2e3b2e;
  --rarity-jeep-text: #8dbd8d;
  --rarity-ram-bg: #400000;
  --rarity-ram-text: #ff0000;
}
html {
  scroll-behavior: smooth;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background: transparent;
  color: var(--text);
}
.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 0 1rem;
}

.page-header {
  text-align: center;
  margin-top: 140px;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out both;
}

.page-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 0.75rem;
  font-family: 'Outfit', sans-serif;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
}



.search-container {
  max-width: 600px;
  margin: 0 auto 2rem;
  width: 90%;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.8s ease-out 0.3s both;
}
.search-wrapper {
  display: flex;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.search-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}
input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  padding: 12px 20px;
  font-size: 1.1rem;
  font-weight: 400;
}
input::placeholder {
  color: #555;
}
#searchBtn {
  background: var(--primary);
  border: none;
  border-radius: 12px;
  color: #fff;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
#searchBtn:hover {
  transform: scale(1.05);
  background: #60a5fa;
  box-shadow: 0 0 15px var(--primary-glow);
}
#searchBtn:active {
  transform: scale(0.95);
}
.result-container {
  display: none;
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cosmetic-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
}
@media (max-width: 850px) {
  .cosmetic-card {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }
}
.preview-section {
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  border-radius: 16px;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  border: 1px solid var(--glass-border);
}
.preview-section img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
  transition: transform 0.5s ease;
}
.cosmetic-card:hover .preview-section img {
  transform: translateY(-10px) scale(1.05);
}
.info-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rarity-badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 850;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  width: fit-content;
  letter-spacing: 0.05em;
  font-family: 'Outfit', sans-serif;
}
#item-name {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.1;
}
#item-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.detail-item {
  background: var(--glass-bg);
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  transition: all 0.2s ease;
}
.detail-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}
.detail-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.detail-value {
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
}
.detail-value--id {
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  opacity: 0.9;
  word-break: break-all;
  display: block;
}
.source-price {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.source-level {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}
.source-level-loading {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(0, 180, 216, 0.2);
  border-top: 2px solid #00b4d8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.source-level--found {
  color: #fff;
  font-weight: 700;
}
.loader {
  display: none;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.05);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  margin: 2rem auto;
}

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  width: 100%;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity;
}

.loading-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.loading-dot {
  width: 12px;
  height: 12px;
  background: #FBFBFB;
  border-radius: 50%;
  animation: jump 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(1) {
  animation-delay: 0s;
}

.loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

.loading-dot:nth-child(4) {
  animation-delay: 0.6s;
}

@keyframes jump {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.loading-text {
  margin-top: 2rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 900;
  color: #FBFBFB;
  text-transform: uppercase;
  letter-spacing: 0.3em;
}
.error-message {
  display: none;
  color: #ff4d4d;
  background: rgba(255, 77, 77, 0.05);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-top: 1rem;
  text-align: center;
  font-size: 1rem;
  border: 1px solid rgba(255, 77, 77, 0.2);
  animation: shake 0.4s ease-in-out;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.top-searches {
  margin-top: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid var(--glass-border);
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.top-searches__title {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  font-family: 'Outfit', sans-serif;
}
.top-searches__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.top-search-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 1rem 0.5rem 0.5rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  animation: fadeIn 0.5s ease both;
}
.top-search-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.top-search-item img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.2);
}
.top-search-info {
  display: flex;
  flex-direction: column;
}
.top-search-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}
.top-search-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
