:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --code-bg: #1e293b;
    --code-text: #e2e8f0;
    --success: #10b981;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* Header */
.app-header {
    margin: 40px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--primary);
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.app-header p {
    color: var(--text-muted);
    font-size: 16px;
}

/* Cards (Sections) */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.card h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

/* Demo Section */
.demo-section p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.demo-form {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
    background: #f8fafc;
    font-family: var(--font-sans);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    font-family: var(--font-sans);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Docs Section */
.docs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.badge {
    background: #e0e7ff;
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.endpoint-block {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.endpoint-block .method {
    font-weight: 700;
    color: var(--primary);
    margin-right: 12px;
    font-size: 14px;
}

.endpoint-block .url {
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    color: var(--text-main);
}

.description {
    color: var(--text-muted);
    margin-bottom: 24px;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-main);
}

/* Code Blocks */
.code-block {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 16px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    overflow-x: auto;
}

.code-block.json-block pre {
    margin: 0;
}

/* Fields List */
.fields-list {
    list-style: none;
    margin-top: 16px;
}

.fields-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.fields-list li:last-child {
    border-bottom: none;
}

.fields-list li strong {
    color: var(--text-main);
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 180px;
}

/* Footer */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 12px 0;
    display: flex;
    justify-content: center;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.02);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    position: relative;
}

.pulse::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--success);
    border-radius: 50%;
    animation: pulser 2s infinite;
}

@keyframes pulser {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

/* Responsive */
@media (max-width: 600px) {
    .demo-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
    }
    
    .fields-list li {
        flex-direction: column;
        gap: 4px;
    }
}
