/* ==== CSS Variables ==== */
:root {
  --bg-color: #2c3e50;
  --bg-color-alt: #34495e;
  --bg-color-alt2: rgb(30, 42, 55);
  --text-color: white;
  --text-color-alt: lightgray;
  --text-color-alt2: black;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  --font-family: 'Roboto', sans-serif;
  --font-size-small: 10px;
  --font-size-standard: 12px;
  --font-size-large: 14px;
}

/* ==== Global Reset ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* outline: 1px red dashed; */
}

html, body {
  overflow: hidden;
}

/* ==== App Layout ==== */
body {
  background-color: var(--bg-color);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-size: var(--font-size-large);
}

.app {
  width: 100svw;
  max-width: 370px;
  height: 100svh;
  max-height: 640px;
  position: relative;
  background-color: var(--bg-color-alt);
  box-shadow: var(--shadow);
  border-radius: 12px;
  color: var(--text-color);
  font-family: var(--font-family);
  margin: 10px;
}

/* ==== Header ==== */
.header {
  width: 100%;
  height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  text-shadow: var(--box-shadow);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.header-title {
  font-size: 24px;
  margin: 5px;
}

/* ==== Main ==== */
.main {
  height: 570px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

canvas {
  width: 350px;
  height: 350px;
  display: block;
  touch-action: none;
  box-shadow: var(--box-shadow);
  margin: 10px;
  border: solid 2px var(--bg-color-alt2);
}

/* Table for fixed layout of controls and stats */
table {
  table-layout: fixed;
  text-align: center;
  border-collapse: separate;
  border-spacing: 20px 0;
  margin: 10px;
}

table td {
  vertical-align: middle;
}

/* Controls table: for dropdowns, place label above control */
.control-cell > div.label {
  margin-bottom: 10px;
}

select {
  padding: 5px;
  border: none;
  border-radius: 5px;
  background: white;
  color: var(--text-color-alt2);
  box-shadow: var(--box-shadow);
  font-size: var(--font-size-large);
}

select:disabled {
  background: lightgray;
}

/* Button styles (all button texts now black) */
button {
  padding: 5px;
  font-size: var(--font-size-large);
  font-weight: bold;
  color: var(--text-color);
  text-shadow: var(--box-shadow);
  width: 60px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
  box-shadow: var(--box-shadow);
}

/* Button style */
#startBtn {
  background: #4CAF50;
}

#startBtn.pause {
  background: orange;
}

#resetBtn {
  background: #e74c3c;
}

#soundBtn {
  background: #95a5a6;
}

/* ==== Footer ==== */
.footer {
  width: 100%;
  height: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-small);
  color: var(--text-color-alt);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.footer-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
}

.footer a {
  color: var(--text-color-alt);
  text-decoration: none;
}
