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

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(124, 58, 237, 0.22), transparent 38%),
    #111827;
  color: white;
  font-family: Arial, Helvetica, sans-serif;
}

.container {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 40px 20px 28px;
}

.app-header {
  text-align: center;
  margin-bottom: 36px;
}

h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -2px;
  color: #a78bfa;
}

.subtitle {
  margin-top: 16px;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.tagline {
  margin-top: 10px;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #c4b5fd;
}

.actions {
  display: grid;
  gap: 14px;
}

button {
  width: 100%;
  min-height: 58px;
  padding: 16px 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: white;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

button:active {
  transform: scale(0.98);
}

#scanButton {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
}

#searchButton {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(96, 165, 250, 0.55);
  color: #dbeafe;
}

.recent {
  margin-top: 44px;
  padding: 22px;
  background: rgba(31, 41, 55, 0.78);
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}

.recent h2 {
  margin-bottom: 10px;
  font-size: 22px;
  color: #ffffff;
}

.recent p {
  color: #cbd5e1;
  line-height: 1.5;
}

footer {
  margin-top: 50px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}
.hidden {
  display: none;
}

.search-panel {
  margin-top: 28px;
  padding: 20px;
  background: #1f2937;
  border-radius: 15px;
}

.search-panel label {
  display: block;
  margin-bottom: 10px;
  color: #d1d5db;
  font-weight: 700;
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-row input {
  min-width: 0;
  flex: 1;
  padding: 14px;
  border: 1px solid #374151;
  border-radius: 10px;
  background: #111827;
  color: white;
  font-size: 16px;
}

.search-row input:focus {
  outline: 2px solid #7c3aed;
  border-color: transparent;
}

#submitSearchButton {
  width: auto;
  margin: 0;
  padding: 14px 18px;
  border-radius: 10px;
  background: #7c3aed;
  font-size: 16px;
}

#searchStatus {
  margin-top: 16px;
  color: #9ca3af;
}

.search-results {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.card-result {
  display: flex;
  gap: 14px;
  padding: 12px;
  border: 1px solid #374151;
  border-radius: 12px;
  background: #111827;
  cursor: pointer;
}

.card-result img {
  width: 90px;
  height: auto;
  border-radius: 7px;
}

.card-result-info {
  min-width: 0;
}

.card-result-info h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.card-result-info p {
  margin-bottom: 5px;
  color: #d1d5db;
  font-size: 14px;
}

.card-result-info .card-price {
  margin-top: 8px;
  color: #a78bfa;
  font-weight: 700;
}
.card-detail-panel {
  margin-top: 30px;
  padding: 20px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 16px;
}

.close-detail-button {
  width: auto;
  margin: 0 0 18px auto;
  padding: 9px 13px;
  display: block;
  background: #374151;
  color: #d1d5db;
  border-radius: 9px;
  font-size: 14px;
}

.selected-card-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.selected-card-header img {
  width: 90px;
  height: auto;
  border-radius: 8px;
}

.selected-card-header h2 {
  margin-bottom: 8px;
  font-size: 23px;
}

.selected-card-header p {
  margin-bottom: 6px;
  color: #d1d5db;
  font-size: 14px;
}

.detail-field {
  margin-top: 22px;
}

.detail-field label {
  display: block;
  margin-bottom: 9px;
  color: #d1d5db;
  font-weight: 700;
}

.detail-field select,
.detail-field input {
  width: 100%;
  padding: 14px;
  border: 1px solid #4b5563;
  border-radius: 10px;
  background: #111827;
  color: white;
  font-size: 17px;
}

.detail-field select:focus,
.detail-field input:focus {
  outline: 2px solid #7c3aed;
  border-color: transparent;
}

.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.price-box {
  padding: 15px;
  background: #111827;
  border-radius: 11px;
}

.price-box span {
  display: block;
  margin-bottom: 7px;
  color: #9ca3af;
  font-size: 13px;
}

.price-box strong {
  color: #a78bfa;
  font-size: 20px;
}

.money-input,
.percentage-input {
  display: flex;
  align-items: center;
  border: 1px solid #4b5563;
  border-radius: 10px;
  background: #111827;
}

.money-input span,
.percentage-input span {
  padding: 0 14px;
  color: #9ca3af;
  font-size: 18px;
}

.money-input input,
.percentage-input input {
  border: none;
  background: transparent;
}

.quick-percentages {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 14px;
}


.quick-percentages button {
    margin: 0;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 10px;
    color: white;
}

.quick-percentages button:nth-child(1) {
    background: #16a34a;
}

.quick-percentages button:nth-child(2) {
    background: #2563eb;
}

.quick-percentages button:nth-child(3) {
    background: #7c3aed;
}

.quick-percentages button:nth-child(4) {
    background: #f59e0b;
}

.quick-percentages button:nth-child(5) {
    background: #dc2626;
}
.offer-result {
    margin-top: 25px;
    background: linear-gradient(135deg,#6d28d9,#8b5cf6);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
}

.offer-result strong {
    font-size: 36px;
}

@media (max-width: 380px) {
  .selected-card-header {
    flex-direction: column;
  }

  .selected-card-header img {
    width: 150px;
    margin: auto;
  }

  .quick-percentages {
    grid-template-columns: repeat(3, 1fr);
  }
}
#ebaySoldButton {
  width: 100%;
  background: linear-gradient(135deg, #0064d2, #3b82f6);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#ebaySoldButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 100, 210, 0.35);
}
