:root {
  --bg-gradient: radial-gradient(circle at 50% 0%, #1e293b 0%, #0b0f19 75%);
  --card-bg: rgba(17, 24, 39, 0.85);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.35);
  --accent-red: #ef4444;
  --accent-red-glow: rgba(239, 68, 68, 0.35);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.35);
  --font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

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

body {
  background: var(--bg-gradient);
  background-color: #0b0f19;
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 640px;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.header {
  text-align: center;
  margin-bottom: 28px;
}

.badge-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  box-shadow: 0 0 16px var(--accent-cyan-glow);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

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

.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.char-counter {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: #64748b;
}

.char-counter-danger {
  color: #f87171;
  font-weight: 700;
}

.input-container {
  position: relative;
}

textarea {
  width: 100%;
  height: 150px;
  background: #090e17;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 14px;
  resize: vertical;
  outline: none;
  transition: all 0.2s ease;
  line-height: 1.5;
}

textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 5px 10px;
  border-radius: 6px;
  color: #cbd5e1;
}

.countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.28);
  padding: 6px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 20px;
  user-select: none;
}

.btn-spaced {
  margin-top: 10px;
}

.link-btn {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #04131d;
  box-shadow: 0 4px 16px var(--accent-cyan-glow);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 22px rgba(6, 182, 212, 0.5);
  filter: brightness(1.1);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--accent-red-glow);
}

.btn-danger:hover:not(:disabled) {
  box-shadow: 0 6px 22px rgba(239, 68, 68, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.output-box {
  background: #090e17;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 10px;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent-cyan);
  word-break: break-all;
  user-select: all;
  margin-top: 10px;
  position: relative;
}

.secret-display {
  background: #050a12;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 10px;
  padding: 16px;
  font-family: var(--font-mono);
  color: #34d399;
  font-size: 1rem;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.reveal-intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
  line-height: 1.5;
}

.alert {
  padding: 16px;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.alert-heading {
  margin-bottom: 8px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.error-banner {
  margin-bottom: 16px;
}

.hidden {
  display: none !important;
}

.footer {
  text-align: center;
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 14px;
}

.shortcut-hint {
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  margin-top: 10px;
}

@media (max-width: 480px) {
  body {
    padding: 14px;
  }

  .card {
    padding: 20px;
    border-radius: 14px;
  }

  .title {
    font-size: 1.65rem;
  }

  .label-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
