@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;600;700&family=DM+Sans:wght@400;500;700&display=swap');

:root {
  --bg-primary: #FAFAF8;
  --bg-card: #FFFFFF;
  --text-primary: #1A1A1A;
  --text-secondary: #5A5A5A;
  --text-hint: #8A8A8A;
  --border-light: #E5E5E0;
  --border-medium: #D0D0C8;
  --accent-primary: #2D5F4F;
  --accent-hover: #1E4437;
  --accent-light: #E8F0ED;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: 840px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

h1 {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--text-primary);
}

h2 {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  margin: 32px 0 20px;
  color: var(--text-primary);
}

.sub {
  font-size: 19px;
  color: var(--text-secondary);
  margin: 0 0 48px;
  max-width: 600px;
  line-height: 1.5;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary) 60%, transparent);
}

label {
  display: block;
  margin: 0 0 28px;
  font-weight: 500;
  font-size: 15px;
  color: var(--text-primary);
}

label span.label-text {
  display: block;
  margin-bottom: 8px;
}

input, select, textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border-medium);
  border-radius: 10px;
  font-size: 16px;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all 0.2s ease;
  margin-top: 6px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-light);
}

input::placeholder {
  color: var(--text-hint);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235A5A5A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 0 0 28px;
}

hr {
  border: none;
  height: 1px;
  background: var(--border-light);
  margin: 40px 0 32px;
}

.hint {
  font-size: 14px;
  color: var(--text-hint);
  margin: 8px 0 20px;
  line-height: 1.5;
}

.btn {
  display: inline-block;
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

pre {
  white-space: pre-wrap;
  margin: 0;
  font-family: 'DM Sans', monospace;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
}

.result-actions {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-box {
  background: var(--accent-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 24px;
  margin-top: 32px;
}

.cta-box p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
}

@media (max-width: 768px) {
  .wrap {
    padding: 40px 20px 60px;
  }

  h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 24px;
  }

  .card {
    padding: 28px 24px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .sub {
    font-size: 17px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0F0F0F;
    --bg-card: #1A1A1A;
    --text-primary: #EFEFEF;
    --text-secondary: #A0A0A0;
    --text-hint: #707070;
    --border-light: #2A2A2A;
    --border-medium: #3A3A3A;
    --accent-primary: #4A9B7F;
    --accent-hover: #5DB393;
    --accent-light: #1E3830;
  }

  input, select, textarea {
    background: #141414;
    color: var(--text-primary);
  }
}
