body {
  background-color: #15161a;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

input {
  font-size: 1rem;
}

.welcomeText {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 150px; /* Just enough space so it clears the logo, but isn't pushed too far down */
  color: white;
  gap: .25rem;
}

/* ---------- search bar ---------- */

:root {
  --surface: #1e2027;
  --surface-2: #262933;
  --border: #33363f;
  --muted: #8b8fa3;
  --accent: #e2a03f;
  --accent-dim: rgba(226, 160, 63, 0.16);
}

.search {
  width: 100%;
  max-width: 420px;
  margin-top: 6px;
}

.search-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.search-shell:hover {
  border-color: #454a57;
}

.search.focused .search-shell {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  position: relative;
}

.icon svg {
  position: absolute;
  inset: 0;
  transition: opacity .2s ease, transform .2s ease;
}

.icon .glass {
  stroke: var(--muted);
  transition: stroke .2s ease;
}

.search.focused .icon .glass {
  stroke: var(--accent);
}

.icon .spinner {
  opacity: 0;
  transform: scale(.6);
  stroke: var(--accent);
}

.search.loading .icon .glass {
  opacity: 0;
  transform: scale(.6);
}

.search.loading .icon .spinner {
  opacity: 1;
  transform: scale(1);
  animation: spin .7s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.search-skins {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: white;
  caret-color: var(--accent);
}

.search-skins::placeholder {
  color: var(--muted);
}

/* remove default browser styling on type=search */
.search-skins::-webkit-search-decoration,
.search-skins::-webkit-search-cancel-button,
.search-skins::-webkit-search-results-button,
.search-skins::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

.clear-btn {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease, transform .1s ease;
}

.search.has-text .clear-btn {
  display: flex;
}

.clear-btn:hover {
  background: var(--border);
  color: white;
}

.clear-btn:active {
  transform: scale(.9);
}

/* ---------- results ---------- */

.search-results {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  margin-top: 28px;
  padding: 0 20px 40px;
  max-width: 900px;
}

.search-result {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 14px;
  flex: 0 1 calc(33.333% - 16px);
  min-width: 280px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  animation: card-in .35s ease forwards;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
}

@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}

.search-result:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -12px rgba(0, 0, 0, .55), 0 0 0 1px var(--accent-dim);
}

.search-result img {
  width: 96px;
  height: 72px;
  object-fit: contain;
  flex: 0 0 auto;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 6px;
}

.search-result .separator {
  width: 1px;
  align-self: stretch;
  background: var(--border);
}

.search-result .info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.search-result p {
  margin: 0;
  color: white;
  font-size: 14px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-result .price {
  color: var(--accent);
  font-weight: 600;
  font-size: 13.5px;
}

.search-empty {
  color: var(--muted);
  text-align: center;
  margin-top: 32px;
  font-size: 14px;
}

.allSkinsContainer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  min-height: 100vh;
}

.skinInsideContainer {
  border: 4px solid black;
  border-radius: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px;
  gap: 30px;
}

/* ---------- Final Card ---------- */

.main-card-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh; 
  padding: 100px 20px 40px; 
  box-sizing: border-box;
}

.main-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  display: flex;
  flex-direction: row; 
  gap: 40px;
  padding: 40px;
  width: 100%;
  max-width: 1000px; 
  min-height: 55vh; 
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
}

.main-card img {
  flex: 1;
  width: 100%;
  max-width: 500px;
  object-fit: contain;
  background: var(--surface-2);
  border-radius: 16px;
  padding: 20px;
  box-sizing: border-box;
}

.main-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start; 
  gap: 20px;
}

.main-card-info h2 {
  color: white;
  margin: 0;
  font-size: 2.5rem;
  line-height: 1.2;
}

.main-price {
  color: var(--accent);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}

.inspect-btn {
  background: var(--accent);
  color: #15161a; 
  border: none;
  padding: 16px 28px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  width: fit-content;
  margin-top: 10px;
}

.inspect-btn:hover {
  background: #f3b14f; 
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-dim);
}

.inspect-btn:active {
  transform: translateY(0);
}

/* ---------- Purchase Box ---------- */

.purchase-box {
  margin-top: 10px;
  background: rgba(0, 255, 255, 0.08); 
  border: 1px solid #00ffff; 
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  box-sizing: border-box;
  
  /* Stops the box from growing too big */
  height: fit-content;
  width: fit-content;
  max-width: 100%;
}

.purchase-box p {
  margin: 0;
  color: #e6ffff; 
  font-size: 0.95rem;
  line-height: 1.4;
}

.purchase-code {
  display: inline-block;
  margin-top: 8px;
  color: #00ffff; 
  font-size: 1.25rem;
  font-weight: 700;
  font-family: monospace; 
  user-select: all; 
}


/* ---------- Header / Logo ---------- */

.logo-link {
  position: absolute; 
  top: 30px; /* Distance from the very top of the screen */
  left: 50%;
  transform: translateX(-50%); /* This perfectly centers it horizontally */
  border-radius: 50%;
  text-decoration: none;
}

.logo-img {
  width: 90px;       
  height: 90px;      
  object-fit: contain; 
  border-radius: 50%; 
  border: 2px solid var(--border); 
  padding: 12px;     
  box-shadow: 0 8px 10px rgba(0, 0, 0, 0.4); 
  box-sizing: border-box;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.logo-img:hover {
  transform: scale(1.05);
  border-color: var(--accent); 
  box-shadow: 0 8px 25px var(--accent-dim); 
}



/* ---------- Mobile Adaptability (MUST BE AT THE BOTTOM) ---------- */

@media (max-width: 768px) {
  .main-card {
    flex-direction: column; 
    padding: 24px;
    gap: 24px;
    min-height: auto; 
  }

  .main-card img {
    max-width: 100%;
    padding: 12px;
  }

  .main-card-info {
    align-items: center; /* Centers items on mobile */
    text-align: center;
  }

  .main-card-info h2 {
    font-size: 1.8rem;
  }

  .main-price {
    font-size: 1.4rem;
  }

  .inspect-btn {
    width: 100%; 
  }

  .purchase-box {
    text-align: center;
    width: 100%;
  }
}