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

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-hover: #1a1a1a;
  --border: #2a2a2a;
  --border-focus: #555;
  --text: #e8e8e8;
  --text-muted: #888;
  --text-hint: #666;
  --accent: #7c6ef0;
  --accent-hover: #6b5dd3;
  --accent-glow: rgba(124, 110, 240, 0.15);
  --success: #4ade80;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 540px;
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #e8e8e8 0%, #7c6ef0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  resize: vertical;
  transition: border-color 0.2s;
  outline: none;
}

textarea:focus {
  border-color: var(--border-focus);
}

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

.ai-options {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.ai-options-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.3rem 0;
}

.radio-option input[type="radio"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.radio-text {
  font-size: 0.95rem;
}

.radio-hint {
  color: var(--text-hint);
  font-size: 0.85rem;
}

.btn-generate {
  width: 100%;
  padding: 0.85rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-generate:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-generate:active {
  transform: scale(0.99);
}

.result {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  animation: slideUp 0.3s ease;
}

.result.hidden {
  display: none;
}

.result-url {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  word-break: break-all;
  min-width: 0;
}

.btn-copy {
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}

.btn-copy:hover {
  border-color: var(--border-focus);
  background: var(--surface-hover);
}

.copy-feedback {
  font-size: 0.8rem;
  color: var(--success);
  opacity: 0;
  transition: opacity 0.3s;
  width: 100%;
  text-align: center;
}

.copy-feedback.visible {
  opacity: 1;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

footer {
  text-align: center;
  margin-top: 3rem;
  color: var(--text-hint);
  font-size: 0.8rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.6rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  .result {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-copy {
    text-align: center;
  }
}
