:root {
    --primary-color: #0071e3;
    --hover-color: #0077ed;
    --background-color: #ffffff;
    --text-color: #1d1d1f;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.47059;
    letter-spacing: -0.022em;
}

h1 {
    text-align: center;
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 40px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

h1::before,
h1::after {
    content: "";
    height: 2px;
    width: 60px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

/* UI 容器样式 */
#ui-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 20px;
}

/* 描述板样式 */
#description-board {
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: var(--border-radius);
    padding: 24px;
    margin: 20px 0;
    font-size: 17px;
    line-height: 1.5;
    backdrop-filter: blur(20px);
    border: none;
}

/* 搜索和过滤区域 */
#search-filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px 0;
    align-items: center;
    justify-content: center;
}

/* 输入框通用样式 */
input, select {
    background-color: rgba(0, 0, 0, 0.04);
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 16px;
    font-size: 15px;
    transition: var(--transition);
    outline: none;
    -webkit-appearance: none;
}

input:focus, select:focus {
    background-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

#search {
    width: 100%;
    max-width: 600px;
    margin: 0;
}

/* 分类标签样式 */
.section-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
}

.section-tab {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

/* 为不同section设置颜色 */
.section-tab {
    color: white;
    border: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.section-tab.All_photosensitizer { 
    background: linear-gradient(145deg, #2c3e50, #34495e);
}

.section-tab.Absorption { 
    background: linear-gradient(145deg, #1a2a3a, #223444);
}

.section-tab.Emission { 
    background: linear-gradient(145deg, #2c3c4c, #364856);
}

.section-tab.HUMO-LUMO_gap { 
    background: linear-gradient(145deg, #445565, #4f606f);
}

.section-tab.Singlet_oxygen_generation_efficiency { 
    background: linear-gradient(145deg, #536b7b, #5f7888);
}

.section-tab.Fluorescence_energy { 
    background: linear-gradient(145deg, #627d8f, #6e8a9c);
}

/* 悬停效果 */
.section-tab:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* 激活状态 */
.section-tab.active {
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        inset 0 -2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(1px);
    filter: brightness(1.1);
}

.search-container {
    background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,255,255,0.8));
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* 按钮样式 */
button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

button:hover {
    background-color: var(--hover-color);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* 数据项容器 */
#dataset-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

/* 数据项卡片 */
.data-item {
    background-color: #fff;
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    word-break: break-all;
}

/* 添加数据项内部文本样式 */
.data-item p {
    margin: 8px 0;
    font-size: 14px; 
    line-height: 1.4;
}

.data-item strong {
    color: #1d1d1f;
    font-weight: 500;
    margin-right: 8px;
}

.data-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.data-item img {
    border-radius: 8px;
    margin-top: 16px;
}

/* Ketcher 容器样式 */
#ketcher-container {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin: 20px 0;
    overflow: hidden;
}

/* 数值输入框和选择器样式 */
#minTarget, #maxTarget, #solventSelector {
    width: 120px;
    margin: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #search-filter-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    input, select, button {
        width: 100%;
    }
    
    h1 {
        font-size: 32px;
    }
}

/* 子结构标签样式 */
.substructure-tabs {
    display: flex;
    flex-wrap: nowrap; /* 从wrap改为nowrap，防止换行 */
    gap: 8px; /* 减小间距 */
    margin: 15px 0 25px 0;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    overflow-x: auto; /* 添加水平滚动，以防在小屏幕上显示不完 */
    padding-bottom: 5px; /* 为滚动条留出一些空间 */
    scrollbar-width: thin; /* 为Firefox设置较细的滚动条 */
  }
  
/* 隐藏webkit浏览器的滚动条但保持功能 */
.substructure-tabs::-webkit-scrollbar {
    height: 4px;
  }
  
  .substructure-tabs::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
  }
  
  /* 调整标签本身的大小 */
  .substructure-tab {
    background: linear-gradient(145deg, #3a6073, #3a7bd5);
    font-size: 12px; /* 减小字体 */
    padding: 6px 10px; /* 减小内边距 */
    white-space: nowrap; /* 防止文本换行 */
    flex-shrink: 0; /* 防止标签被压缩 */
  }
  
  .substructure-tab {
    background: linear-gradient(145deg, #3a6073, #3a7bd5);
    font-size: 13px;
    padding: 6px 14px;
  }
  
  .substructure-tab:hover {
    background: linear-gradient(145deg, #447bbb, #4a8de0);
  }
  
  .substructure-tab.active {
    background: linear-gradient(145deg, #45b649, #6fc16f);
  }
  
  /* 为每个子结构设置不同颜色 */
  .substructure-tab.perylenequinone {
    background: linear-gradient(145deg, #8e44ad, #9b59b6);
  }
  
  .substructure-tab.porphyrin {
    background: linear-gradient(145deg, #c0392b, #e74c3c);
  }
  
  .substructure-tab.pheophytin {
    background: linear-gradient(145deg, #d35400, #e67e22);
  }
  
  .substructure-tab.phenothiazine {
    background: linear-gradient(145deg, #27ae60, #2ecc71);
  }
  
  .substructure-tab.BODIPY {
    background: linear-gradient(145deg, #2980b9, #3498db);
  }
  
  .substructure-tab.phthalocyanine {
    background: linear-gradient(145deg, #16a085, #1abc9c);
  }
  
  .substructure-tab.xanthene {
    background: linear-gradient(145deg, #f39c12, #f1c40f);
  }
  
  .substructure-tab.cyanine {
    background: linear-gradient(145deg, #8e44ad, #9b59b6);
  }
  
  /* 样式化SMILES代码 */
  code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    word-break: break-all;
  }