/* Batch Chat Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #4B9CD3 0%, #13294B 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 90px 20px 20px;
}

.container {
    width: 100%;
    max-width: 1400px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 90vh;
    max-height: 900px;
}

.header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 16px 16px 0 0;
}

.header h1 {
    font-size: 24px;
    color: #333;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.settings-btn, .nav-btn {
    background: #4B9CD3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.settings-btn:hover, .nav-btn:hover {
    background: #3A7BB0;
}

.nav-btn {
    background: #13294B;
}

.nav-btn:hover {
    background: #0d1d35;
}

.section {
    padding: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.section:last-child {
    border-bottom: none;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    color: #333;
}

.prompt-count, .progress-text, .stats-text {
    background: #e8f4f8;
    color: #13294B;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.upload-area {
    text-align: center;
}

.upload-box {
    border: 3px dashed #4B9CD3;
    border-radius: 12px;
    padding: 60px 40px;
    cursor: pointer;
    transition: all 0.3s;
    background: #f9f9f9;
}

.upload-box:hover {
    border-color: #3A7BB0;
    background: #f0f7fb;
}

.upload-box.drag-over {
    border-color: #13294B;
    background: #e8f4f8;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.upload-hint {
    font-size: 14px;
    color: #666;
}

.template-links {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px dashed #e0e0e0;
    text-align: center;
}

.template-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
}

.template-link {
    display: inline-block;
    margin: 0 10px;
    padding: 8px 16px;
    background: #f0f7fb;
    color: #4B9CD3;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid #4B9CD3;
}

.template-link:hover {
    background: #4B9CD3;
    color: white;
}

.file-info {
    margin-top: 20px;
    padding: 15px;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    color: #065f46;
}

.prompts-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
}

.prompt-item {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    transition: background 0.2s;
}

.prompt-item:last-child {
    border-bottom: none;
}

.prompt-item:hover {
    background: #f5f5f5;
}

.prompt-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.prompt-number {
    font-weight: 600;
    color: #4B9CD3;
    font-size: 14px;
}

.has-system-prompt {
    background: #e8f4f8;
    color: #13294B;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.prompt-text {
    color: #333;
    line-height: 1.6;
    word-wrap: break-word;
}

.section-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: #4B9CD3;
    color: white;
}

.btn-primary:hover {
    background: #3A7BB0;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4B9CD3 0%, #13294B 100%);
    transition: width 0.3s ease;
    width: 0%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.processing-controls {
    text-align: center;
    margin-bottom: 20px;
}

.results-container {
    max-height: 400px;
    overflow-y: auto;
}

.result-item {
    padding: 15px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    background: white;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.result-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.result-status.processing {
    background: #fef3c7;
    color: #92400e;
}

.result-status.completed {
    background: #d1fae5;
    color: #065f46;
}

.result-status.error {
    background: #fee2e2;
    color: #991b1b;
}

.result-prompt {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
    font-style: italic;
}

.result-response {
    color: #333;
    line-height: 1.6;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid #4B9CD3;
}

.results-summary {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #4B9CD3;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.detailed-results-container {
    max-height: 600px;
    overflow-y: auto;
}

.detailed-result-item {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    background: white;
}

.detailed-result-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.detailed-result-title {
    font-size: 16px;
    font-weight: 600;
    color: #4B9CD3;
    margin-bottom: 5px;
}

.detailed-result-label {
    font-weight: 600;
    color: #13294B;
    margin-top: 15px;
    margin-bottom: 5px;
}

.detailed-result-content {
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    line-height: 1.6;
    color: #333;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 22px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.form-group label.checkbox-inline-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label.checkbox-inline-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.form-group label.checkbox-inline-label span {
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s, opacity 0.3s, background-color 0.3s;
    font-family: inherit;
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    opacity: 0.5;
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4B9CD3;
}

.form-group small {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.status-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.status-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    display: block;
}

.status-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

/* Slider container styles */
.slider-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.slider-container input[type="range"] {
    flex: 1;
    padding: 0;
    height: 6px;
    border: none;
}

.slider-container input[type="number"] {
    width: 70px;
    padding: 6px 10px;
    text-align: center;
}

/* Info tooltip styles */
.info-tooltip {
    cursor: help;
    display: inline-block;
    background: #4B9CD3;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    text-align: center;
    font-size: 12px;
    line-height: 16px;
    margin-left: 5px;
}

.info-tooltip:hover {
    background: #3A7BB0;
}
