/* ===== БАЗА ===== */
body {
  font-family: system-ui, -apple-system, sans-serif;
  margin: 0;
  background: #ffffff;
}

/* контейнер */
.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  text-align: center;
}

/* центровані сторінки */
.centered {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 56px;
  background: #ffffff;
  border-bottom: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  box-sizing: border-box;
  z-index: 10;
}

.header-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 600;
  font-size: 16px;
}

.header-btn {
  background: none;
  border: none;
  font-size: 14px;
  color: #666;
  cursor: pointer;
}

.with-header {
  margin-top: 70px;
}

/* ===== ВІДСТУПИ ===== */
.app input,
.app select,
.app button {
  margin-top: 10px;
  margin-bottom: 10px;
}

.app input:first-child,
.app select:first-child,
.app button:first-child {
  margin-top: 0;
}

/* ===== КНОПКИ ===== */
.btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}

/* правильний зелений */
.btn-primary {
  background: #e8f5e9;
  color: #2e7d32;
}

.btn-primary:active {
  background: #d7edd8;
}

.btn-secondary {
  background: #f0f0f0;
  color: #000;
}

.btn-secondary:active {
  background: #e0e0e0;
}

.btn-danger {
  background: #c62828;
  color: white;
}

.btn-small {
  height: 36px;
  font-size: 14px;
}

/* ===== ПЛИТКИ ===== */
.tiles {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tile {
  height: 110px;
  border-radius: 14px;
  font-size: 20px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10px;
}

.tile-blue { background: #e3f2fd; }
.tile-green { background: #e8f5e9; }
.tile-orange { background: #fff3e0; }
.tile-purple { background: #f3e5f5; }

.tile:active {
  background: #e0e0e0 !important;
  transform: scale(0.97);
}

/* ===== INPUT ===== */
input, select {
  width: 100%;
  height: 44px;
  padding: 10px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* ===== СПИСКИ ===== */
.studentRow {
  padding: 14px;
  border-bottom: 1px solid #ddd;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}

.studentRow:active {
  background: #f5f5f5;
}

.studentRow.eaten {
  color: #c62828;
  background: #ffebee;
  font-weight: 600;
  pointer-events: none;
}

/* ===== ВИБРАНІ ===== */
.selected {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 10px;
  font-size: 15px;
}

.removeBtn {
  background: #ffcccc;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

/* ===== СТАТУС ===== */
#status {
  margin-top: 12px;
  font-size: 20px;
  min-height: 28px;
  font-weight: 600;
}

#result {
  margin-top: 6px;
  font-size: 16px;
  color: #555;
  word-break: break-all;
}

.ok {
  color: #2e7d32;
}

.error {
  color: #c62828;
}

/* ===== VIDEO ===== */
video {
  width: 100%;
  max-width: 360px;
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid #ccc;
}

/* ===== LOGIN ===== */
.box {
  border: 1px solid #ccc;
  padding: 24px;
  width: 300px;
  text-align: center;
  border-radius: 12px;
}

.box input,
.box button {
  margin-top: 10px;
  margin-bottom: 10px;
}

.section {
  margin-top: 20px;
  margin-bottom: 20px;
}

.table {
  margin-top: 15px;
}

/* ===== MOBILE ===== */
@media (max-width: 480px) {

  .app {
    padding: 12px;
  }

  .tile {
    height: 100px;
    font-size: 18px;
  }

  .btn {
    height: 52px;
    font-size: 17px;
  }

}