/*
优化后的CSS样式
*/

:root {
    --color-primary: #2c3e50;     
    --color-secondary: #c0392b;   
    --color-accent: #3498db;      
    --color-accent-light: #add8e6;
    --color-text: #2d3436;        
    --color-text-light: #636e72;
    --color-background: #f8f9fa;
    --color-card-bg: #ffffff;
    --color-yin: #34495e;
    --color-yang: #e74c3c;
    --color-wood: #27ae60;
    --color-fire: #e67e22;
    --color-earth: #f1c40f;
    --color-metal: #95a5a6;
    --color-water: #3498db;
    --gradient-primary: linear-gradient(135deg, #654ea3, #e16a93);
    --gradient-secondary: linear-gradient(135deg, #3b8d99, #6b6b83);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --border-radius: 0.5rem;
    --transition-normal: all 0.3s ease;
}

body {
    font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-self;
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.5;
    padding: 0;
    margin: 0;
    scroll-behavior: smooth;
}

.reveal {
    font-size: clamp(18px, 3.5vmin, 24px);
}

.reveal h1, 
.reveal h2, 
.reveal h3, 
.reveal h4,
h1, h2, h3, h4 {
    font-family: 'Noto Serif SC', serif;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 0.4em;
    text-transform: none;
    line-height: 1.2;
}

h1, .reveal h1 {
    font-size: clamp(2rem, 6.5vmin, 3.2rem);
    margin-bottom: 0.5em;
}

h2, .reveal h2 {
    font-size: clamp(1.5rem, 4.5vmin, 2.2rem);
    margin-bottom: 0.5em;
}

h3, .reveal h3 {
    font-size: clamp(1.1rem, 3.5vmin, 1.6rem);
    margin-bottom: 0.4em;
}

h4, .reveal h4 {
    margin-bottom: 0.3em;
    color: var(--color-secondary);
    font-size: clamp(0.9rem, 3vmin, 1.3rem);
}

p, li, .reveal p, .reveal li {
    line-height: 1.5;
    margin-bottom: 0.6em;
}

.reveal .slides {
    text-align: left;
}

.reveal .slides section {
    padding: 1.2rem;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    max-height: none;
}

.cover {
    text-align: center;
    background-image: var(--gradient-primary);
    color: white;
}

.cover h1, .cover h2, .cover h3 {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cover-overlay {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(5px);
    box-shadow: var(--shadow-md);
}

.section-title {
    text-align: center;
    background-image: var(--gradient-secondary);
    color: white;
}

.section-title h2 {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.section-title-header {
    text-align: center;
    background-image: var(--gradient-secondary);
    color: white;
    padding: 3rem 1rem;
    margin: 4rem 0 2rem 0;
    position: relative;
}

.section-title-header::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to top right, transparent 49%, var(--gradient-secondary) 50%);
}

.section-title-header h2 {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 0;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 1.5rem;
    margin-bottom: 2rem;
}

.highlight {
    color: var(--color-secondary);
    font-weight: 500;
}

.box {
    background-color: var(--color-card-bg);
    border-radius: var(--border-radius);
    padding: 1.2rem 1.5rem;
    margin: 1.5rem 0;
    border-left: 3px solid var(--color-accent);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.box:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.box-yin {
    border-left-color: var(--color-yin);
}

.box-yang {
    border-left-color: var(--color-yang);
}

.box-wood {
    border-left-color: var(--color-wood);
}

.box-fire {
    border-left-color: var(--color-fire);
}

.box-earth {
    border-left-color: var(--color-earth);
}

.box-metal {
    border-left-color: var(--color-metal);
}

.box-water {
    border-left-color: var(--color-water);
}

.icon-title {
    display: flex;
    align-items: center;
}

.icon-title i {
    margin-right: 0.6rem;
    color: var(--color-accent);
    font-size: 1.1em;
}

img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin: 1.5rem 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img:hover {
    box-shadow: var(--shadow-md);
    transform: scale(1.02);
}

.quote {
    font-style: italic;
    border-left: 3px solid var(--color-accent);
    padding: 1.2rem 1.5rem;
    margin: 2rem 0;
    font-family: 'Noto Serif SC', serif;
    color: var(--color-text-light);
    background-color: rgba(52, 152, 219, 0.05);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.badge {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    background-color: var(--color-accent-light);
    color: var(--color-primary);
    border-radius: 20px;
    font-size: 0.8em;
    margin-right: 0.5rem;
}

.badge-primary {
    background-color: rgba(192, 57, 43, 0.1);
    color: var(--color-secondary);
}

.badge-secondary {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--color-accent);
}

.badge-accent {
    background-color: rgba(241, 196, 15, 0.1);
    color: var(--color-earth);
}

.card {
    background-color: var(--color-card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
}

.card-body {
    flex: 1;
}

.card-footer {
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 0.8rem;
    margin-top: auto;
}

/* 优化治疗方法卡片 */
.tcm-vs-western .box {
    padding: 1rem 1.2rem;
}

.tcm-vs-western h4 {
    font-size: 1.1rem;
    margin-bottom: 0.7em;
}

.tcm-vs-western p {
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 0.7em;
}

.tcm-vs-western ul {
    margin: 0.8rem 0;
    padding-left: 1.2rem;
}

.tcm-vs-western li {
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

/* 内容容器添加最大宽度防止过宽 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 1.5rem;
}

/* 页面区域样式 */
.page-section {
    padding: 4rem 0;
    min-height: auto;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.cover-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: var(--gradient-primary);
    background-size: 200% 200%;
    animation: gradientBackground 15s ease infinite;
    color: white;
    padding: 0;
    overflow: hidden;
    position: relative;
}

@keyframes gradientBackground {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.cover-overlay {
    background-color: rgba(0, 0, 0, 0.2);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
    backdrop-filter: blur(3px);
    border-radius: 0;
}

/* 调整其他封面区域元素 */
.cover-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 20%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}

.cover-section .cover-overlay {
    position: relative;
    z-index: 2;
}

/* 最后一页与首页风格统一 */
#lastPage .cover-overlay {
    background-color: rgba(0, 0, 0, 0.2);
    width: 100%;
    height: 100%;
}

#lastPage h1, #lastPage h3 {
    color: white;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#lastPage .yin-yang-symbol i {
    font-size: clamp(8rem, 20vh, 15rem);
    color: white; 
    animation: rotate 12s linear infinite;
}

/* 添加动画类 */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in-up {
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from { 
        opacity: 0;
        transform: translateY(40px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from { 
        opacity: 0;
        transform: translateX(-40px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

/* 颜色文本类 */
.wood-text { color: var(--color-wood); }
.fire-text { color: var(--color-fire); }
.earth-text { color: var(--color-earth); }
.metal-text { color: var(--color-metal); }
.water-text { color: var(--color-water); }

/* 适应性布局 */
@media (max-width: 992px) {
    .page-section {
        padding: 3rem 0;
    }
    
    .section-title-header {
        padding: 2.5rem 1rem;
        margin: 3rem 0 1.5rem 0;
    }
    
    .card, .box {
        padding: 1.2rem;
    }
}

@media (max-width: 768px) {
    .two-column {
        grid-template-columns: 1fr;
        grid-gap: 1.2rem;
    }
    
    .page-section {
        padding: 2.5rem 0;
    }
    
    .box {
        padding: 1rem 1.2rem;
        margin: 1rem 0;
    }
    
    .quote {
        padding: 1rem 1.2rem;
        margin: 1.5rem 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .page-section {
        padding: 2rem 0;
    }
    
    .section-title-header {
        padding: 2rem 0.8rem;
        margin: 2rem 0 1rem 0;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    p, li {
        font-size: 15px;
    }
    
    .card, .box {
        padding: 0.8rem 1rem;
    }
}

@media (max-height: 700px) {
    .reveal {
        font-size: clamp(14px, 2.8vmin, 18px);
    }
    
    .box {
        padding: 0.8rem 1rem;
        margin: 0.8rem 0;
    }
    
    .page-section {
        padding: 2rem 0;
    }
}

/* 封面区域样式优化 */
#home > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    padding: 2rem;
    box-sizing: border-box;
}

#home h1 {
    font-size: clamp(3.5rem, 8vw, 5rem);
    color: white;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

#home h3 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: white;
    text-shadow: 0 3px 6px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
}

#home p {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
}

#home .yin-yang-symbol {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 30vh;
    margin: 2rem 0;
    position: relative;
}

#home .yin-yang-symbol i {
    font-size: clamp(8rem, 20vh, 15rem);
    color: white;
    animation: rotate 12s linear infinite;
    display: block;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

@keyframes rotate {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* 横屏模式优化 */
@media (orientation: landscape) {
    #home > div {
        padding: 1rem 4rem;
    }
    
    #home .yin-yang-symbol {
        height: 40vh;
    }
    
    #home .yin-yang-symbol i {
        font-size: clamp(10rem, 30vh, 20rem);
    }
}
