* { box-sizing: border-box; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 35%, #0f3460 100%);
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 1rem 1.5rem;
}
header {
  text-align: center;
  margin-bottom: 0.75rem;
  animation: fadeInDown 0.5s ease-out;
}
header h1 {
  font-size: 2rem;
  margin: 0;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
header p { margin: 0.35rem 0 0; color: rgba(255,255,255,0.85); font-size: 0.95rem; }
main { width: 100%; max-width: 440px; animation: fadeIn 0.6s ease-out 0.1s both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }

.booking-form {
  background: #fff;
  border-radius: 20px;
  padding: 1.75rem;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 10px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.05) inset;
  transition: box-shadow 0.25s ease;
}
.booking-form:hover { box-shadow: 0 14px 48px rgba(0,0,0,0.22), 0 0 0 1px rgba(255,255,255,0.06) inset; }
.booking-form h2 { margin: 0 0 1.25rem; font-size: 1.3rem; font-weight: 600; color: #1a1a1a; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; margin-bottom: 0.4rem; font-size: 0.9rem; color: #444; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  color: #1a1a1a;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field select option { background: #fff; color: #1a1a1a; }
.field input::placeholder, .field textarea::placeholder { color: #999; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: #e85d04;
  box-shadow: 0 0 0 3px rgba(232,93,4,0.18);
}
.slots-row { display: flex; flex-direction: column; gap: 1rem; }
.slots-group { display: flex; flex-direction: column; gap: 0.4rem; }
.slots-label { font-size: 0.85rem; color: #555; font-weight: 500; }
.slots-summary { margin-top: 0.5rem; font-weight: 600; color: #c24a04; }
.slots { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.slot {
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  border: 2px solid #e0e0e0;
  background: #f8f8f8;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s, border-color 0.2s;
  color: #1a1a1a;
}
.slot:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.slot.slot-free {
  background: #fff8f0;
  border-color: #e85d04;
  color: #c24a04;
}
.slot.slot-free:hover {
  background: #e85d04;
  border-color: #e85d04;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(232,93,4,0.35);
}
.slot.selected {
  background: #e85d04;
  border-color: #e85d04;
  color: #fff;
  transform: scale(1.02);
  box-shadow: 0 4px 14px rgba(232,93,4,0.4);
}
.slot.selected:hover { transform: scale(1.02) translateY(-1px); }
.availability-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.25rem;
}
.availability-zone {
  flex: 1 1 100%;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px dashed #d7dde3;
}
.availability-zone:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.availability-zone-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.1rem;
}
.availability-zone-note {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.25rem;
}
.availability-item {
  font-size: 0.85rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #d0d7de;
  background: #e8f8f0;
  cursor: pointer;
  outline: none;
}
.availability-item.free {
  color: #20603d;
  border-color: #b4dfc5;
}
.availability-item.busy {
  background: #f3f4f6;
  color: #9ca3af;
  border-color: #e5e7eb;
}
.availability-item.selected {
  background: #e85d04;
  border-color: #e85d04;
  color: #fff;
}
.snooker-inline-choice {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.15rem 0 0.25rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid #ffd4b8;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff7f1 0%, #fff 100%);
}
.snooker-inline-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #9a3412;
}
.snooker-inline-segment {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.snooker-opt {
  border: 1px solid #fecaa8;
  border-radius: 999px;
  background: #fff;
  color: #9a3412;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.snooker-opt.active {
  background: #ea580c;
  border-color: #ea580c;
  color: #fff;
}
.hint { font-size: 0.85rem; color: #666; margin: 0.5rem 0 0; }
.hint-warn { color: #b45309; }
button#submit {
  width: 100%;
  padding: 0.9rem 1rem;
  margin-top: 0.6rem;
  font-size: 1.05rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #e85d04 0%, #c24a04 100%);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s;
}
button#submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232,93,4,0.4);
}
button#submit:active:not(:disabled) { transform: translateY(0); }
button#submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.message { margin-top: 1rem; font-size: 0.9rem; min-height: 1.4em; }
.message.success { color: #0d8050; }
.message.error { color: #c53030; }
.price-text { margin: 0; font-size: 1rem; color: #555; font-weight: 500; }
footer { margin-top: auto; padding: 2rem 0 1rem; text-align: center; font-size: 0.85rem; color: rgba(255,255,255,0.7); }

.thank-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.hidden { display: none !important; }
.thank-modal.hidden { display: none; }
.thank-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.thank-box {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  max-width: 340px;
  box-shadow: 0 24px 56px rgba(0,0,0,0.3);
  border: 2px solid #e85d04;
  animation: thankPop 0.35s ease-out;
}
@keyframes thankPop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.thank-title { margin: 0 0 0.5rem; font-size: 1.35rem; font-weight: 700; color: #1a1a1a; }
.thank-text { margin: 0 0 1.25rem; color: #555; font-size: 1rem; }
.thank-btn {
  padding: 0.7rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #e85d04 0%, #c24a04 100%);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}
.thank-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(232,93,4,0.4); }
