* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(140deg, #eff6ff, #f8fafc 55%, #ecfeff);
  color: #111827;
  padding: 20px;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

h1 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.layout {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(260px, 420px);
  gap: 20px;
  align-items: start;
}

.main-card p {
  margin: 0 0 18px;
  color: #4b5563;
}

.muted {
  color: #4b5563;
}

.next-event {
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}

.next-event h2,
.sidebar-card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.next-event h3,
.event-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.event-time {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0c4a6e;
  margin: 0 0 8px;
}

.next-event-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
}

.next-event-title-group {
  flex: 1;
}

.next-event-title-group h2 {
  margin: 0 0 4px !important;
}

.next-event-title-group .event-time {
  margin: 0;
}

.presenter-image {
  flex-shrink: 0;
  max-height: 80px;
  width: 80px; /* fixed width for consistency */
  border-radius: 50%; /* circular image looks better */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  object-fit: cover;
}

form {
  display: grid;
  gap: 10px;
}

label {
  font-size: 0.9rem;
  color: #374151;
}

input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1rem;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1rem;
  font-weight: 600;
  background: #0f766e;
  color: #ffffff;
  cursor: pointer;
}

button:hover {
  background: #115e59;
}

.message {
  margin-top: 12px;
  min-height: 1.2rem;
  font-size: 0.95rem;
}

.message.success {
  color: #166534;
}

.message.error {
  color: #b91c1c;
}

.events-list {
  display: grid;
  gap: 10px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}

.event-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
}

.event-item p {
  margin: 0 0 8px;
}

.event-item-next {
  border-color: #0284c7;
  box-shadow: 0 0 0 1px #bae6fd inset;
  background: #f0f9ff;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .events-list {
    max-height: none;
  }
}

.digital-clock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
  color: #f1f5f9;
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  border: 1px solid #334155;
}

.clock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.clock-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  color: #94a3b8;
  margin-bottom: 4px;
}

.clock-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.clock-divider {
  width: 1px;
  height: 24px;
  background: #334155;
  margin: 0 15px;
}
