:root {
  --bg: #f5f7fb;
  --card: rgba(255, 255, 255, 0.75);
  --border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --muted: #64748b;
  --primary: #111827;
  --primary-hover: #1f2937;
  --ok-bg: #ecfdf5;
  --ok-text: #065f46;
  --err-bg: #fef2f2;
  --err-text: #991b1b;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.10), transparent 30%),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.08), transparent 25%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.wrapper {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.card-wide {
  max-width: 680px;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.back-link:hover {
  color: var(--text);
}

.btn,
.icon-btn,
.copy-btn,
.back-link {
  user-select: none;
}

.badge {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  margin-bottom: 18px;
}

h1 {
  font-size: 2rem;
  line-height: 1.1;
  margin: 0 0 12px;
}

.text {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 18px;
}

.info {
  margin: 0 0 22px;
  font-size: 0.95rem;
}

.form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

label {
  font-size: 0.92rem;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
  outline: none;
}

textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
}

input:disabled {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
  cursor: not-allowed;
}

.drop-zone {
  display: grid;
  gap: 8px;
  place-items: center;
  border: 1px dashed rgba(15, 23, 42, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  padding: 26px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  user-select: none;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.86);
  transform: translateY(-1px);
}

.drop-zone.file-too-large {
  border-color: rgba(153, 27, 27, 0.45);
  background: var(--err-bg);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-zone-title {
  color: var(--text);
  font-weight: 800;
}

.drop-zone-text,
.drop-zone-file {
  color: var(--muted);
  font-size: 0.92rem;
}

.drop-zone-file {
  max-width: 100%;
  overflow-wrap: anywhere;
}

input:focus,
textarea:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.15);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 52px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  position: absolute;
  right: 8px;
  top: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
  border-color: var(--border);
  outline: none;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.field-help {
  color: var(--muted);
  font-size: 0.86rem;
  margin: -4px 0 0;
  text-align: right;
}

.error-text {
  color: var(--err-text);
}

.validation-text {
  text-align: left;
}

.validation-text::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 0.08em;
}

.validation-text.is-valid {
  color: var(--ok-text);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.btn {
  border: none;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  font-size: 0.98rem;
  font-weight: 600;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn:disabled:hover {
  background: var(--primary);
  transform: none;
}

.message {
  margin-top: 18px;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 0.95rem;
}

.message.error {
  background: var(--err-bg);
  color: var(--err-text);
}

.secret-box {
  margin-top: 18px;
  background: var(--ok-bg);
  color: var(--ok-text);
  border-radius: 16px;
  padding: 18px;
  display: grid;
  gap: 8px;
}

.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.copy-row code,
.copy-row a {
  min-width: 0;
}

.copy-btn {
  flex: 0 0 auto;
  border: 1px solid rgba(6, 95, 70, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ok-text);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 9px 12px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.copy-btn:hover,
.copy-btn:focus-visible {
  background: #ffffff;
  border-color: rgba(6, 95, 70, 0.32);
  outline: none;
  transform: translateY(-1px);
}

.secret-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

code {
  font-family: Consolas, monospace;
  font-size: 1rem;
  word-break: break-word;
}

.result-link {
  color: var(--ok-text);
  font-weight: 700;
  word-break: break-all;
}

.hidden {
  display: none;
}

@media (max-width: 620px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .copy-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
