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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    background: white;
    padding: 12px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.1em;
    color: #333;
    font-weight: 600;
}

.header a {
    color: #667eea;
    text-decoration: none;
}

.header a:hover {
    text-decoration: underline;
}

.main-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 0;
    flex: 1;
    overflow: hidden;
    padding: 15px;
}

.chat-panel {
    background: white;
    border-radius: 15px 0 0 15px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 2px solid #f0f0f0;
    background: #f8f9fa;
}

.chat-header h2 {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 10px;
}

.model-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.model-selector label {
    font-size: 0.85em;
    color: #666;
    font-weight: 600;
}

.model-selector select {
    flex: 1;
    padding: 6px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.8em;
    background: white;
    cursor: pointer;
    color: #333;
}

.model-selector select:focus {
    outline: none;
    border-color: #667eea;
}

.model-info {
    font-size: 0.75em;
    color: #999;
    margin-top: 5px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    margin-bottom: 15px;
}

.message.user {
    text-align: right;
}

.message-content {
    display: inline-block;
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 10px;
    word-wrap: break-word;
}

.message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.protein-boxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.protein-box {
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9em;
}

.protein-box:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

.protein-box strong {
    display: block;
    margin-bottom: 3px;
}

.chat-input-area {
    padding: 15px 20px;
    border-top: 2px solid #f0f0f0;
    background: #f8f9fa;
}

.chat-input-area textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 60px;
}

.chat-input-area textarea:focus {
    outline: none;
    border-color: #667eea;
}

.chat-input-area button {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.chat-input-area button:hover {
    opacity: 0.9;
}

.chat-input-area button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.viewer-panel {
    background: white;
    border-radius: 0 15px 15px 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.viewer-tabs {
    display: flex;
    gap: 0;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.viewer-tab {
    flex: 1;
    padding: 12px 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.2s;
    color: #666;
    border-bottom: 3px solid transparent;
}

.viewer-tab:hover {
    color: #667eea;
    background: rgba(102,126,234,0.05);
}

.viewer-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

.viewer-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-pane {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
}

.tab-pane.active {
    display: flex;
}

.visualization-container {
    flex: 1;
    background: #000;
    position: relative;
    overflow: hidden;
}

#protein-viewer, #protein-viewer-ngl, #protein-viewer-simple {
    width: 100%;
    height: 100%;
}

.viewer-controls {
    padding: 12px 15px;
    background: #f8f9fa;
    border-top: 2px solid #e0e0e0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.control-btn {
    padding: 6px 12px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s;
    font-weight: 500;
}

.control-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.control-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.explanation-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.explanation-container h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.explanation-container h4 {
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1em;
}

.explanation-container p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 12px;
}

.explanation-container ul {
    margin-left: 20px;
    color: #666;
    line-height: 1.8;
}

.explanation-container li {
    margin-bottom: 8px;
}

.info-box {
    background: #f0f7ff;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
}

.info-box h4 {
    color: #667eea;
    margin-top: 0;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer {
    background: white;
    padding: 10px 20px;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.footer p {
    color: #666;
    font-size: 0.85em;
}

.footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

.welcome-message {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

.welcome-message h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.no-results-message {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.no-results-message p {
    margin: 0 0 10px 0;
    color: #856404;
}

.deep-search-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    margin-top: 5px;
}

.deep-search-btn:hover {
    opacity: 0.9;
}

.deep-search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.deep-search-mode {
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
}

.deep-search-mode p {
    margin: 0 0 5px 0;
    color: #1976d2;
    font-weight: 600;
    font-size: 0.9em;
}

.question-input-area {
    margin-top: 10px;
}

.question-input-area input {
    width: 100%;
    padding: 10px;
    border: 2px solid #2196F3;
    border-radius: 6px;
    font-size: 0.9em;
}

.question-input-area button {
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
}

.show-all-btn {
    background: #9e9e9e !important;
    margin-top: 5px;
}

.protein-qa-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.qa-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.qa-message {
    margin-bottom: 20px;
}

.qa-message.user-qa {
    text-align: right;
}

.qa-message-content {
    display: inline-block;
    max-width: 90%;
    padding: 12px 16px;
    border-radius: 10px;
}

.qa-message.user-qa .qa-message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.qa-message.bot-qa .qa-message-content {
    background: #f8f9fa;
    color: #333;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.qa-message-content h4 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #667eea;
}

.qa-message.bot-qa .qa-message-content h4 {
    color: #667eea;
}

.qa-highlight-box {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 12px;
    margin: 12px 0;
    border-radius: 4px;
}

.qa-warning-box {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 12px;
    margin: 12px 0;
    border-radius: 4px;
}

.qa-info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 12px;
    margin: 12px 0;
    border-radius: 4px;
}

.qa-message-content ul {
    margin: 10px 0 10px 20px;
}

.qa-message-content li {
    margin: 5px 0;
}

.qa-input-area {
    padding: 15px;
    border-top: 2px solid #e0e0e0;
    background: #f8f9fa;
}

.qa-input-area input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.qa-input-area button {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
        grid-template-rows: 400px 1fr;
    }
    
    .chat-panel {
        border-radius: 15px 15px 0 0;
    }
    
    .viewer-panel {
        border-radius: 0 0 15px 15px;
    }
} 


/* Q&A Response Boxes */
/* Q&A Response Boxes - Softer Colors */
.qa-key-box {
    background: linear-gradient(135deg, #e8eaf6 0%, #f3e5f5 100%);
    color: #4a148c;
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 8px;
    border-left: 4px solid #7c4dff;
    box-shadow: 0 2px 8px rgba(124, 77, 255, 0.15);
}

.qa-mechanism-box {
    background: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 100%);
    color: #880e4f;
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 8px;
    border-left: 4px solid #e91e63;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.15);
}

.qa-clinical-box {
    background: linear-gradient(135deg, #e1f5fe 0%, #e0f7fa 100%);
    color: #006064;
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 8px;
    border-left: 4px solid #00bcd4;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.15);
}

.qa-warning-box {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 8px;
    border-left: 4px solid #ff9800;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15);
    font-weight: 500;
}

.qa-tip-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    color: #1b5e20;
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

/* Keep existing boxes if you have them */
.qa-highlight-box {
    background: #e8f5e9;
    color: #1b5e20;
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
}

.qa-info-box {
    background: #e3f2fd;
    color: #01579b;
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

