/* ========== STYLE SEBELUMNYA DIPERTAHANKAN ========== */
body {
  background: radial-gradient(circle at top left, #d7e1ec, #f5f7fa);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  padding-bottom: 80px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cards-grid {
  display: grid;
  justify-content: center;
  align-items: stretch;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 900px;
}

.card {
  width: 100%;
  max-width: 350px;
  border-radius: 1rem;
  padding: 25px 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  text-align: center;
  color: #fff;
  position: relative;
  z-index: 1;
  transform: scale(0.95);
  opacity: 0;
  animation: fadeInCard 0.6s ease forwards;
  word-wrap: break-word;
}
@keyframes fadeInCard { to { transform: scale(1); opacity: 1; } }

.card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.meja-title { font-weight: 700; font-size: 1.4rem; margin-bottom: 10px; }
.antrian-label { font-size: 1rem; margin-bottom: 5px; color: rgba(255,255,255,0.8); }
.antrian-number { font-size: 3rem; font-weight: 700; margin-bottom: 8px; text-shadow: 1px 1px 4px rgba(0,0,0,0.3); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .cards-grid { grid-template-columns: 1fr 1fr; justify-items: center; }
  .card { max-width: 300px; padding: 18px 12px; }
  .antrian-number { font-size: 2.2rem; }
  .meja-title { font-size: 1.2rem; }
}
@media (max-width: 576px) {
  body { padding: 15px 0 80px 0; }
  .container { width: 100%; padding: 0 10px; }
  .cards-grid { grid-template-columns: 1fr; width: 100%; }
  .card {
    max-width: 85%;
    padding: 12px 10px;
    margin: 0 auto 14px auto;
    min-height: 110px;
    display: flex; flex-direction: column; justify-content: center;
  }
  .antrian-number { font-size: 1.8rem; }
  .meja-title { font-size: 1.05rem; }
}

/* ===== Gradient warna tiap meja ===== */
.meja-1 { background: linear-gradient(135deg, #42a5f5, #478ed1); }
.meja-2 { background: linear-gradient(135deg, #ec407a, #d14063); }
.meja-3 { background: linear-gradient(135deg, #ffa726, #e68920); }
.meja-4 { background: linear-gradient(135deg, #66bb6a, #4da155); }
.meja-5 { background: linear-gradient(135deg, #ab47bc, #8d369a); }

/* ===== Tombol Ambil Sticky ===== */
.bottom-menu {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  z-index: 9999;
}
.btn-ambil {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.1rem;
  border-radius: 50px;
  background: linear-gradient(90deg, #007bff, #00c6ff);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0,123,255,0.3);
  border: none;
  padding: 14px 40px;
  transition: all 0.3s ease;
}
.btn-ambil:hover {
  transform: translateY(-3px);
  background: linear-gradient(90deg, #0066cc, #00aaff);
}

/* Loading Spinner */
#loading {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.spinner {
  border: 5px solid #e0e0e0;
  border-top: 5px solid #007bff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ====== Last Update Style ====== */
.last-update {
  text-align: center;
  font-size: 0.9rem;
  color: #444;
  margin-top: 20px;
  padding: 8px 18px;
  background: rgba(0, 123, 255, 0.08);
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 10px rgba(0,123,255,0.15);
  animation: pulse 3s infinite ease-in-out;
  backdrop-filter: blur(6px);
}
.last-update i {
  color: #007bff;
  animation: spin 2s linear infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.03); }
}