* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 28px;
    font-weight: 600;
}

.content {
    padding: 30px;
}

.toolbar {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #e0e7ff;
    color: #667eea;
}

.btn-secondary:hover {
    background: #c7d2fe;
}

.btn-danger {
    background: #ef4444;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-danger:hover {
    background: #dc2626;
}

.api-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.api-table thead {
    background: #f8fafc;
}

.api-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.api-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.api-table tbody tr:hover {
    background: #f8fafc;
}

.method-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.method-GET { background: #dbeafe; color: #1e40af; }
.method-POST { background: #dcfce7; color: #166534; }
.method-PUT { background: #fef3c7; color: #92400e; }
.method-DELETE { background: #fee2e2; color: #991b1b; }

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: #dcfce7;
    color: #166534;
}

.loading {
    text-align: center;
    color: #94a3b8;
    padding: 40px !important;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #94a3b8;
    cursor: pointer;
}

.close:hover {
    color: #475569;
}

#addForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

#addForm input,
#addForm select,
#addForm textarea {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

#addForm textarea {
    min-height: 80px;
    resize: vertical;
}

#addForm input:focus,
#addForm select:focus,
#addForm textarea:focus {
    outline: none;
    border-color: #667eea;
}
