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

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

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

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.system-prompt-section {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

#systemPrompt {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
    min-height: 150px;
    font-size: 14px;
}

.tabs {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
}

.tab-button {
    flex: 1;
    padding: 15px;
    border: none;
    background: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
}

.tab-button:hover {
    background-color: #f5f5f5;
}

.tab-button.active {
    color: #3498db;
    border-bottom: 2px solid #3498db;
    margin-bottom: -2px;
    font-weight: 600;
}

.tab-content {
    display: none;
    padding: 20px;
    min-height: 500px;
}

.tab-content.active {
    display: block;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 10px;
}

.message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    max-width: 80%;
}

.message.user {
    background-color: #3498db;
    color: white;
    margin-left: auto;
    text-align: right;
}

.message.assistant {
    background-color: #e0e0e0;
    color: #333;
}

.message-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message-role {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 5px;
}

.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
}

.chat-input button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.chat-input button:hover {
    background-color: #2980b9;
}

.compare-container {
    display: flex;
    gap: 20px;
    height: 450px;
    margin-bottom: 10px;
}

.compare-column {
    flex: 1;
}

.compare-column h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.compare-column .chat-messages {
    height: 400px;
}

.controls {
    text-align: center;
}

.controls button {
    margin: 0 5px;
    padding: 8px 16px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.controls button:hover {
    background-color: #c0392b;
}

.loading {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.error {
    color: #e74c3c;
    padding: 10px;
    background-color: #ffe0e0;
    border-radius: 4px;
    margin-bottom: 10px;
}

.model-selector {
    background-color: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.model-selector h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.model-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.model-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.model-checkbox label {
    cursor: pointer;
    font-weight: normal;
}

.model-checkbox small {
    color: #666;
    margin-left: 5px;
}

#local-chats-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.local-chat-section {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
}

.local-chat-section h4 {
    margin-bottom: 10px;
    color: #3498db;
}

.compare-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.compare-column {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
}

/* 比較タブ無効化スタイル */
.tab-button.disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.tab-button.disabled:hover {
    background-color: #e0e0e0;
}

/* 負荷テストタブのスタイル */
.loadtest-settings {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.loadtest-settings h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.loadtest-settings .form-group {
    margin-bottom: 15px;
}

.loadtest-settings select {
    width: 200px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.primary-button {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 10px;
}

.primary-button:hover {
    background-color: #2980b9;
}

.secondary-button {
    background-color: #95a5a6;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

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

.loadtest-messages {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.message-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
}

.message-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.message-item input {
    flex: 1;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.loadtest-results {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 16px;
}

.stats span {
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    max-height: 600px;
    overflow-y: auto;
}

.result-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    background-color: #f9f9f9;
}

.result-item.success {
    border-color: #27ae60;
}

.result-item.error {
    border-color: #e74c3c;
}

.result-item.pending {
    border-color: #f39c12;
}

.result-header {
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.result-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 3px;
    color: white;
}

.result-status.success {
    background-color: #27ae60;
}

.result-status.error {
    background-color: #e74c3c;
}

.result-status.pending {
    background-color: #f39c12;
}

.result-message {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.result-response {
    font-size: 14px;
    line-height: 1.4;
}