/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f1419;
    color: #e4e4e7;
    line-height: 1.6;
}

/* Header */
.header {
    background: #1a1a1a;
    border-bottom: 1px solid #3f3f46;
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #f4f4f5;
}

.api-badge {
    background: #3b82f6;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

/* Layout */
.layout {
    display: flex;
    height: calc(100vh - 64px);
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #1a1a1a;
    border-right: 1px solid #3f3f46;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #3f3f46;
}

.sidebar-header h3 {
    color: #71717a;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-header i {
    color: #3b82f6;
}

.nav-menu {
    list-style: none;
    padding: 16px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #a1a1aa;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #27272a;
    color: #3b82f6;
    border-left-color: #3b82f6;
}

.nav-item.active {
    background: #1e3a8a;
    color: #3b82f6;
    border-left-color: #3b82f6;
    font-weight: 500;
}

.method {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    min-width: 35px;
    text-align: center;
}

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

/* Content */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.section-header {
    margin-bottom: 40px;
}

.section-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #f4f4f5;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 16px;
    color: #a1a1aa;
}

/* Cards */
.info-card, .api-card {
    background: #1a1a1a;
    border: 1px solid #3f3f46;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
}

.info-card h3 {
    color: #f4f4f5;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card i {
    color: #f59e0b;
}

.info-card ul {
    list-style: none;
}

.info-card li {
    margin-bottom: 8px;
    color: #a1a1aa;
}

.info-card code {
    background: #27272a;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    color: #3b82f6;
}

.api-card h3 {
    color: #f4f4f5;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #e4e4e7;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.required {
    color: #ef4444;
}

.input, .select {
    width: 100%;
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 6px;
    padding: 12px;
    color: #e4e4e7;
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
}

.input:focus, .select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Buttons */
.btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    margin-bottom: 24px;
}

.btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

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

/* Code Section */
.code-section {
    margin-bottom: 24px;
}

.code-section h4 {
    color: #f4f4f5;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.code-block {
    background: #0f0f0f;
    border: 1px solid #3f3f46;
    border-radius: 8px;
    padding: 16px;
    position: relative;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    color: #e4e4e7;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #3f3f46;
    border: none;
    color: #a1a1aa;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #3b82f6;
    color: white;
}

/* Response Section */
.response-section h4 {
    color: #f4f4f5;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.response-status {
    margin-bottom: 12px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.ready {
    background: #374151;
    color: #9ca3af;
}

.status-badge.success {
    background: #10b981;
    color: white;
}

.status-badge.error {
    background: #ef4444;
    color: white;
}

.response-body {
    background: #0f0f0f;
    border: 1px solid #3f3f46;
    border-radius: 8px;
    padding: 16px;
    min-height: 200px;
    overflow-x: auto;
}

.response-body pre {
    margin: 0;
    color: #e4e4e7;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 160px;
    color: #71717a;
    text-align: center;
}

.placeholder i {
    font-size: 32px;
    margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .content {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinning {
    animation: spin 1s linear infinite;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

.optional {
    color: #6b7280;
    font-weight: normal;
    font-size: 0.85em;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}