/**
 * FORONE漏洞赏金猎人养成修炼手册 - 样式文件
 * Copyright (C) 2025 FORONE (https://github.com/ForOneSec)
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
 */

/* Version: 1.3.2 - Added AGPL-3.0 License */

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

:root {
    --primary-color: #4caf50;
    --secondary-color: #ff5252;
    --accent-color: #FFEB3B;
    --dark-color: #2E7D32;
    --light-color: #E8F5E9;
    --text-color: #333;
    --background-color: #fffef7;
    --bg-gradient-1: #e0f7fa;
    --bg-gradient-2: #bbdefb;
    --card-bg: #fffef7;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --watermelon-green: #2e7d32;
    --watermelon-red: #ff5252;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Comic Neue', cursive;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
    min-height: 100vh;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
}

/* 主内容区域 */
main {
    flex: 1;
    padding: 30px 0;
    min-height: 70vh;
}

/* 主头部 - 优化版 */
.main-header {
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.watermelon-icon {
    font-size: 2.5rem;
    animation: bounce 2s ease-in-out infinite;
}

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

.logo h1 {
    font-family: 'Gochi Hand', cursive;
    font-size: 28px;
    font-weight: normal;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.main-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-btn {
    font-family: 'Comic Neue', cursive;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-light);
    border-color: var(--primary-color);
}

.nav-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 主容器 */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    width: 100%;
}

.view-container {
    display: none;
    animation: fadeIn 0.5s ease-in;
    width: 100%;
}

.view-container.active {
    display: block;
    width: 100%;
}

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

/* 视图标题样式（匹配设计文档）*/
.view-title {
    font-family: 'Gochi Hand', cursive;
    font-size: 36px;
    color: var(--dark-color);  /* 绿色 #2E7D32 */
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.view-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(to right, transparent 0%, var(--primary-color) 50%, transparent 100%);
}

/* 视图内容容器（匹配设计文档）*/
.view-content {
    background-color: var(--background-color);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* 西瓜顶部装饰条 */
.watermelon-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to right, var(--dark-color), var(--primary-color));
    border-radius: 15px 15px 0 0;
    z-index: 2;
}

/* 西瓜籽装饰 */
.watermelon-seeds {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    height: 15px;
    z-index: 3;
}

.seed {
    position: absolute;
    width: 6px;
    height: 9px;
    background-color: #3e2723;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transform: rotate(45deg);
}

/* 西瓜切片装饰 */
.watermelon-slice {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #ff8a80 100%);
    border-radius: 0 0 15px 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 50%);
    transform: rotate(45deg);
    opacity: 0.7;
}

/* 手绘边框 */
.hand-drawn-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    opacity: 0.3;
}

.view-header {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 12px var(--shadow-light);
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--primary-color);
}

.view-header h2 {
    font-family: 'Gochi Hand', cursive;
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.view-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px 0;
}

.control-btn {
    font-family: 'Comic Neue', cursive;
    padding: 0.5rem 1rem;
    border: 2px dashed var(--primary-color);
    background: var(--card-bg);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 统计面板 */
.stats-panel {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.stat-value {
    font-family: 'Gochi Hand', cursive;
    font-size: 1.5rem;
    color: var(--watermelon-red);
    font-weight: bold;
}

/* 时间轴容器 */
.timeline-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 12px var(--shadow-light);
    max-height: calc(100vh - 350px);
    overflow-y: auto;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--watermelon-green), var(--primary-color), var(--watermelon-red));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-content {
    width: 45%;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 10px var(--shadow-light);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.timeline-content:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px var(--shadow-medium);
    border-color: var(--primary-color);
}

.timeline-marker {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-marker:hover {
    transform: translateX(-50%) scale(1.2);
}

.timeline-marker.milestone {
    background: var(--watermelon-red);
    color: white;
    border-color: var(--watermelon-red);
}

.timeline-marker.checked {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.timeline-marker.checked::after {
    content: '✓';
    position: absolute;
    font-size: 1.5rem;
    color: white;
}

.timeline-phase {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-family: 'Gochi Hand', cursive;
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.timeline-description {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.timeline-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.timeline-tag {
    background: #e8f5e9;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--watermelon-green);
    border: 1px dashed #81c784;
}

/* 思维导图容器 */
.mindmap-container {
    background: transparent;
    padding: 30px 0 2rem 0;
    min-height: 400px;
    overflow: auto;
}

.mindmap {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.mindmap-node {
    position: relative;
    text-align: center;
}

.mindmap-root {
    margin: 0 auto;
}

.node-content {
    display: inline-block;
    padding: 1rem 1.5rem;
    background: var(--card-bg);
    border: 3px solid var(--primary-color);
    border-radius: 25px;
    box-shadow: 0 4px 10px var(--shadow-light);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Gochi Hand', cursive;
    font-size: 1.2rem;
    color: var(--text-dark);
    position: relative;
}

.node-content:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px var(--shadow-medium);
}

.node-content.root {
    background: linear-gradient(135deg, var(--watermelon-green), var(--primary-color));
    color: white;
    font-size: 1.5rem;
    padding: 1.5rem 2rem;
    border: none;
}

.node-content.category {
    background: var(--watermelon-red);
    color: white;
    border-color: var(--watermelon-red);
}

.node-content.leaf {
    background: white;
    border: 2px dashed var(--primary-color);
}

.node-content.collapsed::after {
    content: '📁';
    margin-left: 0.5rem;
}

.node-content.expanded::after {
    content: '📂';
    margin-left: 0.5rem;
}

.mindmap-children {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* 父节点到子节点的垂直连接线 */
.mindmap-children::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: 50%;
    width: 3px;
    height: 2rem;
    background: var(--primary-color);
    transform: translateX(-50%);
}

/* 子节点之间的水平连接线 */
.mindmap-children::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    transform: translateY(-2rem);
}

/* 每个子节点到水平线的垂直连接 */
.mindmap-children > .mindmap-node::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: 50%;
    width: 3px;
    height: 2rem;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.mindmap-children.hidden {
    display: none;
}

/* 藤蔓元素样式（用于成长地图）*/
.vine-element {
    position: relative;
    margin: 20px 0;
    padding-left: 30px;
    padding-top: 30px;
}

.vine-element::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    animation: vineGrow 1s ease-out;
}

.vine-element::after {
    content: "🍉";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 20px;
}

.vine-element h3 {
    font-family: 'Gochi Hand', cursive;
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.vine-element p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

@keyframes vineGrow {
    0% { 
        transform: scaleY(0);
        transform-origin: top;
    }
    100% { 
        transform: scaleY(1);
        transform-origin: top;
    }
}

/* 流程图容器 */
.flowchart-container {
    background: transparent;
    padding: 30px 0 2rem 0;
    min-height: 400px;
    overflow: auto;
}

.flowchart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
}

.flow-step {
    position: relative;
    width: 300px;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    box-shadow: 0 4px 10px var(--shadow-light);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.flow-step:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px var(--shadow-medium);
}

/* 流程步骤之间的藤蔓连接线 */
.flow-step::after {
    content: '';
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 2rem;
    background: linear-gradient(to bottom, var(--primary-color), var(--dark-color));
    border-radius: 2px;
}

/* 藤蔓上的西瓜装饰 */
.flow-step::before {
    content: '🍉';
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    z-index: 10;
    animation: swingMelon 2s ease-in-out infinite;
}

.flow-step:last-child::after,
.flow-step:last-child::before {
    display: none;
}

@keyframes swingMelon {
    0%, 100% {
        transform: translateX(-50%) rotate(-5deg);
    }
    50% {
        transform: translateX(-50%) rotate(5deg);
    }
}

.flow-step-title {
    font-family: 'Gochi Hand', cursive;
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.flow-step-description {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

.flow-branch {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 词卡模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2001;
    padding: 2rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--watermelon-red);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2002;
}

.modal-close:hover {
    transform: rotate(90deg);
    background: #ff1744;
}

.card-preview {
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.action-btn {
    font-family: 'Comic Neue', cursive;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-light);
}

.action-btn.primary {
    background: var(--primary-color);
    color: white;
}

/* 词卡样式 */
.knowledge-card {
    width: 400px;
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.watermelon-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to right, var(--watermelon-green), var(--primary-color));
    border-radius: 15px 15px 0 0;
    z-index: 2;
}

.watermelon-seeds {
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 20px;
    z-index: 3;
}

.seed {
    position: absolute;
    width: 8px;
    height: 12px;
    background-color: #3e2723;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transform: rotate(45deg);
}

.seed:nth-child(1) { top: 5px; left: 20px; }
.seed:nth-child(2) { top: 8px; left: 60px; }
.seed:nth-child(3) { top: 3px; left: 100px; }
.seed:nth-child(4) { top: 10px; left: 140px; }
.seed:nth-child(5) { top: 5px; left: 180px; }
.seed:nth-child(6) { top: 7px; left: 220px; }
.seed:nth-child(7) { top: 2px; left: 260px; }
.seed:nth-child(8) { top: 9px; left: 300px; }
.seed:nth-child(9) { top: 4px; left: 340px; }

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-top: 30px;
    padding-bottom: 15px;
    border-bottom: 2px dashed var(--border-color);
}

.card-icon {
    width: 50px;
    height: 50px;
    background-color: var(--watermelon-red);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    font-size: 24px;
    color: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.card-title {
    font-family: 'Gochi Hand', cursive;
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: bold;
    line-height: 1.2;
}

.card-content {
    font-family: 'Comic Neue', cursive;
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
    font-size: 16px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

.card-footer-text {
    font-family: 'Comic Neue', cursive;
    font-size: 14px;
    color: #777;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .main-nav {
        gap: 0.3rem;
    }
    
    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 80px;
    }
    
    .timeline-content {
        width: 100%;
    }
    
    .timeline-marker {
        left: 30px;
    }
    
    .stats-panel {
        gap: 1rem;
    }
    
    .knowledge-card {
        width: 100%;
        max-width: 400px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--watermelon-green);
}

/* 新增设计元素样式 */

/* Logo 图标 */
.logo-icon {
    width: 50px;
    height: 50px;
    background-color: var(--watermelon-red);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-text-container {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-family: 'Gochi Hand', cursive;
    font-size: 28px;
    font-weight: normal;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.slogan {
    font-family: 'Gochi Hand', cursive;
    font-size: 18px;
    color: white;
    text-align: center;
    margin-top: 5px;
}

/* 语言切换 - 优化版 */
.language-toggle {
    display: flex;
    gap: 10px;
}

.lang-btn {
    background-color: var(--dark-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Comic Neue', cursive;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lang-btn:hover {
    background-color: var(--watermelon-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.lang-btn.active {
    background-color: var(--secondary-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
    transform: scale(1.05);
}

/* 导航栏样式 - 优化版 */
.main-nav-bar {
    background-color: #e8f5e9;
    padding: 10px 0;
    border-bottom: 2px dashed var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-tabs {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.nav-tab {
    background-color: white;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--text-dark);
    position: relative;
    overflow: hidden;
}

.nav-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.nav-tab:hover::before {
    left: 100%;
}

.nav-tab i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.nav-tab:hover i {
    transform: scale(1.1) rotate(3deg);
}

/* 选中状态 - 更清晰的视觉效果 */
.nav-tab.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

.nav-tab.active i {
    color: white;
}

/* 悬停效果 */
.nav-tab:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
    background-color: rgba(76, 175, 80, 0.05);
}

/* 激活状态不受悬停影响 */
.nav-tab.active:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(76, 175, 80, 0.5);
}

/* 视图描述 */
.view-description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 0.5rem;
    font-style: italic;
}

/* 西瓜装饰元素 */
.watermelon-decoration {
    height: 30px;
    background: linear-gradient(to right, var(--watermelon-green), var(--primary-color));
    margin: -25px -25px 20px -25px;
    border-radius: 15px 15px 0 0;
    position: relative;
}

.watermelon-decoration::after {
    content: '🍉';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

/* 旧的资源容器样式已删除，现在使用 view-content + resource-list */

/* 旧的社交容器样式已删除，现在使用 view-content + social-grid */

/* 旧的新闻容器样式已删除，现在使用 view-content + weather-display */

/* 资源列表样式 - 养料补给站（完全匹配设计文档）*/
.resource-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    padding-top: 30px;
    max-width: 100%;
}

.resource-item {
    background-color: white;
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 5px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.resource-icon {
    font-size: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.resource-item h3 {
    margin: 0 0 5px 0;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.resource-item p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* 气象预报样式（完全匹配设计文档）*/
.weather-display {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 30px;
}

.weather-card {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    flex: 1 1 150px;
    max-width: 200px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.weather-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.weather-card h3 {
    margin: 10px 0 5px 0;
    color: var(--dark-color);
    font-size: 1rem;
}

.weather-card p {
    margin: 5px 0;
    color: var(--text-color);
    font-size: 0.85rem;
    line-height: 1.4;
}

.weather-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

/* 社交网格样式 - 瓜农交友（完全匹配设计文档）*/
.social-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 20px !important;
    margin-top: 20px;
    padding-top: 30px;
}

.social-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.social-card h3 {
    margin: 10px 0;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.social-card p {
    margin: 10px 0;
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

.social-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--light-color);
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    color: var(--primary-color);
}

/* 响应式：在更大的屏幕上显示更多列 */
@media (min-width: 1200px) {
    .social-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* 计时器样式 - 蓄水池（匹配设计文档）*/
.timer-display {
    font-size: 48px;
    text-align: center;
    font-weight: bold;
    color: var(--dark-color);  /* 绿色 #2E7D32 */
    margin: 20px 0;
    padding-top: 30px;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.timer-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.timer-btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 底部样式 - 匹配设计文档 */
.site-footer {
    background-color: var(--dark-color);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent-color, #ffeb3b);
}

.footer-text {
    text-align: center;
    opacity: 0.9;
}

/* ==================== 猎人成长地图 - 我的瓜藤 特殊样式 ==================== */

/* 成长视图内容布局 */
.growth-view-content {
    display: flex;
    gap: 30px;
    min-height: 600px;
}

/* 藤蔓容器样式 */
.vine-container {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    min-height: 600px;
}

/* 土壤区域 */
.soil {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background-color: #8D6E63;
    border-radius: 0 0 15px 15px;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
}

.soil::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 20px;
    background-color: #795548;
    border-radius: 50% 50% 0 0;
}

.soil-text {
    font-family: 'Gochi Hand', cursive;
    font-size: 24px;
    color: white;
    text-align: center;
    margin-bottom: 10px;
    z-index: 2;
}

/* 藤蔓主干 */
.vine {
    position: absolute;
    bottom: 120px;
    top: 0;
    width: 8px;
    background: linear-gradient(to bottom, var(--dark-color), var(--primary-color));
    border-radius: 4px;
    z-index: 1;
    transform-origin: bottom;
    transform: scaleY(0);
    transition: transform 1.5s ease;
}

/* 藤蔓节点 */
.vine-node {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    transform-origin: center;
    opacity: 0;
    transform: scale(0);
    left: 50%;
    margin-left: -35px;
}

.vine-node.visible {
    opacity: 1;
    transform: scale(1);
    animation: nodeAppear 0.5s ease-out forwards;
}

.vine-node:hover {
    transform: scale(1.1);
}

.vine-node.active {
    box-shadow: 0 0 0 3px var(--accent-color), 0 4px 10px rgba(0, 0, 0, 0.2);
}

@keyframes nodeAppear {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* 节点颜色 */
.node-seed { background-color: #8D6E63; }
.node-sprout { background-color: #66BB6A; }
.node-flower { background-color: #FF9800; }
.node-small { background-color: #F44336; }
.node-ripe { background-color: #E91E63; }

/* 详情面板样式 */
.details-panel {
    flex: 0 0 350px;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px dashed var(--primary-color);
    max-height: 600px;
    overflow-y: auto;
}

.details-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px dashed var(--light-color);
}

.details-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
}

.details-title {
    font-family: 'Gochi Hand', cursive;
    font-size: 24px;
    color: var(--dark-color);
}

.details-subtitle {
    font-size: 16px;
    color: #666;
}

.section {
    margin-bottom: 20px;
}

.section-title {
    font-family: 'Gochi Hand', cursive;
    font-size: 20px;
    color: var(--dark-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--primary-color);
}

.section p {
    line-height: 1.6;
    color: var(--text-color);
}

.challenge-list, .advice-list {
    list-style-type: none;
    padding: 0;
}

.challenge-item, .advice-item {
    padding: 10px 15px;
    margin-bottom: 8px;
    background-color: var(--light-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    line-height: 1.4;
}

.milestone-list {
    list-style-type: none;
    padding: 0;
}

.milestone-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}

.milestone-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.milestone-checkbox.checked {
    background-color: var(--primary-color);
    color: white;
}

.milestone-checkbox i {
    display: none;
    font-size: 12px;
}

.milestone-checkbox.checked i {
    display: block;
}

/* 战力值统计面板 */
.stats-panel-right {
    flex: 0 0 300px;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px dashed var(--primary-color);
    height: fit-content;
}

.stats-title {
    font-family: 'Gochi Hand', cursive;
    font-size: 22px;
    color: var(--dark-color);
    text-align: center;
    margin-bottom: 15px;
}

.power-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.power-display {
    position: relative;
    width: 150px;
    height: 150px;
}

.power-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--secondary-color) 0%, var(--secondary-color) 0%, #e0e0e0 0%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: background 0.3s ease;
}

.power-circle::before {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    background-color: white;
    border-radius: 50%;
}

.power-value {
    position: absolute;
    font-family: 'Gochi Hand', cursive;
    font-size: 28px;
    color: var(--dark-color);
    z-index: 2;
}

.power-label {
    font-size: 16px;
    color: #666;
    text-align: center;
}

.date-display {
    font-size: 16px;
    color: #666;
    text-align: center;
}

/* 动作按钮样式 */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    z-index: 2;
}

.action-btn {
    background-color: var(--light-color);
    border: 2px dashed var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.action-btn:hover:not([disabled]) {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-btn i {
    font-size: 1rem;
}

/* 响应式更新 - 平板端 */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-tabs {
        gap: 6px;
    }
    
    .nav-tab {
        padding: 9px 16px;
        font-size: 0.95rem;
    }
    
    /* 养料补给站 - 平板 */
    .resource-item {
        padding: 15px 18px;
    }
    
    /* 瓜农交友 - 平板 */
    .social-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    /* 气象预报 - 平板 */
    .weather-card {
        flex: 1 1 140px;
    }
}

/* 响应式更新 - 移动端 */
@media (max-width: 768px) {
    .main-header {
        padding: 10px 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        padding: 0 1rem;
    }
    
    .logo {
        gap: 10px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .slogan {
        font-size: 14px;
    }
    
    .language-toggle {
        gap: 5px;
    }
    
    .lang-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .main-nav-bar {
        padding: 8px 0;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-tabs {
        gap: 4px;
        justify-content: center;
    }
    
    .nav-tab {
        padding: 8px 12px;
        font-size: 0.9rem;
        gap: 5px;
        border-radius: 18px;
    }
    
    .nav-tab i {
        font-size: 1rem;
    }
    
    /* 移动端选中状态保持清晰 */
    .nav-tab.active {
        transform: translateY(-1px);
    }
    
    .view-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .view-title::after {
        width: 100px;
    }
    
    .view-content {
        padding: 20px 15px;
    }
    
    .timer-display {
        font-size: 36px;
        padding-top: 20px;
    }
    
    .timer-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .watermelon-slice {
        width: 30px;
        height: 30px;
    }
    
    /* 养料补给站 - 移动端 */
    .resource-item {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .resource-item h3 {
        font-size: 1rem;
    }
    
    .resource-item p {
        font-size: 0.9rem;
    }
    
    /* 瓜农交友 - 移动端 */
    .social-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .social-card {
        padding: 15px;
    }
    
    /* 气象预报 - 移动端 */
    .weather-card {
        min-width: 120px;
        flex: 1 1 120px;
        padding: 12px;
    }
    
    .weather-card h3 {
        font-size: 0.9rem;
    }
    
    .weather-card p {
        font-size: 0.8rem;
    }
    
    .weather-icon {
        font-size: 28px;
    }
    
    /* 我的瓜藤 - 移动端 */
    .growth-view-content {
        flex-direction: column;
    }
    
    .vine-container {
        min-height: 500px;
    }
    
    .vine-node {
        width: 50px;
        height: 50px;
        font-size: 18px;
        margin-left: -25px;
    }
    
    .soil-text {
        font-size: 18px;
    }
    
    .action-buttons {
        gap: 5px;
    }
    
    .action-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .details-panel, .stats-panel-right {
        flex: 1;
        max-height: none;
    }
}

/* 我的瓜藤 - 平板端响应式 */
@media (max-width: 992px) {
    .growth-view-content {
        flex-direction: column;
    }
    
    .details-panel, .stats-panel-right {
        flex: 1;
        max-height: none;
    }
}

