:root {
  --bg: #1e1e2f;
  --card-bg: #2b2b3d;
  --text: #fff;
  --accent: #ff6b35;
  --accent-hover: #e2551d;
  --border-radius: 8px;
  --field-bg: #1a1a2a;
  --field-bg-inactive: #272736;
}

body {
  margin: 0;
  padding: 2rem;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

h1 {
  margin-bottom: 1rem;
  text-align: center;
}

.container {
  max-width: 60vw;
  margin: auto;
}

@media only screen and (max-width: 600px) {
  .container {
    max-width: 98vw;
  }
}

.card {
  background: var(--card-bg);
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  margin-top: 1rem;
}

label {
  display: block;
  margin-bottom: 0.75rem;
  margin-right: 0.5em;
}

input[type="number"] {
  padding: 0.4em;
  margin-left: 0.5em;
  width: 100px;
  background: var(--field-bg);
  border: 1px solid #444;
  color: var(--text);
  border-radius: 4px;
}

input.editing {
  background-color: var(--field-bg-inactive);
  color: #aaa;
  pointer-events: none;
  opacity: 0.6;
}


.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.result {
  margin-top: 1rem;
  font-weight: bold;
}

button {
  font-size: medium;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.5em 1em;
  border-radius: var(--border-radius);
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.2s;
}

button:hover {
  background: var(--accent-hover);
}

.hidden {
  display: none;
}


.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background-color: #2a2d3b;
  color: #f0f0f0;
  margin: 10% auto;
  padding: 1.5em;
  width: 90%;
  max-width: 400px;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.modal-content label {
  display: block;
  margin: 0.5em 0;
}

.close {
  color: #888;
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #fff;
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5em;
}

.modal-buttons button {
  background-color: #f25c27;
  color: #fff;
  border: none;
  width: fit-content;
}

.modal-buttons button:hover {
  background-color: #d94e20;
}

select {
  background-color: #2f3136;
  color: #e4e6eb;
  border: 1px solid #3a3d46;
  padding: 0.6em 1.2em;
  border-radius: 6px;
}

.output {
  background-color: #2a2d3b;
  padding: 1.5em;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
  max-height: 40vh;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}