* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #08080c;
  color: #e2e8f0;
  line-height: 1.6;
  min-height: 100vh;
}

.gen-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px solid #1a1c28;
  background: #0a0b10;
}

.gen-nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.gen-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7a8ba8;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.2s;
}

.gen-nav-link:hover {
  color: #2bb5a0;
}

.gen-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4e5d73;
  font-size: 0.82rem;
  font-weight: 600;
}

.gen-nav-brand img {
  width: 22px;
  height: 22px;
  opacity: 0.7;
}

.app-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px;
}

.main-card {
  background: #0f1017;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5), 0 0 1px rgba(43, 181, 160, 0.15);
  padding: 40px;
  overflow: hidden;
  border: 1px solid #1a1c28;
}

.app-header {
  text-align: center;
  margin-bottom: 36px;
}

.header-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
}

.app-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f0f4f8;
  margin-bottom: 4px;
}

.app-header .subtitle {
  font-size: 0.95rem;
  color: #7a8ba8;
  font-weight: 500;
  margin-bottom: 6px;
}

.app-header .description {
  font-size: 0.85rem;
  color: #4e5d73;
}

.divider {
  height: 1px;
  background: #1a1c28;
  margin: 28px 0;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4e5d73;
  margin-bottom: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 6px;
}

select,
textarea,
input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #1e2130;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #e2e8f0;
  background: #12131c;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234e5d73' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

select option {
  background: #12131c;
  color: #e2e8f0;
}

select:focus,
textarea:focus,
input[type="text"]:focus {
  outline: none;
  border-color: #2bb5a0;
  box-shadow: 0 0 0 3px rgba(43, 181, 160, 0.15);
}

select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

textarea::placeholder,
input[type="text"]::placeholder {
  color: #3a4459;
}

.slider-group {
  margin-bottom: 16px;
}

.slider-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 6px;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider-container input[type="range"] {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #1e2130;
  border-radius: 3px;
  outline: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2bb5a0;
  cursor: pointer;
  border: 2px solid #0f1017;
  box-shadow: 0 0 8px rgba(43, 181, 160, 0.4);
}

.slider-container input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2bb5a0;
  cursor: pointer;
  border: 2px solid #0f1017;
  box-shadow: 0 0 8px rgba(43, 181, 160, 0.4);
}

.slider-value {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #2bb5a0;
}

.slider-desc {
  font-size: 0.78rem;
  color: #4e5d73;
  margin-top: 4px;
}

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn {
  padding: 12px 28px;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: #2bb5a0;
  color: #fff;
  flex: 1;
  box-shadow: 0 2px 12px rgba(43, 181, 160, 0.3);
}

.btn-primary:hover {
  background: #33c9b2;
  box-shadow: 0 4px 20px rgba(43, 181, 160, 0.4);
}

.btn-secondary {
  background: #1a1c28;
  color: #7a8ba8;
  border: 1px solid #1e2130;
}

.btn-secondary:hover {
  background: #1e2130;
  color: #94a3b8;
}

.output-section {
  display: none;
}

.output-section.visible {
  display: block;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.output-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #94a3b8;
}

.output-container {
  background: #0a0b10;
  color: #c8d6e5;
  border-radius: 12px;
  padding: 24px;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #1a1c28;
}

.output-container::-webkit-scrollbar {
  width: 6px;
}

.output-container::-webkit-scrollbar-track {
  background: transparent;
}

.output-container::-webkit-scrollbar-thumb {
  background: #2a2d3e;
  border-radius: 3px;
}

.btn-copy {
  background: transparent;
  border: 1.5px solid #1e2130;
  color: #7a8ba8;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-copy:hover {
  border-color: #2bb5a0;
  color: #2bb5a0;
}

.btn-copy.copied {
  border-color: #2bb5a0;
  background: #2bb5a0;
  color: #fff;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a1c28;
  color: #e2e8f0;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid #2a2d3e;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 1023px) {
  .app-container {
    padding: 24px 16px;
  }

  .main-card {
    padding: 28px 24px;
  }

  .gen-nav {
    padding: 12px 16px;
  }
}

@media (max-width: 767px) {
  .app-container {
    padding: 16px;
  }

  .main-card {
    padding: 24px 16px;
    border-radius: 12px;
  }

  .app-header h1 {
    font-size: 1.6rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .btn-row {
    flex-direction: column;
  }

  .btn {
    min-height: 44px;
    width: 100%;
  }

  .output-container {
    font-size: 0.75rem;
    padding: 16px;
    max-height: 500px;
  }

  .output-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .gen-nav {
    padding: 10px 12px;
    gap: 8px;
  }

  .gen-nav-left {
    gap: 12px;
  }

  .gen-nav-link {
    font-size: 0.78rem;
  }

}
