/* 第二页专属样式 - 古典中医风格 */
.herb-container {
    padding: 2rem;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><filter id="paper"><feTurbulence type="fractalNoise" baseFrequency="0.04" numOctaves="5"/><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.2 -0.1"/></filter><rect width="100" height="100" filter="url(%23paper)" fill="%23f5f0e1"/></svg>');
    border: 12px solid transparent;
    border-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M0,0 L100,0 L100,100 L0,100 Z" fill="none" stroke="%23a67c52" stroke-width="8" stroke-dasharray="15,10" stroke-linecap="round"/></svg>') 12;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-left: -15px;
    margin-bottom: 50px;
}

/* 药方表格容器 - 卷轴效果 */
.herb-table-container {
    border: 1px solid #8d6e63;
    border-radius: 0;
    background: linear-gradient(to bottom, #fff9f0, #f5e8d5);
    box-shadow: 
        0 2px 5px rgba(0,0,0,0.1),
        inset 0 0 30px rgba(166, 124, 82, 0.2);
    position: relative;
    overflow: hidden;
    margin-bottom: -17px;
}

/* 卷轴两侧装饰 */
.herb-table-container::before,
.herb-table-container::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="100" viewBox="0 0 30 100"><path d="M0,0 L30,0 L30,100 L0,100 Z" fill="%23795548"/><path d="M5,0 L5,100" stroke="%23d4a76a" stroke-width="2"/><path d="M10,0 L10,100" stroke="%23d4a76a" stroke-width="1"/><path d="M20,0 L20,100" stroke="%23d4a76a" stroke-width="1"/><path d="M25,0 L25,100" stroke="%23d4a76a" stroke-width="2"/></svg>');
    z-index: 1;
}
.herb-table-container::before { left: 0; }
.herb-table-container::after { 
    right: 0;
    transform: scaleX(-1);
}

/* 药方表格 */
.herb-scroll {
    width: calc(100% - 60px);
    margin: 0 30px;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
}

.herb-scroll th {
    background: linear-gradient(to bottom, #8d6e63, #6d4c41);
    color: #f5e8d5;
    padding: 1rem;
    font-size: 1.1rem;
    letter-spacing: 3px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    position: relative;
}

.herb-scroll th::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, #d4a76a, transparent);
}

.herb-scroll td {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(141, 110, 99, 0.3);
    text-align: center;
    color: #5d4037;
    transition: all 0.3s;
}

.herb-scroll tr:hover td {
    background: rgba(213, 176, 118, 0.1);
}

/* 分页样式 - 古书页码 */
.pagination-container {
    margin-top: 2rem;
    text-align: center;
}

.antique-pagination {
    display: inline-flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f5e8d5;
    border-radius: 0;
    border: 1px solid #8d6e63;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.page-number, .page-arrow {
    padding: 0.5rem 1rem;
    border: 1px solid #8d6e63;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 40px;
    text-align: center;
    font-family: 'Ma Shan Zheng', cursive;
    color: #5d4037;
}

.page-number:hover, .page-arrow:hover {
    background: #8d6e63;
    color: #f5e8d5;
}

.page-number.active {
    background: #6d4c41;
    color: #f5e8d5;
    border-color: #6d4c41;
}

/* 查看按钮 - 印章风格 */
.view-btn {
    padding: 0.3rem 1.2rem;
    background: linear-gradient(to bottom, #c72e2e, #8b0000);
    border: none;
    border-radius: 0;
    color: #f5e8d5;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Ma Shan Zheng', cursive;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.view-btn::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid #c72e2e;
    opacity: 0;
    transition: all 0.3s;
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.3);
}

.view-btn:hover::before {
    opacity: 0.3;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
}

/* 3D查看器容器 - 古典画框 */
.herb-viewer-container {
    position: fixed;
    top: 7%;
    right: 5%;
    width: 30vw;
    height: 81vh;
    z-index: 1000;
    background: #f5e8d5;
    border: 15px solid #6d4c41;
    box-shadow: 
        0 0 0 5px #d4a76a,
        15px 15px 30px rgba(0,0,0,0.3);
    padding: 10px;
}

.herb-viewer-container::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px dashed rgba(141, 110, 99, 0.5);
    pointer-events: none;
}

#modelContainer {
    width: 100%;
    height: 35%;
    background: #f8f6f0;
    border: 1px solid #8d6e63;
}

.model-info-panel {
    padding: 1rem;
    font-family: 'Ma Shan Zheng', cursive;
    color: #5d4037;
    border-top: 1px solid #8d6e63;
}

.herb-name {
    color: #8b0000;
    border-bottom: 1px solid #d4a76a;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 5px;
}

/* 图表容器 - 古典风格 */
.herb-charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
    background: #f5e8d5;
    padding: 20px;
    border: 1px solid #8d6e63;
    box-shadow: inset 0 0 20px rgba(141, 110, 99, 0.1);
}

.chart-container {
    height: 240px;
    position: relative;
    background: #fff9f0;
    border: 1px solid #8d6e63;
    padding: 15px;
}

/* 药材图片展示 */
.herb-image-container {
    width: 92%;
    height: 250px;
    border: 1px solid #8d6e63;
    border-radius: 0;
    padding: 15px;
    background: #fff9f0;
    box-shadow: inset 0 0 20px rgba(141, 110, 99, 0.1);
    margin-bottom: 20px;
    position: relative;
}

.herb-image-container::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px dashed rgba(141, 110, 99, 0.3);
    pointer-events: none;
}

.herb-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: sepia(0.3);
}

.image-caption {
    text-align: center;
    font-family: 'Ma Shan Zheng', cursive;
    color: #5d4037;
    margin-top: 10px;
    font-size: 1.2em;
    letter-spacing: 2px;
}
