/* neojongg web — styles
   Copyright (C) 2026  neojongg contributors
   GPL-2.0-or-later; see ../LICENSE. */

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  background: rgb(24, 60, 40);
  color: #e6ece6;
}

.toolbar, .hud {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.4rem 0.8rem;
  background: rgba(0, 0, 0, 0.35);
}

.title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-right: 0.4rem;
}

.spacer { flex: 1; }

button, select, input {
  font: inherit;
  font-size: 0.9rem;
  color: #e6ece6;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.25rem;
  padding: 0.2rem 0.6rem;
}

button:hover { background: rgba(255, 255, 255, 0.22); cursor: pointer; }

select option { color: #222; }

label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
}

#seed-input { width: 8.5rem; }

.board-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
}

#board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.5rem;
  padding: 1.2rem 2rem;
  text-align: center;
  min-width: 16rem;
}

.panel p:first-child {
  font-size: 1.3rem;
  font-weight: bold;
  margin-top: 0;
}

.panel button { margin: 0.3rem; }

.panel.hidden { display: none; }

#panel-info {
  background: rgb(16, 28, 20);
  text-align: left;
  max-width: min(38rem, 92vw);
  max-height: 88%;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.5;
}

#panel-info h2 {
  font-size: 1.05rem;
  margin: 1rem 0 0.4rem;
}

#panel-info h2:first-of-type { margin-top: 0; }

#panel-info p, #panel-info ul { margin: 0 0 0.6rem; }

#panel-info li { margin: 0.25rem 0; }

#panel-info a { color: #a8d8b0; }

#panel-info .closex {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  padding: 0 0.5rem;
  font-size: 1.1rem;
  line-height: 1.5;
}

.hud {
  font-size: 0.85rem;
  color: #cdd8cd;
}

.hud .keys { opacity: 0.7; }
