:root {
    --primary-color: #3b82f6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--gray-100);
}

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

header {
    background-color: white;
    padding: 2rem 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}

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

.subtitle {
    color: var(--gray-500);
    font-size: 1.1rem;
}

.api-section {
    margin-bottom: 2rem;
}

.api-key-section {
    margin-bottom: 2rem;
}

.api-key-card {
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1.5rem;
}

.api-key-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.api-key-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    margin-bottom: 0.5rem;
}

.api-key-form input {
    flex: 1;
}

.api-key-form label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.api-key-status {
    margin: 0;
    font-size: 0.875rem;
    color: var(--gray-500);
}

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

.endpoint-card {
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.endpoint-header {
    padding: 1rem 1.5rem;
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.method {
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.method.get {
    background-color: #dbeafe;
    color: #1e40af;
}

.method.post {
    background-color: #d1fae5;
    color: #065f46;
}

.method.put {
    background-color: #fef3c7;
    color: #92400e;
}

.method.delete {
    background-color: #fee2e2;
    color: #991b1b;
}

.path {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.95rem;
    color: var(--gray-700);
}

.endpoint-body {
    padding: 1.5rem;
}

.endpoint-body p {
    margin-bottom: 1rem;
    color: var(--gray-500);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

input, textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

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

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: var(--gray-700);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--gray-900);
}

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

.btn-danger:hover {
    background-color: #dc2626;
}

.response-section, .files-section {
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.status-code {
    font-weight: 700;
    font-size: 1.1rem;
}

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

.status-code.error {
    color: var(--danger-color);
}

.response-time {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.response-body {
    background-color: var(--gray-900);
    color: #f3f4f6;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.files-list {
    display: grid;
    gap: 1rem;
}

.file-item {
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.15s;
}

.file-item:hover {
    background-color: var(--gray-100);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.file-meta {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.file-id {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.75rem;
    color: var(--gray-500);
    background-color: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--gray-500);
}

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

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

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}