:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #242836;
  --border: #2e3346;
  --text: #e2e4eb;
  --text2: #9295a5;
  --accent: #6c5ce7;
  --accent-hover: #7f71ed;
  --danger: #e74c3c;
  --success: #2ecc71;
  --warning: #f39c12;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  width: 100%;
  max-width: 560px;
  padding: 24px 16px;
}

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

header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

header p {
  color: var(--text2);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 4px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text2);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card + .card { margin-top: 16px; }

/* Forms */
label {
  display: block;
  font-size: 0.85rem;
  color: var(--text2);
  margin-bottom: 6px;
  font-weight: 500;
}

textarea, input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: border 0.15s;
}

textarea:focus, input:focus, select:focus {
  border-color: var(--accent);
}

textarea {
  resize: vertical;
  min-height: 100px;
  font-family: var(--mono);
}

.form-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.form-row > div { flex: 1; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
  margin-top: 16px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-hover); }

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

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-copy {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  margin-top: 8px;
}

.btn-copy:hover { border-color: var(--accent); }

/* Result / URL box */
.url-box {
  margin-top: 16px;
  padding: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  word-break: break-all;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  user-select: all;
}

/* Reveal area */
.reveal-box {
  position: relative;
  margin-top: 12px;
}

.secret-content {
  padding: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-all;
}

.secret-overlay {
  position: absolute;
  inset: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text2);
  transition: background 0.15s;
}

.secret-overlay:hover {
  background: var(--surface);
}

/* Status indicators */
.status-bar {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text2);
}

.ws-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ws-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

.ws-dot.connected { background: var(--success); }

/* Alerts / messages */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-top: 12px;
}

.alert-error {
  background: rgba(231, 76, 60, 0.15);
  color: var(--danger);
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.alert-success {
  background: rgba(46, 204, 113, 0.15);
  color: var(--success);
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.alert-info {
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent);
  border: 1px solid rgba(108, 92, 231, 0.3);
}

/* Misc */
.hidden { display: none !important; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

.meta {
  font-size: 0.8rem;
  color: var(--text2);
  margin-top: 8px;
}

footer {
  text-align: center;
  padding: 24px;
  font-size: 0.75rem;
  color: var(--text2);
}
