body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f8f9fa;
    color: #333;
    max-width: 100%;
    font-size: 16px; /* 基础字体大小 */
}

/* 全局样式调整，确保内容不会超出容器 */
html {
    overflow-x: hidden; /* 防止水平滚动 */
    margin: 0;
    padding: 0;
}

/* 添加基本的响应式缩放 */
.protein-detail-container {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* 确保所有内容元素不会溢出 */
.protein-header, .action-buttons, .info-section, .info-section table, 
.info-section tr, .info-section td, img, a {
    max-width: 100%;
    box-sizing: border-box;
}

/* 长文本处理 */
p, h1, h2, h3, td, th, span, a {
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

/* 蛋白质标题部分 */
.protein-header {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.protein-header h1 {
    font-size: 2.2em;
    margin-bottom: 0.2em;
}

.protein-header .alphafold-id {
    display: inline-block;
    font-family: monospace;
    background-color: #f0f0f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 1em;
    color: #333;
    border: 1px solid #ddd;
}

/* 按钮容器样式 */
.button-container {
    flex: none; 
    margin: 0;
    padding: 0;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

/* Define styles for the download label */
.download-label {
    font-weight: bold;
    font-size: 1.1em;
    margin-right: 10px;
    white-space: nowrap;
}

.action-buttons a {
    text-decoration: none;
}

.action-buttons button {
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    color: #333;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-buttons button:hover {
    background-color: #e9e9e9;
    border-color: #ccc;
}

/* 信息部分样式 */
.info-section {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.info-section h2 {
    background-color: #f7f7f7;
    color: #333;
    margin: 0;
    padding: 15px 20px;
    font-size: 1.2em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.info-section h2:hover {
    background-color: #efefef;
}

.section-toggle-arrow {
    width: 12px;
    height: 12px;
    border: solid #333;
    border-width: 0 2px 2px 0;
    display: inline-block;
    transform: rotate(-135deg);
    transition: transform 0.3s ease;
}

.collapsible.collapsed .section-toggle-arrow {
    transform: rotate(45deg);
}

.info-section > div, .info-section > table {
    padding: 20px;
    background-color: #fff;
    display: block;
}

.info-section.collapsed > div, .info-section.collapsed > table {
    display: none;
}

.info-section table {
    border-collapse: collapse;
    width: 100%;
}

.info-section td {
    padding: 10px 15px;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.info-section tr:last-child td {
    border-bottom: none;
}

.info-section td:first-child {
    font-weight: bold;
    color: #555;
    width: 25%;
}

.info-section td:last-child {
    width: 75%;
}

.info-section a {
    color: #007bff;
    text-decoration: none;
}

.info-section a:hover {
    text-decoration: underline;
}

/* 3D Viewer Container on Detail Page */
.info-section > .full-width-viewer-container {
    padding: 0 !important;
    margin: 0;
    max-width: 100%;
}

.full-width-viewer-container #myViewer {
    position: relative;
    height: 800px;
    padding-bottom: 0;
    box-shadow: none;
    border-radius: 0;
    background-color: #fff;
}

/* Sequence Information Styles to override global table styles */
.sequence-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.sequence-item:last-child {
    border-bottom: none;
}

.sequence-wrapper {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    background: #fdfdfd;
    margin-top: 10px;
}

.sequence-wrapper table {
    width: 100%;
    border: none !important;
    margin-bottom: 0;
}

.sequence-wrapper td {
    border: none !important;
    padding: 2px 0 !important;
    vertical-align: top;
}

.sequence-wrapper tr:hover {
    background-color: transparent !important; /* Disable hover effect */
}

#summary-section h2 {
    border-bottom: none;
}

#summary-section table,
#summary-section td {
    border: none;
}

.seq-num {
    text-align: left;
    padding-right: 1em !important;
    color: #999;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.seq-data {
    font-family: 'Courier New', Courier, monospace;
    word-break: break-all;
    font-size: 1em;
    line-height: 1.5;
}