/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.logo {
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.header-text {
    text-align: left;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 5px 0 0 0;
}

/* Main layout */
.main-content {
    display: flex;
    gap: 30px;
    height: calc(100vh - 200px);
}

/* Left Panel */
.left-panel {
    flex: 0 0 400px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.control-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
}

.control-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.control-section h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Information Units */
.info-units {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-column {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.info-column h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    padding: 0;
    background: none;
    border-radius: 0;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Fixed height for databases section to accommodate future additions */
.info-column:first-child .radio-group {
    max-height: 120px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Fixed height for generators and predictors sections */
.info-column:nth-child(2) .radio-group,
.info-column:nth-child(3) .radio-group {
    max-height: 120px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom scrollbar styling for all info columns */
.info-column:first-child .radio-group::-webkit-scrollbar,
.info-column:nth-child(2) .radio-group::-webkit-scrollbar,
.info-column:nth-child(3) .radio-group::-webkit-scrollbar {
    width: 6px;
}

.info-column:first-child .radio-group::-webkit-scrollbar-track,
.info-column:nth-child(2) .radio-group::-webkit-scrollbar-track,
.info-column:nth-child(3) .radio-group::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.info-column:first-child .radio-group::-webkit-scrollbar-thumb,
.info-column:nth-child(2) .radio-group::-webkit-scrollbar-thumb,
.info-column:nth-child(3) .radio-group::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.info-column:first-child .radio-group::-webkit-scrollbar-thumb:hover,
.info-column:nth-child(2) .radio-group::-webkit-scrollbar-thumb:hover,
.info-column:nth-child(3) .radio-group::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    min-width: 500px;
}

/* Feature container with horizontal scroll */
.feature-container {
    overflow-x: auto;
    padding-bottom: 10px;
}

.feature-container::-webkit-scrollbar {
    height: 8px;
}

.feature-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.feature-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.feature-container::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Feature subsection styling */
.feature-subsection {
    margin-bottom: 25px;
}

.feature-subsection h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    padding: 0;
    background: none;
    border-radius: 0;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.feature-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.feature-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

/* LLM Button */
.llm-btn {
    width: 100%;
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.llm-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4);
}

.beta-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
}

/* Right Panel */
.right-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.operating-area {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-message {
    text-align: center;
    color: #6c757d;
    position: relative;
    display: inline-block;
}

.welcome-logo {
    margin-bottom: 0;
    opacity: 0.8;
    display: block;
}

.welcome-message h2 {
    position: absolute;
    top: 90%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    color: #495057;
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    z-index: 10;
    white-space: nowrap;
}

.welcome-message p {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    z-index: 10;
    white-space: nowrap;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Feature View */
.feature-view {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 10px;
    margin: -30px -30px 0 -30px;
}

.feature-title-section {
    flex: 1;
}

.feature-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.3rem;
}

.feature-subtitle {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
    line-height: 1.3;
}

.close-feature {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-feature:hover {
    background: rgba(255, 255, 255, 0.2);
}

.process-section {
    flex: 1;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e9ecef;
    margin-top: 20px;
}

.process-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
    padding: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 5px;
    text-align: center;
}

.process-content {
    height: calc(100% - 60px);
}

.input-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.input-controls label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.input-controls input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 0.9rem;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    width: 0%;
    transition: width 2s ease;
}

.process-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.process-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* Log Terminal Styles */
.log-terminal {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin: 20px 0;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.log-header {
    background: #f8f9fa;
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
}

.log-clear-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background 0.3s ease;
}

.log-clear-btn:hover {
    background: #c82333;
}

.log-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    background: #ffffff;
}

.log-entry {
    padding: 2px 0;
    font-size: 0.85rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.log-time {
    color: #6c757d;
    font-weight: 600;
}

.log-message {
    margin-left: 8px;
    color: #495057;
}

.log-info .log-message {
    color: #0066cc;
}

.log-success .log-message {
    color: #28a745;
}

.log-warning .log-message {
    color: #856404;
}

.log-error .log-message {
    color: #dc3545;
}

.log-content::-webkit-scrollbar {
    width: 8px;
}

.log-content::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.log-content::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

.log-content::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

.output-display {
    margin-top: 20px;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.output-item {
    padding: 12px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 10px;
}

.output-item strong {
    color: #495057;
}

/* LLM Chat View */
.llm-view {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
    border-radius: 10px 10px 0 0;
    margin: -30px -30px 0 -30px;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.beta-badge-header {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-chat:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.message {
    margin-bottom: 15px;
    display: flex;
}

.bot-message .message-content {
    background: #e3f2fd;
    color: #1565c0;
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
    max-width: 80%;
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 12px 16px;
    border-radius: 18px 18px 4px 18px;
    max-width: 80%;
}

.system-message {
    justify-content: center;
    margin: 15px 0;
}

.system-message .message-content {
    background: linear-gradient(45deg, #fff3e0, #ffcc80);
    color: #e65100;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 90%;
    text-align: center;
    font-size: 0.9rem;
    border: 1px solid #ffb74d;
    box-shadow: 0 2px 8px rgba(255, 183, 77, 0.2);
}

.beta-icon {
    margin-right: 5px;
}

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

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 25px;
    font-size: 1rem;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    outline: none;
}

.chat-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.send-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        height: auto;
    }
    
    .left-panel {
        flex: none;
    }
    
    .info-units {
        flex-direction: column;
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(6, 1fr);
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-text {
        text-align: center;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .logo {
        width: 60px;
        height: 60px;
    }
}

/* Additional Feature Interface Styles */
.input-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.input-controls label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-weight: 500;
}

.input-controls input,
.input-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    transition: border-color 0.3s ease;
}

.input-controls input:focus,
.input-controls select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.input-controls input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.input-controls input[type="file"] {
    border: 2px dashed #ddd;
    padding: 15px;
    background: #f9f9f9;
    cursor: pointer;
}

.input-controls input[type="file"]:hover {
    border-color: #4CAF50;
    background: #f0f8f0;
}

/* Progress bar enhancements */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 2s ease-in-out;
    border-radius: 4px;
}

/* Enhanced output display */
.output-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.output-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.output-item:last-child {
    border-bottom: none;
}

.output-item strong {
    color: #495057;
    font-weight: 600;
}

.output-item span {
    color: #6c757d;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Feature-specific styling */
.feature-content {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

.feature-content::-webkit-scrollbar {
    width: 6px;
}

.feature-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.feature-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.feature-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Process button enhancements */
.process-btn {
    padding: 8px 16px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Enhanced close button */
.close-feature {
    background: #dc3545;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-feature:hover {
    background: #c82333;
    transform: scale(1.1);
}
