:root {
  --bg: #0a0a0a;
  --surface: #1a1a1a;
  --surface-elevated: #252525;
  --border: #333;
  --text: #e0e0e0;
  --text-muted: #999;
  --accent: #00b4d8;
  --accent-hover: #0096c7;
  --success: #06d6a0;
  --error: #ef476f;
  --warning: #ffd60a;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

#app {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

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

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

header h1 a {
  color: var(--text);
  text-decoration: none;
}

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

.tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
}

main {
  margin-bottom: 3rem;
}

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

h2 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
}

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

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

textarea,
input[type="text"],
select {
  width: 100%;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

textarea:focus,
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
}

.char-count {
  display: block;
  text-align: right;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.btn-primary,
.btn-secondary {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

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

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

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

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

.error {
  background: rgba(239, 71, 111, 0.1);
  border: 1px solid var(--error);
  border-radius: 6px;
  padding: 0.75rem;
  color: var(--error);
  margin-top: 1rem;
}

.result-box {
  margin-top: 2rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.result-label {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.link-display {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.link-display input {
  flex: 1;
  font-family: monospace;
  font-size: 0.875rem;
}

.link-display button {
  width: auto;
}

.warning {
  color: var(--warning);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.how-it-works {
  margin-top: 3rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Reveal view states */
.state {
  text-align: center;
  padding: 2rem;
}

.spinner {
  border: 3px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

.icon-large {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.info-text {
  color: var(--success);
  margin-bottom: 1.5rem;
}

.secret-display {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  max-height: 400px;
  overflow-y: auto;
}

.secret-display pre {
  font-family: "SF Mono", Monaco, "Courier New", monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: var(--text);
  margin: 0;
}

.actions {
  margin-top: 1.5rem;
}

/* Content pages */
.content-page {
  max-width: 800px;
  margin: 0 auto;
}

.content-page article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
}

.content-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.content-page h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.content-page h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.content-page p {
  margin-bottom: 1rem;
  color: var(--text);
}

.content-page ul,
.content-page ol {
  margin-bottom: 1rem;
  margin-left: 2rem;
}

.content-page li {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.content-page a {
  color: var(--accent);
  text-decoration: none;
}

.content-page a:hover {
  text-decoration: underline;
}

.content-page code {
  background: var(--surface-elevated);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.content-page section {
  margin-bottom: 2rem;
}

.content-page em {
  color: var(--text-muted);
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.faq-item:last-child {
  border-bottom: none;
}

footer nav {
  margin-top: 1rem;
  font-size: 0.9rem;
}

footer nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 0.25rem;
}

footer nav a:hover {
  color: var(--accent);
}

.why-secure,
.who-its-for,
.trust-privacy {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.why-secure a,
.who-its-for a,
.trust-privacy a {
  color: var(--accent);
  text-decoration: none;
}

.who-its-for ul {
  list-style: none;
  margin-left: 0;
}

.who-its-for li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
}

.who-its-for li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Utility classes */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 640px) {
  header h1 {
    font-size: 2rem;
  }
  
  .cards {
    grid-template-columns: 1fr;
  }
  
  .link-display {
    flex-direction: column;
  }
  
  .link-display button {
    width: 100%;
  }
}
