:root {
  --primary: #cc2936;
  --bg: #f7f7fb;
  --text: #1f1f1f;
  --muted: #6b6b6b;
  --card: #ffffff;
  --border: #e2e2e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.header {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
}

.logo {
  width: 160px;
  margin-bottom: 1rem;
}

.subtitle {
  color: var(--muted);
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  gap: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

label {
  display: block;
  margin: 1rem 0 0.5rem;
  font-weight: 600;
}

textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  resize: vertical;
}

select,
input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 1rem;
}

button.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(204, 41, 54, 0.25);
}

button.secondary {
  background: #f0f0f5;
  color: var(--text);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
}

.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.views-row {
  margin-top: 0.5rem;
}

.range-row input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
}

.switch {
  background: #f6f6fa;
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
}

.switch input {
  display: none;
}

.switch .slider {
  width: 40px;
  height: 22px;
  background: #c9c9d6;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
}

.switch .slider::after {
  content: "";
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.switch input:checked + .slider {
  background: var(--primary);
}

.switch input:checked + .slider::after {
  transform: translateX(18px);
}

.result {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 12px;
  background: #f8f1f2;
  border: 1px solid #f0c9ce;
}

.link-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.link-row input {
  flex: 1;
}

.secret {
  font-size: 1.1rem;
  padding: 1rem;
  border-radius: 10px;
  background: #f8f8ff;
  border: 1px dashed var(--border);
  min-height: 80px;
}

.footer {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem 3rem;
}

.footer-content {
  display: grid;
  gap: 0.5rem;
  align-items: center;
  justify-items: center;
}

.footer-primary {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-weight: 600;
  color: var(--text);
}

.footer-secondary {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.95rem;
}

.link-button {
  background: none;
  border: none;
  color: var(--primary);
  margin-left: 0;
  font-weight: 600;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 20, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 50;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  border-radius: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1f1f1f;
  z-index: 1;
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-list {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 600px) {
  .row,
  .link-row {
    flex-direction: column;
    align-items: stretch;
  }
}
