:root {
  --blue-room-color: #6200ea;
  --green-room-color: #018786;
  --contrast-color: #ffffff;
  --background-color: #000000;
  --heading-color: #ffffff;	
  --button-color: #ff5722; /* Original button color */
  --button-hover: #e64a19;
  --input-bg: #ffffff;
  --input-text: #333;
  --feedback-color: #fff;
  --feedback-bg: rgba(0, 0, 0, 0.3);
  /* Colors for input button states with hex values */
  --waiting-color: #FFFF00;       /* Yellow */
  --acknowledged-color: #90EE90;    /* Light green */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Arial', sans-serif;
  text-transform: uppercase;
}

body {
  background: var(--background-color);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 100vh;
  padding: 20px 0;
  overflow-y: auto;
}

h1 {
	margin-top:40px;
	margin-bottom:20px;
	font-size: 1.5em;
	color: var(--heading-color);
}

.container {
  width: 90%;
  max-width: 600px;
  margin-bottom: 40px; /* Add bottom margin for breathing room */
  overflow-y: auto; /* Enable vertical scrolling if needed */
}

/* Shared room styling */
.room {
  min-height: 300px; /* Minimum height instead of percentage */
  padding: 40px 40px 0 40px; /* Remove bottom padding for label */
  margin: 10px 0 30px 0; /* More vertical margin */
  border-radius: 8px;
  position: relative;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden; /* Prevent content overflow */
  display: flex;
  flex-direction: column;
}

/* Color themes */
.blue-room {
  background-color: var(--blue-room-color);
}

.green-room {
  background-color: var(--green-room-color);
}

/* ---------- Display Page Specific ---------- */
.room.display {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: background 0.3s, opacity 0.3s;
  color: var(--contrast-color);
  font-size: clamp(50px, 15vw, 100px); /* Responsive font size */
  font-weight: 900;
  opacity: 0.2;
  padding: 30px 20px; /* Adjusted padding */
}

.flashing {
  animation: flash 1s infinite alternate;
}

@keyframes flash {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

.solid {
  opacity: 1 !important;
  animation: none !important;
}

.room-label {
  width: 100%;
  text-align: center;
  font-weight: bold;
  padding: 10px 0;
  margin-top: auto; /* Push to bottom with flexbox */
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s;
  border-radius: 0 0 8px 8px; /* Round bottom corners */
}

.room-message-present .room-label {
  color: white;
}

.acknowledge-btn {
  display: none;
  background: var(--button-color);
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, transform 0.1s ease-in-out;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.acknowledge-btn:hover {
  background: var(--button-hover);
}

.acknowledge-btn:active {
  transform: scale(0.98);
}

.room-message-present .acknowledge-btn {
  display: inline-block;
}

/* ---------- Input Page Specific ---------- */
form {
  width: 100%;
}

input {
  width: 100%;
  padding: 10px;
  font-size: 32px;
  text-align:center;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin: 10px 0;
  background: var(--input-bg);
  color: var(--input-text);
  text-transform: none; /* Override global uppercase */
}

button {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  border: none;
  cursor: pointer;
  background: var(--button-color);
  color: white;
  border-radius: 8px;
  transition: background 0.3s, transform 0.1s ease-in-out;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
}

button:hover {
  background: var(--button-hover);
}

button:active {
  transform: scale(0.98);
}

/* New classes for input button states */
button.waiting {
  background: var(--waiting-color) !important;  /* Yellow */
  color: #000000 !important;                       /* Black text for contrast */
}

button.acknowledged {
  background: var(--acknowledged-color) !important; /* Light green */
  color: #000000 !important;                        /* Black text for contrast */
}

/* Feedback messages for input page */
.feedback {
  margin-top: 10px;
  margin-bottom: 30px; /* Add space before the room label */
  padding: 8px;
  background: var(--feedback-bg);
  color: var(--feedback-color);
  border-radius: 4px;
  font-size: 14px;
  width: 100%;
  text-align: center;
  min-height: 1.5em;
}

/* Login Form Styles */
.login-form {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 8px;
  margin-top: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-form h2 {
  color: var(--heading-color);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: var(--heading-color);
  font-weight: bold;
}

.error-message {
  color: #ff3333;
  margin-bottom: 15px;
  font-weight: bold;
}

/* Responsive rules */
@media screen and (max-width: 480px) {
  .room {
    padding: 20px 15px 0 15px;
    min-height: 280px;
  }
  
  input {
    font-size: 24px;
  }
  
  .feedback {
    font-size: 12px;
  }
  
  button {
    padding: 10px;
    font-size: 16px;
  }
  
  .acknowledge-btn {
    padding: 10px 20px;
    font-size: 16px;
  }
  
  h1 {
    margin-top: 20px;
    margin-bottom: 15px;
  }
}