/* 基础样式重置和全局设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* 头部样式 */
header {
    background-color: #ffffff;
    background-image: linear-gradient(135deg, #ffffff 0%, #f0f2f5 100%);
    color: #333;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
    border-bottom: 2px solid #e0e0e0;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    color: #4a6fa5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 导航样式 */
nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
}

nav ul li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}

nav ul li a:hover {
    color: #4a6fa5;
    background-color: #f0f2f5;
    border-color: #4a6fa5;
}

/* 主要内容区域 */
main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* 区块样式 */
section {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

section:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

/* 折叠区块标题样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    color: #4a6fa5;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
    flex: 1;
}

/* 折叠按钮样式 */
.toggle-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a6fa5;
    font-size: 1.2rem;
    margin-left: 1rem;
}

.toggle-btn:hover {
    background-color: #f0f2f5;
    transform: scale(1.1);
}

.toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.2);
}

.toggle-icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

/* 数据容器 */
.data-container {
    margin-top: 1.5rem;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

table th {
    background-color: #f0f2f5;
    color: #4a6fa5;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid #f0f2f5;
    color: #333;
}

table tr {
    transition: background-color 0.3s ease;
}

table tr:hover {
    background-color: #f8f9fa;
}

table tr:last-child td {
    border-bottom: none;
}

/* 底部样式 */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #ffffff;
    color: #666;
    position: fixed;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    font-size: 0.9rem;
    border-top: 1px solid #e0e0e0;
}

/* 天赋选择器样式 */
#talents .talent-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.selector-group {
    flex: 1;
    min-width: 220px;
}

.selector-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #4a6fa5;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.selector-group select {
    width: 100%;
    padding: 0.75rem;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #333;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.selector-group select:focus {
    outline: none;
    border-color: #4a6fa5;
    box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.2);
}

/* 按钮样式 */
#fetch-talent-btn {
    align-self: flex-end;
    padding: 0.75rem 2rem;
    background-color: #4a6fa5;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 111, 165, 0.3);
}

#fetch-talent-btn:hover {
    background-color: #3a5a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 111, 165, 0.4);
}

#fetch-talent-btn:active {
    transform: translateY(0);
}

/* 天赋结果样式 */
.talent-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.talent-result h3 {
    color: #4a6fa5;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

#talent-link a {
    color: #2196f3;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

#talent-link a:hover {
    color: #1976d2;
    text-decoration: underline;
}

/* 专精属性数据样式 */
.spec-stats {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: none; /* 默认隐藏 */
}

.spec-stats h3 {
    color: #4a6fa5;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-item {
    padding: 1rem;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: #4a6fa5;
}

.stat-label {
    display: block;
    font-weight: 600;
    color: #4a6fa5;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item span:last-child {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

/* 选项卡样式 */
.spec-options {
    margin-top: 2rem;
}

.option-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: #666;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.tab-btn:hover {
    color: #4a6fa5;
    background-color: #e8ebf0;
}

.tab-btn.active {
    background-color: #4a6fa5;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(74, 111, 165, 0.3);
}

.tab-content {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.hidden {
    display: none;
}

/* 选项卡内容样式 */
.tab-content ul {
    list-style-type: none;
    padding: 0;
}

.tab-content li {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tab-content li:hover {
    background-color: #f0f2f5;
    border-color: #4a6fa5;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* 天赋详情样式 */
#talent-content {
    line-height: 1.8;
    color: #333;
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* 装备图片样式 */
.item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
}

.item-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* 团队副本和装备卡片样式 */
.raid-list, .item-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.raid-card, .item-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.raid-card:hover, .item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    border-color: #4a6fa5;
}

.raid-card h3, .item-card h3 {
    color: #4a6fa5;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
}

.raid-card p, .item-card p {
    margin-bottom: 0.75rem;
    color: #666;
    font-size: 0.95rem;
    flex: 1;
}

.raid-card p strong, .item-card p strong {
    color: #333;
    font-weight: 500;
    margin-right: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    nav ul {
        gap: 1rem;
    }
    
    section {
        padding: 1.5rem;
    }
    
    #talents .talent-selector {
        flex-direction: column;
        gap: 1rem;
    }
    
    .selector-group {
        width: 100%;
    }
    
    #fetch-talent-btn {
        align-self: stretch;
    }
    
    .stats-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
    }
    
    .raid-list, .item-list {
        grid-template-columns: 1fr;
    }
    
    .item-image {
        height: 150px;
    }
}