:root {
  --bg: #0a0c10;
  --bg-gradient: linear-gradient(168deg, #0a0c10 0%, #0f1219 40%, #111827 100%);
  --surface: #141821;
  --surface-raised: #1a1f2b;
  --surface-hover: #1e2433;
  --border: #232a3a;
  --border-subtle: #1c2230;
  --text: #eaecf2;
  --text-secondary: #b0b8cc;
  --text-muted: #6b7590;
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-glow: rgba(59, 130, 246, 0.15);
  --primary-border: rgba(59, 130, 246, 0.25);
  --danger: #f43f5e;
  --danger-bg: rgba(244, 63, 94, 0.08);
  --danger-border: rgba(244, 63, 94, 0.2);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.08);
  --success-border: rgba(16, 185, 129, 0.2);
  --warning: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-gradient);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Layout ---- */

.container {
  width: 100%;
  max-width: 560px;
  padding: 2.5rem 1.5rem 1.5rem;
  flex: 1;
}

/* ---- Header / Branding ---- */

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

.logo {
  height: 28px;
  margin-bottom: 1.25rem;
  opacity: 0.92;
}

.header h1 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.header .subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 420px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1rem;
  padding: 0.3rem 0.75rem;
  background: var(--primary-glow);
  border: 1px solid var(--primary-border);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary-hover);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

/* ---- Card ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---- Tabs ---- */

.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  padding: 0.25rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.tab-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.tab-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
}

.tab-btn.active {
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.tab-btn:hover:not(.active) {
  color: var(--text-secondary);
}

/* ---- Form ---- */

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
  font-weight: 500;
}

.form-hint {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

textarea,
input[type="text"],
input[type="password"],
input[type="email"],
select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

textarea {
  min-height: 140px;
  resize: vertical;
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7590' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

input[type="file"] { display: none; }

.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  color: var(--text-muted);
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.file-upload-area svg {
  width: 32px;
  height: 32px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.5;
  transition: stroke 0.25s;
}

.file-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.file-upload-area:hover svg {
  stroke: var(--primary);
}

.file-upload-area small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-info {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--success);
  font-weight: 500;
}

/* ---- Options Row ---- */

.options-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  gap: 0.5rem;
  font-family: inherit;
}

.btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.btn-primary {
  background: var(--primary);
  color: white;
  width: 100%;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

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

.btn-secondary {
  background: var(--surface-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--text);
}

/* ---- Trust Indicators ---- */

.trust-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.trust-item svg {
  width: 13px;
  height: 13px;
  stroke: var(--success);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* ---- Result / Success ---- */

.result { margin-top: 0; }

.success-notice {
  text-align: center;
  padding: 2rem 1.5rem;
}

.success-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--success);
  fill: none;
  stroke-width: 2;
}

.success-notice h3 {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
  letter-spacing: -0.01em;
}

.success-notice p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  line-height: 1.55;
}

.success-notice .hint {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ---- View Page ---- */

.status {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.status .spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

.view-intro {
  text-align: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.view-intro p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.55;
}

.view-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.625rem 0.75rem;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--warning);
  line-height: 1.45;
}

.view-warning svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 1px;
}

.error {
  text-align: center;
  padding: 1.5rem;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.5;
}

.secret-content {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.125rem;
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8125rem;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 400px;
  overflow-y: auto;
  line-height: 1.6;
  color: var(--text);
}

.content-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.destroyed-notice {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--danger);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.destroyed-notice svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* ---- Footer ---- */

.footer {
  width: 100%;
  max-width: 560px;
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  color: var(--primary);
}

/* ---- Utility ---- */

.hidden { display: none !important; }

/* ---- Responsive ---- */

@media (max-width: 480px) {
  .container { padding: 1.5rem 1rem 1rem; }
  .card { padding: 1.25rem; }
  .options-row { grid-template-columns: 1fr; }
  .trust-bar { gap: 0.75rem; }
  .header h1 { font-size: 1.2rem; }
}
