@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('libs/fonts/PlusJakartaSans.ttf') format('truetype');
    font-weight: 100 800;
    font-style: normal;
}

:root {
    --primary-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --bg-deep: #020617;
    --card-glass: rgba(30, 41, 59, 0.7);
    --border-glass: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Home Hero Positioning */
.home-hero-container {
    min-height: calc(100vh - 80px); /* 减去导航栏高度 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.home-hero-content {
    width: 100%;
    margin-top: -10vh; /* 视觉补偿，整体上移 */
}

/* Typing Effect Wrappers */
.typing-wrapper {
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.anim-typewriter-main {
    white-space: nowrap;
}

.anim-typewriter-sub {
    white-space: nowrap;
}

/* Search Box Drawing Animation */
.search-outline-svg {
    position: absolute;
    top: -2px; 
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    pointer-events: none;
    z-index: 5;
    transform: scaleX(-1); /* 水平镜像实现逆时针 */
    transform-origin: center;
}

.search-outline-rect {
    fill: none;
    stroke-width: 3px;
    stroke-dasharray: 1700;
    stroke-dashoffset: 0; /* 默认就是完整的框 */
    stroke-linecap: round;
    opacity: 0;
}

.anim-search-container, .stat-badge {
    opacity: 0; /* 初始隐藏 */
}

.anim-stats b {
    color: var(--accent-cyan);
}

/* Rest of existing styles... */
.data-section {
    min-height: 60dvh;
    display: flex;
    align-items: center;
    padding: 40px 0;
}

.data-section:first-of-type {
    min-height: 85dvh;
}

.data-section:last-of-type {
    margin-bottom: 20vh;
}

.page-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; background: radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 40%), radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.15) 0%, transparent 40%), var(--bg-deep); }

/* 导航栏 */
.navbar { backdrop-filter: blur(15px); background: rgba(15, 23, 42, 0.8); border-bottom: 1px solid var(--border-glass); padding: 0.6rem 0; position: sticky; top: 0; z-index: 1100; }
.navbar-brand { font-weight: 800; font-size: 1.5rem; color: #fff !important; }
.nav-link { color: #94a3b8 !important; font-weight: 600; margin: 0 1rem; transition: all 0.3s; position: relative; }
.nav-link:hover { color: #fff !important; transform: translateY(-2px); }
.nav-link.active { color: var(--primary-blue) !important; }
.nav-link.active::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 2px; background: var(--primary-blue); border-radius: 2px; }

/* 搜索框：彻底解决点击变白 */
.db-title { font-weight: 800; font-size: 4.5rem; letter-spacing: -2px; color: #fff; }
.main-search { 
    background: rgba(255, 255, 255, 0.05) !important; 
    border: 1px solid var(--border-glass) !important; 
    border-radius: 50px; 
    padding: 1.5rem 3rem; 
    font-size: 1.25rem; 
    color: white !important; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: none !important;
}
.main-search:focus { 
    background: rgba(255, 255, 255, 0.12) !important; 
    border-color: var(--primary-blue) !important; 
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.25) !important;
    outline: none !important;
}
.main-search::placeholder { color: rgba(255, 255, 255, 0.4) !important; }

/* 候选框 */
.search-results-popover {
    position: absolute;
    top: 110%; left: 0; right: 0;
    background: #1e293b;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 2000;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 400px;
    text-align: left;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    backdrop-filter: blur(20px);
}

.search-results-popover::-webkit-scrollbar {
    width: 8px;
}
.search-results-popover::-webkit-scrollbar-track {
    background: transparent;
}
.search-results-popover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
.search-results-popover::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Toast Styles */
.custom-toast {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    background: rgba(16, 185, 129, 0.95); /* Emerald Green for Success/Info */
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1rem 2rem;
    backdrop-filter: blur(12px);
    text-align: center;
    min-width: 280px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background 0.3s ease;
}

.custom-toast.error {
    background: rgba(239, 68, 68, 0.95); /* Red for Errors */
}

.custom-toast.success {
    background: rgba(16, 185, 129, 0.95);
}

.toast-enter-active {
    animation: toast-shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.toast-leave-active {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.toast-leave-to {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
}

@keyframes toast-shake {
  0% { transform: translateX(-50%) translateY(-20px); opacity: 0; }
  20% { transform: translateX(calc(-50% - 10px)) translateY(0); opacity: 1; }
  40% { transform: translateX(calc(-50% + 10px)) translateY(0); }
  60% { transform: translateX(calc(-50% - 5px)) translateY(0); }
  80% { transform: translateX(calc(-50% + 5px)) translateY(0); }
  100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.result-item {
    padding: 1.2rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s;
}
.result-item:hover, .result-item.active { background: rgba(59, 130, 246, 0.2); padding-left: 2.5rem; }

/* 卡片与通用组件 */
.glass-card { 
    background: var(--card-glass); 
    backdrop-filter: blur(20px); 
    border-radius: 32px; 
    border: 1px solid var(--border-glass); 
    padding: 2.5rem; 
    margin-bottom: 2rem; 
    transition: all 0.3s ease;
}
.glass-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.2); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }

/* Detail View Enhancements */
.detail-main-title { 
    font-size: 2.8rem; 
    font-weight: 800; 
    letter-spacing: -1.5px; 
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title { 
    font-size: 1.1rem; 
    font-weight: 800; 
    color: var(--primary-blue); 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    border-left: 4px solid var(--primary-blue); 
    padding-left: 16px; 
    margin-bottom: 2rem; 
}

.mol-canvas-container { background: rgba(0, 0, 0, 0.2); border-radius: 24px; width: 100%; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--border-glass); }
#mol-canvas { width: 95% !important; height: 95% !important; }

.info-label { 
    font-size: 0.8rem; 
    color: #94a3b8; 
    font-weight: 700; 
    text-transform: uppercase; 
    display: block; 
    margin-bottom: 6px; 
    letter-spacing: 1px;
}

.info-value { 
    font-size: 1.1rem; 
    font-weight: 600; 
    color: #ffffff; 
    display: block; 
    word-break: break-all; 
}

/* 灵动的 ID 样式：引入色彩 */
.info-value-id {
    font-family: 'Plus Jakarta Sans', sans-serif; /* 确保无衬线 */
    padding: 4px 12px;
    border-radius: 10px;
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 800;
}

.id-uniprot {
    color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
}

.id-intede {
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}

/* Table & List Consistency */
.table-dark thead th {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table-dark tbody td {
    font-size: 1.05rem;
    vertical-align: middle;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.id-badge-uniprot, .id-badge-intede, .badge-strategy {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.9rem !important;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.id-badge-uniprot {
    color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.id-badge-intede {
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* 序列容器：保持在右侧的精致感 */
.sequence-container {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.3);
    padding: 1.2rem;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    word-break: break-all;
    white-space: pre-wrap;
    letter-spacing: 0.5px;
    max-height: 400px;
    overflow-y: auto;
}
.sequence-container::-webkit-scrollbar { width: 6px; }
.sequence-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.stat-badge { 
    display: inline-block; 
    padding: 0.8rem 2rem; 
    background: rgba(255, 255, 255, 0.08); /* 提升背景可见度 */
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 100px; 
    margin: 0 0.8rem; 
    transition: all 0.3s; 
    cursor: default; 
    color: rgba(255, 255, 255, 0.9); /* 明确文字颜色 */
    font-weight: 600; 
    backdrop-filter: blur(5px);
}
.stat-badge:hover { 
    background: rgba(59, 130, 246, 0.15); 
    border-color: var(--primary-blue); 
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}
.stat-badge b { 
    color: var(--accent-cyan); 
    margin-left: 8px; 
    font-size: 1.2rem; /* 加大数字 */
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.4); /* 增加辉光 */
}

.stat-label { color: rgba(255, 255, 255, 0.7); font-weight: 600; }

.reference-content { color: rgba(255, 255, 255, 0.8); font-size: 0.95rem; }

/* Metabolism Flow Visualization */
.metabolism-flow-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 3rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 24px;
    border: 1px solid var(--border-glass);
    margin-bottom: 2.5rem;
}

.flow-node {
    min-width: 140px;
    max-width: 240px;
    width: auto;
    text-align: center;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    position: relative;
    z-index: 2;
    transition: all 0.3s;
    word-break: break-word;
}
.flow-node:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }

.node-label {
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 0.6rem;
    letter-spacing: 1px;
}

.node-name {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.2;
}

.flow-arrows {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0 10px;
}

.flow-arrow-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    padding: 0 15px;
}

.arrow-line {
    height: 3px;
    width: 100%;
    position: relative;
    margin: 5px 0;
}

.arrow-line::after {
    content: '';
    position: absolute;
    right: -2px;
    top: -5px;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 12px solid currentColor;
}

.arrow-initial {
    color: var(--primary-blue);
    background: var(--primary-blue);
    box-shadow: 0 0 15px var(--primary-blue);
}

.arrow-subsequent {
    color: var(--accent-cyan);
    background: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan);
}

.arrow-enzymes {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin-bottom: 12px;
    width: 100%;
}

.enzyme-tag {
    font-size: 0.75rem;
    background: rgba(59, 130, 246, 0.15);
    padding: 4px 12px;
    border-radius: 8px;
    color: #fff;
    white-space: nowrap;
    border: 1px solid rgba(59, 130, 246, 0.3);
    font-weight: 600;
    transition: all 0.2s;
}

.enzyme-tag.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.enzyme-tag.clickable:hover {
    background: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* 闪烁高亮动画 */
@keyframes highlight-flash {
    0% { 
        background: rgba(59, 130, 246, 0.1); 
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
        border-color: #3b82f6 !important;
    }
    30% { 
        background: rgba(59, 130, 246, 0.25); 
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
        border-color: #3b82f6 !important;
    }
    100% { 
        background: transparent; 
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.highlight-flash {
    animation: highlight-flash 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.arrow-enzymes.subsequent .enzyme-tag {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.3);
}

/* Help Module Styles */
.help-sidebar {
    position: sticky;
    top: 100px;
}

.help-nav-link {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s;
    margin-bottom: 5px;
    font-weight: 600;
}

.help-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.help-nav-link.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.help-section {
    padding-bottom: 4rem;
    margin-bottom: 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.help-section:last-child {
    border-bottom: none;
}

.help-title {
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.5rem;
}

.help-subtitle {
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-text {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.help-step-list {
    list-style: none;
    padding: 0;
}

.help-step-item {
    display: flex;
    gap: 20px;
    margin-bottom: 1.5rem;
}

.help-step-number {
    width: 32px;
    height: 32px;
    background: var(--primary-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    font-size: 0.85rem;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.help-img-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.help-img-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.2);
    font-weight: 700;
    font-style: italic;
    border-radius: 8px;
}

.code-inline {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
    font-family: monospace;
    color: var(--accent-cyan);
}

.citation-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
}

.btn-action { transition: all 0.3s; border-radius: 12px; font-weight: 600; }
.btn-action:hover { transform: scale(1.05); }
 / *   S o r t a b l e   T a b l e   H e a d e r s   * / 
 . c l i c k a b l e - h e a d e r   { 
         c u r s o r :   p o i n t e r ; 
         t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s ; 
         u s e r - s e l e c t :   n o n e ; 
         p o s i t i o n :   r e l a t i v e ; 
 } 
 . c l i c k a b l e - h e a d e r : h o v e r   { 
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 )   ! i m p o r t a n t ; 
 } 
 . s o r t - i c o n   { 
         f o n t - s i z e :   0 . 8 r e m ; 
         m a r g i n - l e f t :   4 p x ; 
         o p a c i t y :   0 . 6 ; 
         d i s p l a y :   i n l i n e - b l o c k ; 
         t r a n s i t i o n :   t r a n s f o r m   0 . 2 s ; 
         c o l o r :   v a r ( - - p r i m a r y - b l u e ) ; 
 } 
 . c l i c k a b l e - h e a d e r : h o v e r   . s o r t - i c o n   { 
         o p a c i t y :   1 ; 
 } 
  
 
/* Download Center Styles */
.download-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.download-card:hover {
    transform: translateY(-12px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
}

.download-icon-wrapper {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
}

.download-card:hover .download-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.download-card .btn-primary:hover {
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
}

.download-card .btn-info:hover {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.5);
}
