:root {
  --bg: #0a0a0f;
  --surface: #14141f;
  --border: #2a2a3a;
  --text: #e0e0e8;
  --muted: #8888a0;
  --accent: #6c63ff;
  --accent-hover: #7b73ff;
  --danger: #ff4757;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
.hidden { display: none !important; }
.visible-block { display: block !important; }
.visible-grid { display: grid !important; }
.visible-flex { display: flex !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  max-width: 600px;
  width: 100%;
  padding: 2rem 1.5rem;
}

header {
  text-align: center;
  margin-bottom: 0.5rem;
  padding-top: 0;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.25rem;
}

header h1 span {
  color: var(--accent);
}

.logo-svg {
  width: calc(100% + 1.5rem);
  margin-left: -0.75rem;
}

.byline {
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-style: italic;
}

header p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1rem;
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

textarea {
  width: 100%;
  min-height: 160px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s;
}

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

.char-count {
  text-align: right;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

button {
  width: auto;
  padding: 0.6rem 1.5rem;
  display: block;
  margin: 1rem auto 0;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover { background: var(--accent-hover); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.result {
  display: none;
  margin-top: 1.5rem;
}

.result.visible { display: block; }

.url-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.url-box input {
  flex: 1;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.9rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  outline: none;
}

.copy-btn {
  width: auto;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.info-list {
  list-style: none;
  margin-top: 1rem;
}

.info-list li {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.3rem 0;
  padding-left: 1.2rem;
  position: relative;
}

.info-list li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.feature {
  text-align: center;
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
  flex: 1;
  display: flex;
  align-items: flex-end;
}

.feature-icon img {
  height: 1.5rem;
  object-fit: contain;
}

.feature-icon img.dumpsterfire {
  height: 2.5rem;
}

.feature-label {
  font-size: 0.8rem;
  color: var(--muted);
}

/* File drop zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  text-align: center;
  margin: 0.75rem 0 0;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.05);
}

.drop-zone-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.drop-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.file-browse {
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
  font-weight: normal;
  text-transform: none;
  letter-spacing: normal;
  margin: 0;
  display: inline;
}

.drop-hint {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.6;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.file-preview {
  display: none;
  align-items: center;
  gap: 0.75rem;
}

.file-preview.visible {
  display: flex;
}

.file-preview .file-name {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.file-preview .file-size {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.remove-file {
  width: auto;
  padding: 0.2rem 0.6rem;
  background: transparent;
  color: var(--danger);
  font-size: 1.2rem;
  border: 1px solid var(--danger);
  border-radius: 4px;
  margin: 0;
}

.remove-file:hover {
  background: var(--danger);
  color: #fff;
}

.file-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.4rem;
  min-height: 0;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: auto;
  padding: 2rem 1rem;
}