/* Custom properties for easy brand adjustments */
:root {
  --primary: #901717;
  --primary-hover: #731111;
  --bg-app: #fdfdfd;
  --bg-page: #f0f2f5;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --seat-empty: #f8fafc;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  margin: 0;
  padding: 60px 20px;
  line-height: 1.5;
}

.app {
  max-width: 1000px;
  margin: auto;
  background: var(--bg-app);
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

h1 {
  text-align: center;
  margin-bottom: 40px;
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: -0.025em;
  color: #0f172a;
}

/* ===== Refined Controls Layout ===== */
.controls,
.student-input {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.controls label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-muted);
}

input[type="number"],
input[type="text"] {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: #fcfcfc;
  transition: border-color 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

button {
  padding: 10px 24px;
  border-radius: 10px;
  border: none;
  background: var(--primary);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* ===== Classroom & Blackboard ===== */
.classroom {
  margin-top: 50px;
  padding: 40px;
  background: #f1f5f9;
  border-radius: 32px;
  border: 1px inset rgba(0,0,0,0.02);
}

.blackboard {
  background: #255b31;
  color: #fefefe;
  text-align: center;
  padding: 16px;
  margin: 0 auto 40px auto;
  width: 60%;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 4px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ===== Modern Seats ===== */
.seats {
  display: grid;
  gap: 20px;
  justify-content: center;
}

.seat {
  width: 120px;
  height: 120px;
  background: var(--seat-empty);
  border-radius: 18px;
  border: 2px dashed #cbd5e1;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.seat:hover {
  background: #fff;
  border-color: var(--primary);
  transform: scale(1.05);
}

.seat.filled {
  border: none;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.seat img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.seat .name {
  position: relative;
  z-index: 2;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  color: var(--text-main);
}