:root {
  --primary: #1976d2;
  --accent: #2196f3;
  --bg: #f5f7fa;
  --card-bg: #fff;
  --border-radius: 14px;
  --shadow: 0 2px 12px #0002;
  --danger: #e53935;
  --success: #43a047;
  --muted: #b0b0b0;
}

body {
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
  background: var(--bg);
  margin: 0;
  min-height: 100vh;
}

#app {
  max-width: 430px;
  margin: 2.5em auto;
  padding: 2em 1em 1.5em 1em;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  min-height: 70vh;
}

h1 {
  color: var(--primary);
  font-size: 2.3em;
  margin: 0.4em 0 0.2em 0;
  text-align: center;
  letter-spacing: 1px;
}
h2, h3 {
  color: var(--primary);
  margin-bottom: 0.5em;
  text-align: center;
}
label {
  display: block;
  margin: 1.2em 0 0.5em 0;
  font-weight: 500;
  color: #444;
}
input, select, button, textarea {
  font-size: 1.1em;
  margin-bottom: 1em;
  padding: 0.7em;
  border-radius: 7px;
  border: 1px solid #dadada;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
}
button {
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: 0.5em;
  transition: background 0.2s, color 0.2s;
}
button:hover, button:focus {
  background: var(--accent);
}
button:disabled, .btn-disabled {
  background: var(--muted) !important;
  color: #fff !important;
  cursor: not-allowed !important;
}
.card {
  background: var(--bg);
  border-radius: var(--border-radius);
  box-shadow: 0 1px 4px #0001;
  padding: 1.2em 1em;
  margin-bottom: 1.5em;
  border-left: 4px solid var(--primary);
}
.main-term {
  font-weight: bold;
  font-size: 1.3em;
  color: var(--primary);
  margin-bottom: 0.6em;
}
.points {
  font-size: 1.1em;
  margin-bottom: 1em;
  color: var(--success);
  text-align: center;
}
.timer {
  font-size: 1.7em;
  color: var(--danger);
  margin-bottom: 1em;
  text-align: center;
  letter-spacing: 2px;
}
ul {
  padding-left: 1.2em;
  margin: 0.2em 0 0 0;
}
.team-btns {
  display: flex;
  gap: 1em;
  margin-bottom: 1em;
}
.topbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.7em;
  margin-bottom: 1.2em;
}
.topbar button {
  background: none;
  color: var(--primary);
  border: none;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  padding: 0.2em 0.8em;
  margin: 0;
  transition: color 0.2s;
}
.topbar button.active, .topbar button:focus {
  color: var(--accent);
  text-decoration: underline;
}
.abort-btn {
  background: var(--danger);
  color: #fff;
  margin-top: 0.7em;
  width: 100%;
  font-size: 1em;
}
.info-box {
  background: #e3f2fd;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 1em;
  margin: 1.2em 0 1.5em 0;
  color: #1a237e;
  font-size: 1.07em;
}
.legal-footer {
  max-width: 430px;
  margin: -1.2em auto 2em auto;
  text-align: center;
}
.legal-footer .footer-link {
  background: none;
  color: #5f6b7a;
  border: none;
  width: auto;
  margin: 0;
  padding: 0.5em 1em;
  font-size: 0.95em;
  font-weight: 500;
  text-decoration: underline;
}
.legal-footer .footer-link:hover, .legal-footer .footer-link:focus {
  background: none;
  color: var(--primary);
}
.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
@media (max-width: 500px) {
  #app {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 1em 0.3em;
  }
}
