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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

header .subtitle {
  color: #7f8c8d;
  font-size: 1rem;
}

.card {
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card h2 {
  font-size: 1.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.card p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.status {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.status.success {
  border-left: 4px solid #27ae60;
}

.status.error {
  border-left: 4px solid #e74c3c;
}

/* フォーム */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #2c3e50;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* ボタン */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

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

.btn-primary {
  background-color: #3498db;
  color: #fff;
  width: 100%;
  margin-top: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
  background-color: #2980b9;
}

.btn-secondary {
  background-color: #95a5a6;
  color: #fff;
  width: 100%;
  margin-top: 1rem;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.btn-copy {
  background-color: #27ae60;
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.btn-copy:hover {
  background-color: #219a52;
}

.btn-copy.copied {
  background-color: #2ecc71;
}

/* エラーメッセージ */
.error-message {
  background-color: #fdecea;
  color: #c0392b;
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 1rem;
  font-size: 0.875rem;
}

/* 成功メッセージ */
.success-message {
  color: #27ae60;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

/* トークン表示 */
.token-display {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.token-display h3 {
  font-size: 1rem;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.token-hint {
  font-size: 0.875rem;
  color: #7f8c8d;
  margin-bottom: 0.5rem;
}

.token-hint code {
  background-color: #f8f9fa;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  color: #e74c3c;
}

.token-box {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 1rem;
  word-break: break-all;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
}

.token-box code {
  display: block;
  white-space: pre-wrap;
}

.token-display textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  resize: vertical;
  background-color: #f8f9fa;
}

/* トークン情報 */
.token-info {
  margin-bottom: 1rem;
}

.token-info h3 {
  font-size: 1rem;
  color: #2c3e50;
  margin-bottom: 0.75rem;
}

.token-info dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
}

.token-info dt {
  font-weight: 500;
  color: #7f8c8d;
}

.token-info dd {
  color: #2c3e50;
}

/* セクション区切り */
.section-divider {
  border: none;
  border-top: 1px solid #eee;
  margin: 1.5rem 0;
}

/* トークン詳細（折りたたみ） */
.token-details {
  margin-bottom: 1rem;
}

.token-details summary {
  cursor: pointer;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 4px;
  font-weight: 500;
  color: #2c3e50;
  user-select: none;
}

.token-details summary:hover {
  background-color: #e9ecef;
}

.token-details[open] summary {
  margin-bottom: 1rem;
  border-radius: 4px 4px 0 0;
}

.token-details h4 {
  font-size: 0.9rem;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

/* APIテストセクション */
.api-test-section {
  margin-bottom: 1.5rem;
}

.api-test-section h3 {
  font-size: 1.1rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-group-method {
  flex: 0 0 120px;
}

.form-group-path {
  flex: 1;
}

.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  background-color: #fff;
  cursor: pointer;
}

.form-group select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  resize: vertical;
}

.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* データヒント */
.data-hint {
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

/* JSONエディタ */
#json-editor {
  height: 200px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* JSONEditorのスタイル調整 */
.jsoneditor {
  border: none !important;
}

.jsoneditor-menu {
  background-color: #f8f9fa !important;
  border-bottom: 1px solid #ddd !important;
}

/* パス入力のプレフィックス付きスタイル */
.input-with-prefix {
  display: flex;
  align-items: stretch;
}

.input-prefix {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background-color: #e9ecef;
  border: 1px solid #ddd;
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  color: #6c757d;
}

.input-with-prefix input {
  border-radius: 0 4px 4px 0;
}

/* APIレスポンスセクション */
.api-response-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.api-response-section h3 {
  font-size: 1.1rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.response-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.response-status {
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.875rem;
}

.response-status.status-success {
  background-color: #d4edda;
  color: #155724;
}

.response-status.status-client-error {
  background-color: #fff3cd;
  color: #856404;
}

.response-status.status-server-error {
  background-color: #f8d7da;
  color: #721c24;
}

.response-status.status-info {
  background-color: #d1ecf1;
  color: #0c5460;
}

.response-time {
  font-size: 0.875rem;
  color: #6c757d;
}

/* タブ */
.response-tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 0;
}

.tab-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: #6c757d;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}

.tab-btn:hover {
  color: #3498db;
}

.tab-btn.active {
  color: #3498db;
  border-bottom-color: #3498db;
  font-weight: 500;
}

.tab-content {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 300px;
  overflow: auto;
}

.tab-content pre {
  margin: 0;
  padding: 1rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

footer {
  margin-top: 2rem;
  text-align: center;
  color: #95a5a6;
  font-size: 0.875rem;
}
