* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  width: 300px;
  height: 600px;
  overflow: hidden;
  font-family: Helvetica, Arial, sans-serif;
}

#ad {
  position: relative;
  width: 300px;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(165deg, #23262c 0%, #15171b 60%, #0e1013 100%);
}

/* Autohaus Zwettl brand CTA green, used for the CTA + "merken" side */
:root {
  --accent: #009e3c;
  --accent-hi: #00b846; /* hover */
}

/* dealer logo — white-on-transparent PNG (converted from the supplied .webp,
   because WebP is not an allowed file type inside a Google HTML5 ZIP) */
.logo {
  display: block;
  width: 84px;
  height: auto;
}
#result .logo {
  width: 92px;
  margin: 0 auto;
}

/* ============ CTA ============ */
.cta {
  display: block;
  background: var(--accent);
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 0.3px;
  padding: 15px 34px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 158, 60, 0.38);
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 158, 60, 0.55);
}
.cta:active {
  transform: scale(0.97);
}

/* ============ DECK ============ */
#header {
  padding: 14px 16px 0;
}
#progress {
  margin-top: 10px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}
#progressFill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.35s ease;
}

#stage {
  position: relative;
  height: 404px;
  margin: 14px 16px 0;
}

/* the card root is an <a> so the whole surface is a native exit —
   kill the inherited anchor styling */
.card {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  will-change: transform;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
  -webkit-touch-callout: none;
}
.card,
.card * {
  text-decoration: none;
}

/* --- image band: feed photos are 4:3, band is 268x196 so crop is minimal --- */
.card .photo {
  position: relative;
  height: 196px;
  background: #d9dce1;
  overflow: hidden;
}
.card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* graceful state when the feed image is missing / dead */
.card .photo.noimg {
  background: linear-gradient(150deg, #3a3f47, #21242a);
}
.card .photo.noimg img {
  display: none;
}
.card .photo.noimg::after {
  content: attr(data-brand);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.22);
  font-size: 30px;
  font-weight: bold;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.card .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 3px;
}

/* --- info block --- */
.card .info {
  padding: 13px 14px 0;
}
.card .marke {
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent);
}
.card .modell {
  margin-top: 5px;
  font-size: 17px;
  font-weight: bold;
  line-height: 1.2;
  color: #14161a;
  height: 41px;
  overflow: hidden;
}
.card .specs {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #e6e8ec;
  font-size: 11.5px;
  color: #6b7280;
  letter-spacing: 0.1px;
}
.card .pricerow {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 13px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.card .preis {
  font-size: 25px;
  font-weight: bold;
  color: #14161a;
  letter-spacing: -0.6px;
}
.card .details {
  font-size: 10.5px;
  font-weight: bold;
  color: var(--accent);
  letter-spacing: 0.4px;
  padding-bottom: 4px;
}

/* swipe stamps */
.stamp {
  position: absolute;
  top: 26px;
  z-index: 3;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 17px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 3px solid;
  opacity: 0;
  background: rgba(0, 0, 0, 0.25);
}
/* Stamps sit OPPOSITE the throw direction, same as Tinder: swiping right
   pushes the card's right edge out of the 300px frame, so the "Merken" stamp
   has to live on the left to stay visible. Mirrored for "Weiter". */
.stamp.like {
  left: 14px;
  color: #fff;
  border-color: #fff;
  background: var(--accent);
  transform: rotate(-16deg);
}
.stamp.skip {
  right: 14px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
  transform: rotate(16deg);
}

/* ============ CONTROLS ============ */
#controls {
  display: flex;
  gap: 10px;
  padding: 0 16px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
}
.btn {
  flex: 1;
  height: 52px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  transition:
    transform 0.15s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}
.btn.skip {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid #454b54;
  color: #aab0ba;
}
.btn.like {
  background: var(--accent);
  border: 1.5px solid var(--accent);
  color: #fff;
}
.btn.skip:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  border-color: #6b7280;
}
.btn.like:hover {
  transform: translateY(-2px);
  background: var(--accent-hi);
}
.btn:active {
  transform: scale(0.95);
}
.btn .ic {
  font-size: 15px;
}
.btn .lbl {
  font-size: 12.5px;
  font-weight: bold;
  letter-spacing: 0.6px;
}

#hint {
  position: absolute;
  bottom: 80px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 5;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.6px;
  opacity: 0.6;
  pointer-events: none;
  animation: hintpulse 1.7s ease-in-out infinite;
}
@keyframes hintpulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.8;
  }
}

/* ============ RESULT ============ */
#result {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 20px 18px;
  background: linear-gradient(165deg, #23262c 0%, #15171b 60%, #0e1013 100%);
}
#result.show {
  display: flex;
}
#result h2 {
  margin-top: 14px;
  color: #fff;
  font-size: 25px;
  letter-spacing: -0.3px;
}
#result p {
  margin-top: 9px;
  color: #a8aeb8;
  font-size: 12.5px;
  line-height: 1.45;
}

#shortlist {
  width: 100%;
  margin: 20px 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 5px;
  padding: 8px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease;
}
.row:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(0, 158, 60, 0.7);
}
.row .thumb {
  width: 58px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: #3a3f47 center/cover no-repeat;
}
.row .txt {
  flex: 1;
  min-width: 0;
}
.row .rm {
  /* must be a block for text-overflow to apply */
  display: block;
  font-size: 11.5px;
  font-weight: bold;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row .rp {
  display: block;
  font-size: 12px;
  font-weight: bold;
  color: var(--accent);
  margin-top: 3px;
}
.row .arw {
  color: #6b7280;
  font-size: 14px;
  flex: 0 0 auto;
}

#result .cta {
  width: 100%;
  margin-top: 14px;
}
#replay {
  margin-top: 12px;
  color: #7b818b;
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}
#replay:hover {
  color: #fff;
}
