/* ====== 综合中医主题CSS ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'STKaiti', 'SimHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, #FFF3E0 0%, #E8F5E9 50%, #F3E5F5 100%);
    color: #5D4037;
    line-height: 1.6;
    min-height: 100vh;
    padding: 10px;
}

/* 阴阳五行动画 */
.yin-yang-container {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

.yin-yang {
    width: 40px;
    height: 40px;
    background: 
        radial-gradient(circle at 30% 50%, #000 8px, transparent 9px),
        radial-gradient(circle at 70% 50%, #fff 8px, transparent 9px),
        linear-gradient(to right, #fff 50%, #000 50%);
    border-radius: 50%;
    border: 1px solid #5D4037;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 经络流动 */
.meridian-flow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FF5722, #4CAF50, #2196F3, #9C27B0, transparent);
    animation: flow 15s linear infinite;
    z-index: 999;
}

@keyframes flow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 主容器 */
.game-container {
    max-width: 1000px;
    margin: 40px auto 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(93, 64, 55, 0.2);
    overflow: hidden;
    border: 3px solid #D7CCC8;
    position: relative;
    backdrop-filter: blur(5px);
}

.game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, 
        #FF5722 0%, #FF9800 20%, #4CAF50 40%, 
        #2196F3 60%, #9C27B0 80%, #5D4037 100%);
    z-index: 1;
}

/* 头部 */
.game-header {
    background: linear-gradient(135deg, #5D4037, #795548, #A1887F);
    color: white;
    padding: 30px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.game-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.1;
    z-index: 0;
}

.game-header h1 {
    font-size: 26px;
    margin: 15px 0 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
    letter-spacing: 1px;
}

.game-header .subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 8px;
    position: relative;
    z-index: 2;
    line-height: 1.4;
}

/* 十二经络指示器 */
.meridian-indicator {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 20px 0 10px;
    padding: 12px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    position: relative;
    z-index: 2;
}

.meridian-tag {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.3);
}

.meridian-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border-color: white;
}

/* 标签页系统 */
.tabs-container {
    position: relative;
    background: #F5F5F5;
}

.main-tabs {
    display: flex;
    background: linear-gradient(135deg, #F5F5F5, #EEEEEE);
    border-bottom: 3px solid #D7CCC8;
    position: relative;
    z-index: 10;
}

.main-tab {
    flex: 1;
    padding: 18px 12px;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-right: 1px solid #E0E0E0;
    position: relative;
    overflow: hidden;
    color: #795548;
}

.main-tab:last-child {
    border-right: none;
}

.main-tab.active {
    background: white;
    color: #5D4037;
    border-bottom: 3px solid #FF5722;
    box-shadow: 0 -3px 10px rgba(0,0,0,0.1);
}

.main-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,87,34,0.1), rgba(76,175,80,0.1));
    transform: translateY(100%);
    transition: transform 0.4s ease;
    z-index: -1;
}

.main-tab:hover::before {
    transform: translateY(0);
}

/* 二级标签页 */
.sub-tabs {
    display: none;
    background: #FAFAFA;
    border-bottom: 2px solid #D7CCC8;
    padding: 10px;
}

.sub-tabs.active {
    display: flex;
    animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.sub-tab {
    padding: 10px 16px;
    margin: 0 5px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 20px;
    background: #ECEFF1;
    color: #546E7A;
    transition: all 0.3s;
    border: 1px solid #CFD8DC;
}

.sub-tab:hover {
    background: #E0E0E0;
    transform: translateY(-2px);
}

.sub-tab.active {
    background: linear-gradient(135deg, #FF5722, #FF9800);
    color: white;
    border-color: #FF5722;
    box-shadow: 0 3px 8px rgba(255,87,34,0.3);
}

/* 内容区域 */
.content {
    padding: 30px;
    min-height: 600px;
    background: linear-gradient(135deg, #FFF8E1 0%, #FFF3E0 50%, #FFECB3 100%);
    position: relative;
}

.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255,152,0,0.1) 0%, transparent 50%),
               radial-gradient(circle at 80% 20%, rgba(76,175,80,0.1) 0%, transparent 50%);
    z-index: 0;
}

.tab-content {
    display: none;
    position: relative;
    z-index: 1;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 通用卡片样式 */
.tcm-card {
    background: white;
    border: 2px solid #FFCCBC;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(255,152,0,0.1);
}

.tcm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #FF5722, #FF9800);
}

.tcm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255,152,0,0.2);
    border-color: #FF9800;
}

.tcm-card-header {
    color: #D84315;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px dashed #FFCCBC;
    display: flex;
    align-items: center;
}

.tcm-card-header::before {
    content: '📌';
    margin-right: 10px;
    font-size: 20px;
}

/* 六经标签 */
.channel-tag {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 5px 5px 0;
    border-radius: 15px;
    font-size: 13px;
    font-weight: bold;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.taiyang { background: linear-gradient(135deg, #FF9800, #FF5722); }
.yangming { background: linear-gradient(135deg, #F44336, #D32F2F); }
.shaoyang { background: linear-gradient(135deg, #9C27B0, #7B1FA2); }
.taiyin { background: linear-gradient(135deg, #2196F3, #1976D2); }
.shaoyin { background: linear-gradient(135deg, #3F51B5, #303F9F); }
.jueyin { background: linear-gradient(135deg, #009688, #00796B); }

/* 按钮系统 */
.tcm-button {
    background: linear-gradient(135deg, #FF5722, #FF9800);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: inherit;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(255,87,34,0.3);
    position: relative;
    overflow: hidden;
}

.tcm-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.tcm-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255,87,34,0.4);
}

.tcm-button:hover::before {
    transform: translateX(100%);
}

.tcm-button:active {
    transform: translateY(1px);
}

.tcm-button.secondary {
    background: linear-gradient(135deg, #2196F3, #03A9F4);
    box-shadow: 0 5px 15px rgba(33,150,243,0.3);
}

.tcm-button.success {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    box-shadow: 0 5px 15px rgba(76,175,80,0.3);
}

.tcm-button.acupuncture {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    box-shadow: 0 5px 15px rgba(156,39,176,0.3);
}

/* 选项按钮 */
.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.option-button {
    background: #FFF3E0;
    border: 2px solid #FFCC80;
    padding: 15px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-size: 14px;
    color: #5D4037;
    position: relative;
    overflow: hidden;
}

.option-button:hover {
    background: #FFECB3;
    border-color: #FFA726;
    transform: translateY(-2px);
}

.option-button.selected {
    background: #FFE0B2;
    border-color: #FF9800;
    color: #D84315;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(255,152,0,0.2);
}

/* 诊断结果 */
.diagnosis-result {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border: 3px solid #81C784;
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    animation: pulse 2s infinite;
    position: relative;
    overflow: hidden;
}

@keyframes pulse {
    0%, 100% { border-color: #81C784; }
    50% { border-color: #4CAF50; }
}

.diagnosis-result::before {
    content: '🎯';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    opacity: 0.3;
}

.result-title {
    color: #2E7D32;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 2px solid #A5D6A7;
    padding-bottom: 10px;
}

.result-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin: 12px 0;
    border-left: 5px solid #4CAF50;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

/* 进度条 */
.progress-container {
    margin: 20px 0;
}

.progress-bar {
    height: 20px;
    background: #E0E0E0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF5722, #FF9800, #4CAF50);
    border-radius: 10px;
    transition: width 1s ease-in-out;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.3) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 消息系统 */
.tcm-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 18px 22px;
    border-radius: 12px;
    background: linear-gradient(135deg, #5D4037, #795548);
    color: white;
    box-shadow: 0 8px 25px rgba(93,64,55,0.3);
    z-index: 2000;
    animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 400px;
    border-left: 6px solid #FF5722;
    backdrop-filter: blur(10px);
}

@keyframes slideInRight {
    from { transform: translateX(100%) rotate(5deg); opacity: 0; }
    to { transform: translateX(0) rotate(0); opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .game-container {
        margin: 20px 10px;
    }
    
    .main-tab {
        padding: 15px 8px;
        font-size: 15px;
    }
    
    .option-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) {
    .game-header h1 {
        font-size: 22px;
    }
    
    .main-tabs {
        flex-wrap: wrap;
    }
    
    .main-tab {
        flex: 1 0 33.333%;
        padding: 12px 5px;
        font-size: 14px;
    }
    
    .sub-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .sub-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .content {
        padding: 20px;
    }
    
    .option-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tcm-button {
        padding: 10px 20px;
        font-size: 14px;
        margin: 5px;
    }
}

@media (max-width: 480px) {
    .game-header {
        padding: 20px 15px;
    }
    
    .game-header h1 {
        font-size: 20px;
    }
    
    .meridian-tag {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .main-tab {
        flex: 1 0 50%;
        padding: 10px 3px;
        font-size: 13px;
    }
    
    .option-grid {
        grid-template-columns: 1fr;
    }
    
    .tcm-card {
        padding: 15px;
    }
    
    .tcm-message {
        max-width: 90%;
        right: 5%;
        left: 5%;
    }
}

/* 动画定义 */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 87, 34, 0.5); }
    50% { box-shadow: 0 0 15px rgba(255, 87, 34, 0.8); }
}
