/* =========================
   Base Layout
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f5f5f7;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 100dvh;
  padding-top: 1rem;
  overflow-x: hidden;
}

.app {
  width: 100%;
  max-width: 600px;
}

/* =========================
   Card
========================= */
.card {
  background: #fff;
  padding: 2rem;
  border-radius: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* =========================
   Terminal
========================= */
.terminal {
  background: #0d1117;
  color: #c9d1d9;
  font-family: "Menlo", "Consolas", monospace;
  font-size: 14px;
  padding: 16px;
  border-radius: 12px;
  height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
}

.terminal-line {
  white-space: pre;
}

.terminal-muted {
  color: #8b949e;
  margin-bottom: 6px;
}

.terminal-user {
  color: #3fb950;
  font-weight: 600;
}

.terminal-path {
  color: #a371f7;
}

/* =========================
   Buttons
========================= */
.primary-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 14px;
  border: none;
  background: black;
  color: white;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.primary-btn:hover {
  background: #222;
}

.primary-btn:active {
  transform: scale(0.98);
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-buttons {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.action-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #30363d;
  background: #161b22;
  color: #c9d1d9;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.action-btn:hover:not(:disabled) {
  background: #21262d;
}

.action-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.generate-row {
  display: flex;
  gap: 12px;
}

.generate-row .primary-btn {
  flex: 1;
}

/* Icon button for reset / GitHub */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  padding: 0;
}

.icon-btn img {
  width: 32px;
  height: 32px;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.icon-btn:active {
  transform: scale(0.96);
}

/* =========================
   Form Elements
========================= */
.input-group {
  margin-bottom: 1.2rem;
}

.label-title {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

input[type="range"] {
  width: 100%;
}

input[type="number"],
input[type="text"] {
  width: 100%;
  padding: 0.4rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

input[type="radio"],
input[type="checkbox"] {
  transform: scale(1.1);
}

/* Slider inline */
.slider-inline {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.slider-inline input[type="range"] {
  flex: 1;
}

.slider-value {
  min-width: 50px;
  text-align: right;
  font-weight: 600;
}

/* =========================
   Seed Options
========================= */
#seed-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}

.seed-option {
  display: grid;
  grid-template-columns: 24px 1fr minmax(50px, 1fr);
  align-items: center;
  gap: 10px;
}

.seed-option input[type="text"],
.seed-option input[type="number"] {
  width: 100%;
  min-width: 0;
}

/* =========================
   Modal
========================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  z-index: 10;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
}

.modal-content {
  background: #fff;
  padding: 1rem;
  border-radius: 28px;
  width: 100%;
  max-width: 500px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-x: hidden;
}

/* =========================
   Utilities
========================= */
.hidden {
  display: none;
}

.hidden-slider {
  display: none;
}

/* =========================
   Responsive
========================= */
@media (max-width: 600px) {
  .card {
    padding: 1rem;
  }

  .terminal {
    height: 60dvh;
  }

  .modal-content {
    padding: 1rem;
    max-width: 100%;
  }

  input[type="number"],
  input[type="text"] {
    padding: 0.6rem;
  }

  .seed-option {
    grid-template-columns: 24px 1fr minmax(40px, 1fr);
  }
}
