:root {
  --ink: #1c1b19;
  --paper: #ffffff;
  --line: #c9c2b3;
  --accent: #2f5d50;
  --accent-soft: #ddeae5;
  --error: #8c3b2e;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at bottom center, var(--accent-soft) 0%, var(--paper) 80%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0 0 48px;
}

.site-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 48px;
}

.site-header .logo img {
  height: 60px;
  display: block;
  border-radius: 12px;
}

.site-header .socials {
  display: flex;
  gap: 24px;
  align-items: center;
}

.site-header .social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
}

.site-header .social-link:hover {
  color: var(--accent);
}

.site-header .social-link svg {
  width: 24px;
  height: 24px;
}

.card {
  width: 100%;
  max-width: 680px;
  margin-top: clamp(48px, 8vh, 80px);
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

h1 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  margin: 0 0 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p.sub {
  margin: 0 0 28px;
  color: #5c574d;
  font-size: 15px;
  max-width: 46ch;
}

.platforms-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px 20px;
  align-items: center;
  margin: 0 0 48px;
  color: #5c574d;
  font-size: 14px;
}

.platform-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.platform-item svg {
  width: 16px;
  height: 16px;
  color: #8a8375;
}

form {
  display: flex;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--paper);
}

input[type="text"] {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  padding: 10px 0;
}

input[type="text"]::placeholder {
  color: #9a9284;
}

button {
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  cursor: pointer;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: all 0.2s ease;
}

button:hover {
  background: var(--accent);
}

button:disabled {
  background: #b3ab9c;
  cursor: not-allowed;
}

button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.status {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 13px;
  min-height: 20px;
  color: #5c574d;
}

.status.error {
  color: var(--error);
}

.status.done {
  color: var(--accent);
}

/* Preview card */
.preview {
  margin-top: 12px;
  display: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #7ac142;
  color: var(--paper);
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.preview.show {
  display: block;
  animation: slideUpFade 0.4s ease-out forwards;
}

.preview-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #d8d2c4;
  overflow: hidden;
  position: relative;
}

.preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.preview:hover .preview-media img {
  transform: scale(1.03);
}

.preview-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(28, 27, 25, 0.85);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.preview-body {
  padding: 16px 18px 18px;
}

.preview-title {
  font-weight: 700;
  font-size: 20px;
  line-height: 1.35;
  margin: 0 0 6px;
  color: var(--paper);
}

.preview-uploader {
  font-family: var(--mono);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 20px;
}

.options-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.option-group label {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
}

.option-group select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.option-group select:focus {
  border-color: #7ac142;
  box-shadow: 0 0 0 3px rgba(122, 193, 66, 0.2);
}

.option-group select:disabled {
  background: rgba(255, 255, 255, 0.5);
  color: #8a8375;
  cursor: not-allowed;
}

.filename-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.filename-row label {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
}

.filename-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filename-input-wrap:focus-within {
  border-color: #7ac142;
  box-shadow: 0 0 0 3px rgba(122, 193, 66, 0.2);
}

.filename-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
  min-width: 0;
}

.filename-input-wrap .ext {
  font-family: var(--mono);
  font-size: 14px;
  color: #8a8375;
  flex-shrink: 0;
}

.preview-actions {
  display: flex;
  gap: 8px;
}

.preview-actions button {
  flex: 1;
}

.preview-actions button.secondary {
  color: var(--paper);
  border-color: var(--paper);
}

.preview-actions button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--paper);
}

.result {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  display: none;
}

.result.show {
  display: block;
}

.result a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
}


.notice {
  margin-top: 24px;
  font-size: 12px;
  color: #8a8375;
  line-height: 1.6;
}

.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #c9c2b3;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.bg-tree {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  height: clamp(250px, 35vw, 550px);
}

.bg-tree-left {
  left: 0;
  top: 60%;
  transform: translate(-45%, -50%) rotate(5deg);
}

.bg-tree-right {
  right: 0;
  top: 90%;
  transform: translate(45%, -50%) rotate(-5deg);
}