/* ===== RESET ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f4f4;
}

/* ===== CARD ===== */
.card {
  max-width: 1100px;
  margin: 30px auto;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.1);
}

/* ===== HEADER ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== BADGE ===== */
.badge {
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9rem;
}

.badge.wait {
  background: #ccc;
  color: #333;
}

.badge.active {
  background: #4caf50;
  color: #fff;
}

.badge.end {
  background: #e53935;
  color: #fff;
}

/* ===== LAYOUT ===== */
.layout {
  display: flex;
  gap: 30px;
  margin-top: 20px;
}

.col {
  flex: 1;
}

/* ===== BOX ===== */
.box {
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 8px;
  background: #fafafa;
}

/* colonna destra sempre ordinata */
.layout .col:last-child .box {
  display: flex;
  flex-direction: column;
  min-height: 420px;
}
/* ===== TABS ===== */
.tabs {
  width: 100%;
}

.tab-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab-buttons button {
  padding: 8px 14px;
  border-radius: 10px;
  border: 2px solid #195b81;
  background: #327196;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  transition: background .25s ease, transform .15s ease;
}

/* hover */
.tab-buttons button:hover {
  background: #55a5e7;
  border: 2px solid #2682b8;
  transform: translateY(-1px);
}

/* tab attiva */
.tab-buttons button.active {
  background: #ce8921 !important;
  border:2px solid #8a570b !important;
  color: #fff;
}

/* contenuto tab */
.tab-content {
  display: none;
  font-size: 0.95rem;
  animation: fadeIn .25s ease;
}

.tab-content.active {
  display: block;
}

/* animazione */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== VALORE / TIMER ===== */
#currentValue {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 8px;
}

#startInfo {
  font-weight: bold;
  margin-bottom: 6px;
}

#countdown {
  font-size: 18px;
  margin-bottom: 10px;
}

/* ===== PUNTATE ===== */
#bids {
  margin-top: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
}

/* scrollbar */
#bids::-webkit-scrollbar {
  width: 6px;
}
#bids::-webkit-scrollbar-track {
  background: #eee;
  border-radius: 10px;
}
#bids::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 10px;
}

/* singola puntata */
#bids > div {
  padding: 6px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.9rem;
}

/* ultima puntata */
.last-bid {
  background: #fff3cd;
  animation: flash 1s ease;
}

@keyframes flash {
  0% { background: #ffe066; }
  100% { background: #fff3cd; }
}

/* ===== INPUT & BUTTON ===== */
input {
  padding: 8px;
  margin-top: 10px;
  width: 100%;
  font-size: 1rem;
}

button {
  padding: 10px;
  margin-top: 10px;
  width: 100%;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #4caf50;
  color: #fff;
  font-size: 1rem;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }
}

.vehicle-thumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.vehicle-thumbs img {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: .7;
}

.vehicle-thumbs img:hover {
  opacity: 1;
}

.vehicle-image {
  width: 100%;
  height: 220px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.vehicle-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
