* {
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  margin: 0;
  height: 100vh;
  background: radial-gradient(circle at top, #0f2027, #000);
  display: flex;
  justify-content: center;
  color: #fff;
}

/* App Container */
.app-container {
  width: 90%;
  max-width: 1100px;
  padding: 20px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #4fd1c5;
}

/* Main Layout */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
  height: calc(100vh - 120px);
}

/* Input Card */
.card {
  background: #0b0f14;
  padding: 25px;
  border-radius: 14px;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
  height: fit-content;
}

label {
  font-size: 14px;
  color: #aaa;
  display: block;
  margin-top: 15px;
}

input, select {
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  background: #1a1f2b;
  border: 1px solid #2c3344;
  border-radius: 8px;
  color: #fff;
}

button {
  margin-top: 20px;
  width: 100%;
  padding: 12px;
  background: #4fd1c5;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  background: #38b2ac;
}

/* History Panel */
.history-card {
  background: #0b0f14;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
}

.history-card h2 {
  font-size: 16px;
  color: #4fd1c5;
  margin-bottom: 10px;
}

/* Scrollable history */
.history-scroll {
  overflow-y: auto;
  padding-right: 5px;
}

/* History items */
.history-item {
  background: #1a1f2b;
  border: 1px solid #2c3344;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  font-size: 14px;
}

.history-item span {
  display: block;
  color: #ccc;
  margin-top: 4px;
}

/* Alarm Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #0b0f14;
  padding: 30px;
  border-radius: 14px;
  text-align: center;
  width: 90%;
  max-width: 350px;
}

.modal-content h2 {
  color: #f56565;
}

.modal-content button {
  background: #48bb78;
}

/* Responsive Fix */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .history-scroll {
    max-height: 300px;
  }
}
