:root {
  --primary: #e74c3c;
  --primary-dark: #c0392b;
  --success: #27ae60;
  --warning: #f39c12;
  --error: #e74c3c;
  --bg: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #252525;
  --text: #f5f5f5;
  --text-muted: #888;
  --border: #333;
}

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

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

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

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

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.header-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 4px;
}

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

section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text);
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

p {
  margin-bottom: 1rem;
}

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

a:hover {
  text-decoration: underline;
}

code {
  background: var(--bg-tertiary);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.9em;
}

.hero {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
}

.warning {
  background: rgba(243, 156, 18, 0.1);
  border: 1px solid var(--warning);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  margin-bottom: 0;
}

.status-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-indicator.checking {
  background: var(--warning);
  animation: pulse 1.5s ease-in-out infinite;
}

.status-indicator.success {
  background: var(--success);
}

.status-indicator.error {
  background: var(--error);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.tools-list {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.tools-list ul {
  list-style: none;
}

.tools-list li {
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.9rem;
}

.tools-list li:last-child {
  margin-bottom: 0;
}

.hidden {
  display: none;
}

.input-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.input-group input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-tertiary);
  color: var(--text);
  font-size: 1rem;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
}

button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: var(--primary-dark);
}

button.secondary {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
}

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

.key-status {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.key-status.saved {
  color: var(--success);
}

.key-status.cleared {
  color: var(--warning);
}

.how-it-works ol {
  padding-left: 1.5rem;
}

.how-it-works li {
  margin-bottom: 1rem;
  padding-left: 0.5rem;
}

.how-it-works li:last-child {
  margin-bottom: 0;
}

.unique-features ul {
  list-style: none;
}

.unique-features li {
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.unique-features li:last-child {
  margin-bottom: 0;
}

.test-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.test-output {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
}

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

footer p {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }
  
  header h1 {
    font-size: 1.8rem;
  }
  
  section {
    padding: 1rem;
  }
  
  .input-group {
    flex-direction: column;
  }
  
  .input-group input {
    min-width: 100%;
  }
  
  .test-buttons {
    flex-direction: column;
  }
  
  button {
    width: 100%;
  }
}
