/* WorkProof Shared Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  min-height: 100%;
}

:root {
  --bg: #0a0a0a;
  --bg-soft: #111111;
  --bg-elevated: #1a1a1a;
  --border: #27272a;
  --text: #e5e5e5;
  --text-muted: #71717a;
  --accent: #22c55e;
  --accent-dim: #166534;
  --blue: #3b82f6;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  word-wrap: break-word;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Typography */
h1 { font-size: 36px; font-weight: 700; margin-bottom: 16px; }
h2 { 
  font-size: 24px; 
  font-weight: 600; 
  margin: 64px 0 16px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 96px;
}
h3 { 
  font-size: 18px; 
  font-weight: 600; 
  margin: 32px 0 12px;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  scroll-margin-top: 96px;
}
p { margin-bottom: 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Beta Banner */
.beta-banner {
  background: var(--bg-elevated);
  color: #eab308;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid #eab308;
}

.beta-banner .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}

.beta-banner-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.beta-badge-small {
  background: #fef08a;
  color: #854d0e;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.beta-banner-close {
  background: none;
  border: none;
  color: #fef08a;
  cursor: pointer;
  padding: 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
  position: absolute;
  right: 16px;
}

.beta-banner-close:hover { opacity: 1; }
.beta-banner { display: none; }
.beta-banner-show .beta-banner { display: block; }

/* Header */
header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  z-index: 100;
}

nav {
  width: 100%;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.beta-badge {
  background: transparent;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-left: 8px;
  border: 1px solid var(--border);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

.logo:hover { text-decoration: none; }

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-links a .external-icon {
    margin-left: 4px;
    opacity: 0.5;
    vertical-align: middle;
}

.nav-links a:hover .external-icon {
    opacity: 0.8;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 65px; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 100;
  padding: 24px;
}

.mobile-menu.active { display: block; }

.mobile-menu a {
  display: block;
  padding: 16px 0;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:hover { color: var(--accent); }

/* Footer */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

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

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

/* Note boxes */
.note {
  background: rgba(34, 197, 94, 0.1);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
}

.note-title {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Warning/Info boxes */
.warning {
  background: rgba(234, 179, 8, 0.1);
  border-left: 3px solid #eab308;
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
}

.warning-title {
  font-weight: 600;
  color: #eab308;
  margin-bottom: 8px;
}

.info {
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid var(--blue);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
}

.info-title {
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 8px;
}

/* Documentation Content */
.content h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
}

.content h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 64px 0 16px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 96px;
}

/* First h2 shouldn't have top border */
.content > h2:first-of-type,
.content-inner > h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 12px;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  scroll-margin-top: 96px;
}

.content h4 {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  margin: 24px 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.content p {
  margin-bottom: 16px;
}

.content ul, .content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.content li {
  margin-bottom: 8px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: 1px solid var(--border);
}

tr:hover td {
  background: var(--bg-elevated);
}

/* Code blocks */
code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
}

pre {
  background: var(--bg-elevated);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--border);
}

pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
}

/* HTTP Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.status-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent);
}

.status-info {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.status-redirect {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.status-error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.status-payment {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

/* Architecture diagram */
.diagram {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin: 16px 0;
}

.diagram pre {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

/* Last updated */
.last-updated {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Copy button for code blocks */
.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}

pre:hover .copy-btn {
    opacity: 1;
}

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

.copy-btn.copied {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent);
}

/* Responsive */
@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  .beta-banner .container { padding-right: 40px; }
  .beta-banner-text { flex-wrap: wrap; }
}
