:root {
    /* 棕色、土黄色系的高级配色 */
    --primary-color: #8b4513; /* 深棕色 */
    --secondary-color: #cd853f; /* 秘鲁棕色 */
    --accent-color: #d2b48c; /* 棕褐色 */
    --bg-color: #f5f5f0; /* 淡米色背景 */
    --card-bg: #ffffff;
    --text-color: #4a3728; /* 深咖啡色文本 */
    --text-secondary: #7d6b5d; /* 中棕色次要文本 */
    --border-color: #e8e0d5; /* 浅棕色边框 */
    --shadow-color: rgba(100, 80, 60, 0.08); /* 棕色系阴影 */
    --alert-bg: #fff8dc; /* 玉米丝色背景 */
    --good-color: #5d8a60; /* 兼容绿色 */
    --partial-color: #d0a85c; /* 部分兼容橙色 */
    --bad-color: #b05c5c; /* 不兼容红色 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    background: linear-gradient(to bottom, #f5f5f0, #faf7f2); /* 淡米色到浅米黄渐变背景 */
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background-color: var(--secondary-color);
    border-radius: 1px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 20px;
}

.main-section, .weapon-section {
    background-color: #fffcf5;
    border-radius: 12px;
    box-shadow: 0 3px 8px var(--shadow-color);
    padding: 24px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    position: relative;
}

.main-section p {
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 600;
    margin: 0 0 20px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 1px;
}

/* 引用信息 */
.source-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: -10px;
    margin-bottom: 20px;
    text-align: center;
}

.source-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.source-info a:hover {
    opacity: 0.8;
    color: var(--secondary-color);
}

/* 警告框 */
.alert-box {
    background-color: var(--alert-bg);
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0;
    border-left: 4px solid var(--secondary-color);
}

.alert-content {
    font-weight: 500;
    line-height: 1.6;
}

.alert-content p {
    margin: 0; /* 移除段落默认边距，使上下间距一致 */
}

.alert-content strong {
    color: var(--primary-color);
}

/* 兼容性显示 */
.compat-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.compat-category {
    border-radius: 12px;
    padding: 18px;
    position: relative;
}

.good-compat {
    background-color: rgba(93, 138, 96, 0.1);
    border: 1px solid rgba(93, 138, 96, 0.3);
}

.partial-compat {
    background-color: rgba(208, 168, 92, 0.1);
    border: 1px solid rgba(208, 168, 92, 0.3);
}

.bad-compat {
    background-color: rgba(176, 92, 92, 0.1);
    border: 1px solid rgba(176, 92, 92, 0.3);
}

.compat-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.compat-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
    font-size: 18px;
    color: white;
}

.good-compat .compat-icon {
    background-color: var(--good-color);
}

.partial-compat .compat-icon {
    background-color: var(--partial-color);
}

.bad-compat .compat-icon {
    background-color: var(--bad-color);
}

.compat-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.weapon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.weapon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.weapon-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.weapon-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 8px;
    padding: 3px;
    background-color: rgba(255, 250, 240, 0.95);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.weapon-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

/* 推荐卡片 */
.recommendation {
    background-color: #fffcf5;
    border-radius: 12px;
    box-shadow: 0 3px 8px var(--shadow-color);
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center; /* 修改为center以确保垂直居中对齐 */
    gap: 12px;
}

.recommendation h3 {
    color: var(--primary-color);
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 1.1rem; /* 调整为与段落更协调的大小 */
    line-height: 1.5; /* 添加行高使文本垂直居中 */
}

.recommendation p {
    margin: 0;
    color: var(--text-color);
    flex: 1;
    line-height: 1.5; /* 添加与h3相同的行高 */
}

/* 页脚 */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    opacity: 0.8;
    color: var(--secondary-color);
}

.version {
    font-size: 0.8rem;
    margin-top: 8px;
    color: var(--text-secondary);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .weapon-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .main-section, .weapon-section, .recommendation {
        padding: 16px;
    }
    
    .weapon-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .weapon-icon {
        width: 32px;
        height: 32px;
    }
}

/* 添加全局装饰元素 */
.container:before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #8b4513, #deb887, #8b4513);
    z-index: 1000;
}

/* 技能详情与限制页面样式 */
.skill-details {
    background-color: #fffcf5;
    border-radius: 12px;
    box-shadow: 0 3px 8px var(--shadow-color);
    padding: 24px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.skill-description {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}

.skill-description h3, .invalid-moves h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.skill-description h3::after, .invalid-moves h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
    border-radius: 1px;
}

.moves-category {
    margin-bottom: 25px;
}

.moves-category h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.moves-list {
    list-style-type: none;
    padding-left: 10px;
}

.moves-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.moves-list li::before {
    content: '•';
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.weapon-moves {
    margin-top: 25px;
}

.weapon-moves-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.weapon-moves-item {
    background-color: rgba(255, 250, 240, 0.8);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid var(--border-color);
}

.weapon-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.weapon-icon-sm {
    width: 30px;
    height: 30px;
    object-fit: contain;
    background-color: rgba(255, 250, 240, 0.95);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.weapon-header h4 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .weapon-moves-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .skill-details {
        padding: 16px;
    }
    
    .weapon-moves-item {
        padding: 12px;
    }
    
    .weapon-icon-sm {
        width: 24px;
        height: 24px;
    }
    
    .weapon-header h4 {
        font-size: 1rem;
    }
    
    .moves-list li {
        font-size: 0.9rem;
    }
}
