html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background-image: url('background.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto;
  overflow-x: hidden;
  font-size: 15px; /* or try 0.95em, 90%, etc. */
}

header {
  background-color: #9c1420;
  padding: 20px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

header img {
  height: 60px;
}

.main-container {
  flex: 1 0 auto;
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: center;
  margin: 40px auto;
  max-width: 1200px;
  width: 100%;
}

#calendar, #slot-section {
  flex: 1 1 0;
  min-width: 300px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 20px;
}

@media (min-width: 701px) {
  #calendar {
    min-width: 400px;
    max-width: 600px;
  }
  #slot-section {
    min-width: 320px;
    max-width: 500px;
  }
}

select,
button,
input[type="date"],
input[type="text"],
input[type="email"] {
  padding: 4px;
  margin: 4px 0;
  font-size: 14px;
  width: 90%;
  box-sizing: border-box;
}

button {
  width: 100%;
  background-color: #9c1420;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: #7a1018;
}

footer {
  flex-shrink: 0;
  width: 100%;
  text-align: center;
  background: #9c1420;
  color: white;
  padding: 16px 0;
  margin: 0;
  border: none;
}

#terms-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
}

#terms-modal .modal-content {
  background: #fff;
  max-width: 500px;
  max-height: 90vh;
  margin: 60px auto;
  padding: 24px;
  border-radius: 8px;
  position: relative;
}

#terms-modal h2 {
  margin-top: 0;
}

#terms-modal .close {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}

#logo {
  width: 120px;
  display: block;
  margin-bottom: 20px;
}

.time-slot {
  padding: 10px;
  border: 1px solid #ccc;
  cursor: pointer;
}

.time-label {
  background-color: #f0f0f0;
  font-weight: bold;
}

.reserved {
  background-color: #ffcccc;
  cursor: not-allowed;
}

.available:hover {
  background-color: #ccffcc;
}

.admin-login-container {
  max-width: 350px;
  width: 100%;
  margin: 80px auto;
  padding: 32px 24px;
  background: #fff;
  border-radius: 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* box-shadow: 0 2px 16px rgba(0,0,0,0.08); */
}

.admin-login-container input,
.admin-login-container button {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.admin-login-container input[type="text"],
.admin-login-container input[type="email"],
.admin-login-container input[type="password"] {
  padding: 8px;
  font-size: 16px;
}

#admin-panel {
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

#terms-content {
  font-size: 0.9em;
  max-height: 70vh;
  overflow-y: auto;
}

/* --- MOBILE/TABLET FIX --- */
@media (max-width: 900px) {
  .main-container {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
    max-width: 100%;
    margin: 20px 0;
  }
  #calendar, #slot-section {
    min-width: 0;
    width: 100%;
  }
  select,
  button,
  input[type="date"],
  input[type="text"],
  input[type="email"] {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .main-container {
    gap: 0;
    margin: 10px 0;
    padding: 0 10px;
  }
  #calendar,
  #slot-section {
    margin-bottom: 20px;
    margin-top: 0;
    padding-left: 5px;
    padding-right: 5px;
  }
}

#terms-modal .close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

#terms-modal .close:hover {
  color: #000;
}

/* Free Reservation Modal Styles */
#free-reservation-modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

#free-reservation-modal .modal-content {
  background-color: #fefefe;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: modalSlideIn 0.3s ease-out;
  max-width: 500px;
  width: 90%;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#free-reservation-modal .close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  margin-top: -10px;
  margin-right: -10px;
}

#free-reservation-modal .close:hover {
  color: #000;
}

#close-free-reservation-btn:hover {
  background-color: #7a1018 !important;
}