/* x402 Demo App Styles */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #64748b;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --success: #22c55e;
    --error: #ef4444;
    --border-radius: 8px;
}

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

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

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

/* Header */
.header {
    border-bottom: 1px solid var(--surface-light);
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Wallet */
.wallet-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wallet-address {
    font-family: monospace;
    background: var(--surface);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--surface-light);
}

/* Pages */
.page {
    padding: 3rem 1rem;
}

.page h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* Cards */
.card, .demo-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h3, .demo-card h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    background: var(--background);
    border: 1px solid var(--surface-light);
    border-radius: var(--border-radius);
    color: var(--text);
    font-size: 1rem;
}

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

/* Demo */
.demo-controls {
    margin-bottom: 1rem;
}

.demo-status {
    padding: 1rem;
    background: var(--background);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.status-text {
    color: var(--text-muted);
}

.demo-result, .demo-tx {
    margin-top: 1rem;
}

.demo-result h4, .demo-tx h4 {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.code-block {
    background: var(--background);
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    font-family: monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
}

.tx-link {
    color: var(--primary);
    text-decoration: none;
    font-family: monospace;
    font-size: 0.875rem;
    word-break: break-all;
}

.tx-link:hover {
    text-decoration: underline;
}

/* Steps */
.steps {
    padding-left: 1.5rem;
}

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

/* Info section */
.info-section {
    margin-top: 3rem;
}

.info-section h2 {
    margin-bottom: 1rem;
}

/* Endpoint list */
.endpoint-list {
    list-style: none;
}

.endpoint-item {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.endpoint-slug {
    font-family: monospace;
    color: var(--primary);
}

.endpoint-price {
    color: var(--success);
}

.endpoint-target {
    color: var(--text-muted);
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empty {
    color: var(--text-muted);
    font-style: italic;
}

/* Docs */
.docs section {
    margin-bottom: 2rem;
}

.docs h2 {
    margin-bottom: 1rem;
}

.docs ul {
    padding-left: 1.5rem;
}

.docs li {
    margin-bottom: 0.5rem;
}

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

.docs a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    border-top: 1px solid var(--surface-light);
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    margin-top: auto;
}

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

.footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .page h1 {
        font-size: 2rem;
    }

    .endpoint-item {
        grid-template-columns: 1fr;
    }
}
