* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.api-key-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

.api-key-section input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.api-key-section button {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.api-key-section button:hover {
    background: #2980b9;
}

.chat-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.message {
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 10px;
    max-width: 80%;
    word-wrap: break-word;
}

.message.user {
    background: #3498db;
    color: white;
    margin-left: auto;
}

.message.assistant {
    background: #ecf0f1;
    color: #2c3e50;
}

.message.batch-info {
    background: #f39c12;
    color: white;
    text-align: center;
    max-width: 100%;
    font-size: 12px;
    padding: 8px;
}

.message img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 10px 0;
}

.message pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.input-section {
    padding: 20px;
}

.input-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.input-controls label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.input-controls input[type="number"] {
    width: 80px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.scoring-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.scoring-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
}

.scoring-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.scoring-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.scoring-input-group label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.scoring-input-group input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.custom-values-section {
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

.custom-values-section label {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 14px;
}

.custom-values-section input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    margin-bottom: 5px;
}

.custom-values-section small {
    color: #6c757d;
    font-size: 12px;
}

.file-upload-section {
    margin-bottom: 15px;
}

.file-upload-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.file-upload-section input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #3498db;
    border-radius: 5px;
    background: #f8f9fa;
    cursor: pointer;
}

.image-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.image-preview-item {
    position: relative;
    display: inline-block;
}

.image-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #ddd;
}

.image-preview-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#messageInput {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 15px;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button-group button {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

#sendBtn {
    background: #27ae60;
    color: white;
}

#sendBtn:hover {
    background: #229954;
}

#sendBtn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

#clearBtn {
    background: #e74c3c;
    color: white;
}

#clearBtn:hover {
    background: #c0392b;
}

#exportBtn {
    background: #9b59b6;
    color: white;
}

#exportBtn:hover {
    background: #8e44ad;
}

#resetScoring {
    background: #34495e;
    color: white;
}

#resetScoring:hover {
    background: #2c3e50;
}

.status {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-size: 14px;
}

.status.processing {
    background: #f39c12;
    color: white;
}

.status.success {
    background: #27ae60;
    color: white;
}

.status.error {
    background: #e74c3c;
    color: white;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .input-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .scoring-controls {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group button {
        width: 100%;
    }
    
    .image-preview img {
        width: 80px;
        height: 80px;
    }
	
	.cke {
        margin-bottom: 10px;
    }
}