/**
 * 塞尔达传说·旷野之息风格主题
 * The Legend of Zelda: Breath of the Wild Style Theme
 * Version: 3.0.0
 * 
 * 用于 link-homepage 项目的统一视觉风格
 * 核心特征：希卡蓝科技 + 水彩天空 + 自然美学
 */

/* ==================== CSS变量 ==================== */
:root {
    /* ==================== 希卡(Sheikah)科技配色 - 旷野之息核心 ==================== */
    
    /* 希卡蓝 - 完成状态、激活状态、科技发光 */
    --sheikah-blue: #00d4ff;
    --sheikah-blue-light: #66e5ff;
    --sheikah-blue-dark: #00a8cc;
    --sheikah-glow: 0 0 20px rgba(0, 212, 255, 0.5);
    --sheikah-glow-intense: 0 0 40px rgba(0, 212, 255, 0.7);
    --sheikah-glow-subtle: 0 0 12px rgba(0, 212, 255, 0.25);
    
    /* 希卡橙 - 未完成状态、待激活 */
    --sheikah-orange: #ff8c42;
    --sheikah-orange-light: #ffaa66;
    --sheikah-orange-dark: #cc6a2a;
    --sheikah-orange-glow: 0 0 20px rgba(255, 140, 66, 0.5);
    
    /* 左纳乌绿 - 兼容旧代码 */
    --zonai-green: #00d4ff;
    --zonai-green-light: #66e5ff;
    --zonai-green-dark: #00a8cc;
    --zonai-teal: #4ecdc4;
    --zonai-glow: 0 0 25px rgba(0, 212, 255, 0.6);
    
    /* 金色系 - 更温暖的金色 */
    --zelda-gold: #d4a82a;
    --zelda-gold-light: #f0dfa0;
    --zelda-gold-dark: #8b6914;
    --gold-glow: 0 0 20px rgba(212, 168, 42, 0.45);
    
    /* 天空蓝 - 旷野之息特色 */
    --sky-blue: #87ceeb;
    --sky-light: #b8e2f2;
    --sky-sunset: #f5d7b5;
    
    /* 暖色调 */
    --zelda-cream: #f5e6c8;
    --zelda-parchment: #e8dcc4;
    --zelda-brown: #6b5344;
    --zelda-dark: #1e1a16;
    --zelda-dark-panel: rgba(24, 28, 33, 0.96);
    
    /* 功能色 */
    --zelda-green: #5d8a4a;
    --zelda-red: #c94c4c;
    --zelda-orange: #d4764c;
    --zelda-blue: #5a9bc9;
    
    /* 文字色 */
    --text-light: #f5e6c8;
    --text-dark: #2a2520;
    --text-muted: rgba(245, 230, 200, 0.65);
    --text-bright: rgba(255, 255, 255, 0.92);
    
    /* 字体 */
    --font-title: 'Philosopher', 'Cinzel', 'Noto Serif SC', serif;
    --font-body: 'Noto Serif SC', Georgia, serif;
    --font-mono: 'Orbitron', monospace;
    
    /* 间距 */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --spacing-xl: 50px;
    
    /* 圆角 - 更现代的圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    
    /* 动画 - 更精致的缓动 */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* 毛玻璃效果 */
    --glass-bg: rgba(24, 28, 33, 0.82);
    --glass-bg-light: rgba(24, 28, 33, 0.65);
    --glass-blur: blur(20px);
    --glass-blur-heavy: blur(32px);
    --glass-border: 1px solid rgba(0, 212, 255, 0.15);
    
    /* 深度阴影系统 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2), 0 1px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-glow-blue: 0 4px 24px rgba(0, 212, 255, 0.2), 0 0 8px rgba(0, 212, 255, 0.1);
    --shadow-glow-gold: 0 4px 24px rgba(212, 168, 42, 0.2), 0 0 8px rgba(212, 168, 42, 0.1);
    
    /* 能力树专用颜色（从 ability-trees.css 统一到此处） */
    --cognitive-yellow: #fbbf24;
    --system-teal: #5ec4d4;
}

/* ==================== 基础重置 ==================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background: var(--zelda-cream);
    color: var(--zelda-dark);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ==================== 背景效果 ==================== */

/* 旷野之息水彩天空背景 */
.zelda-bg {
    position: fixed;
    inset: 0;
    background: 
        /* 云海效果 */
        radial-gradient(ellipse 120% 60% at 50% 120%, rgba(255,255,255,0.8) 0%, transparent 50%),
        /* 日落渐变 - 柔和自然的吉卜力风格 */
        linear-gradient(180deg, 
            #87ceeb 0%,      /* 清澈天空蓝 */
            #b8d4e3 20%,
            #f5e6c8 40%,     /* 羊皮纸暖色 */
            #e8c9a0 60%,
            #d4a574 80%,     /* 柔和日落橙 */
            #c9927a 100%
        );
    z-index: -3;
}

/* 希卡图案背景 */
.zonai-pattern-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    opacity: 0.04;
    pointer-events: none;
}

/* 水彩纹理叠加 */
.watercolor-overlay {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    z-index: -1;
    pointer-events: none;
}

/* 扫描线效果 */
.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.02) 0px,
        rgba(0, 0, 0, 0.02) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}

/* ==================== 粒子效果 ==================== */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.particle {
    position: absolute;
    font-size: 18px;
    animation: float-fall linear infinite;
    opacity: 0.7;
}

@keyframes float-fall {
    0% { 
        transform: translateY(-30px) translateX(0) rotate(0deg); 
        opacity: 0; 
    }
    5% { opacity: 0.7; }
    50% { 
        transform: translateY(50vh) translateX(30px) rotate(180deg);
    }
    95% { opacity: 0.7; }
    100% { 
        transform: translateY(105vh) translateX(-10px) rotate(360deg); 
        opacity: 0; 
    }
}

.light-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--sheikah-blue-light);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--sheikah-blue-light);
    animation: sparkle 4s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

/* ==================== 布局容器 ==================== */
.zelda-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
    position: relative;
}

.zelda-container.narrow {
    max-width: 900px;
}

/* ==================== 希卡面板 ==================== */
/* 希卡面板 v4.0 - 毛玻璃升级 */
.zonai-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    position: relative;
    box-shadow: 
        var(--shadow-glow-blue),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 0 40px rgba(0, 212, 255, 0.05);
    color: var(--text-light);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.zonai-panel:hover {
    border-color: rgba(0, 212, 255, 0.4);
}

/* 希卡角落装饰 - 更精致 */
/* 希卡角落装饰 - v4.0 更精致 */
.zonai-panel::before,
.zonai-panel::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(0, 212, 255, 0.4);
}

.zonai-panel::before { 
    top: 8px; 
    left: 8px; 
    border-right: none;
    border-bottom: none;
}
.zonai-panel::after { 
    bottom: 8px; 
    right: 8px;
    border-left: none;
    border-top: none;
}

/* 无装饰版本 */
.zonai-panel.no-decor::before,
.zonai-panel.no-decor::after {
    display: none;
}

/* ==================== 羊皮纸面板 - 更温润 ==================== */
/* 羊皮纸面板 v4.0 - 更温润 */
.parchment-panel {
    background: linear-gradient(160deg, 
        rgba(238, 228, 208, 0.97) 0%,
        rgba(248, 238, 218, 0.94) 50%,
        rgba(238, 228, 208, 0.97) 100%
    );
    border: 1.5px solid rgba(107, 83, 68, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: 
        var(--shadow-md),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 0 30px rgba(107, 83, 68, 0.04);
    color: var(--zelda-dark);
}

/* ==================== 页面标题 ==================== */
.zelda-page-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.zelda-title {
    font-family: var(--font-title);
    font-size: 42px;
    color: var(--zelda-brown);
    margin-bottom: var(--spacing-sm);
    text-shadow: 
        2px 2px 0 rgba(255,255,255,0.5),
        0 0 30px rgba(245, 215, 110, 0.3);
    letter-spacing: 3px;
}

.zelda-title.light {
    color: var(--text-light);
    text-shadow: 
        0 0 30px var(--sheikah-glow),
        2px 2px 0 rgba(0,0,0,0.3);
}

.zelda-subtitle {
    font-size: 16px;
    color: var(--zelda-brown);
    opacity: 0.7;
    letter-spacing: 2px;
}

.zelda-subtitle.light {
    color: var(--text-light);
    opacity: 0.8;
}

/* 三角力标志 - 更精致的发光 */
.triforce-container {
    display: flex;
    justify-content: center;
    margin: 25px 0;
    gap: 4px;
}

.triforce {
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 24px solid var(--zelda-gold);
    filter: drop-shadow(0 0 8px rgba(212, 168, 42, 0.5));
    animation: triforce-glow 4s ease-in-out infinite;
    transition: filter 0.3s ease;
}

.triforce:nth-child(2) { animation-delay: 0.4s; }
.triforce:nth-child(3) { animation-delay: 0.8s; }

@keyframes triforce-glow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(212, 168, 42, 0.35)); }
    50% { filter: drop-shadow(0 0 20px rgba(212, 168, 42, 0.7)); }
}

/* ==================== 神庙入口动画 ==================== */
.shrine-container {
    display: flex;
    justify-content: center;
    margin: var(--spacing-lg) 0;
}

.shrine-entrance {
    position: relative;
    width: 120px;
    height: 120px;
}

.shrine-spiral {
    position: absolute;
    inset: 0;
    border: 3px solid var(--sheikah-blue);
    border-radius: 50%;
    animation: spiral-rotate 8s linear infinite;
}

.shrine-spiral:nth-child(2) {
    inset: 15px;
    animation-duration: 6s;
    animation-direction: reverse;
    border-width: 2px;
}

.shrine-spiral:nth-child(3) {
    inset: 30px;
    animation-duration: 4s;
    border-width: 2px;
}

.shrine-spiral:nth-child(4) {
    inset: 45px;
    animation-duration: 3s;
    animation-direction: reverse;
    border-width: 1px;
}

.shrine-core {
    position: absolute;
    inset: 40%;
    background: radial-gradient(circle, var(--sheikah-blue-light) 0%, var(--sheikah-blue) 100%);
    border-radius: 50%;
    box-shadow: var(--sheikah-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

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

/* ==================== 左纳乌按钮 - 更精致 ==================== */
.zonai-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-title);
    font-size: 13px;
    letter-spacing: 1.5px;
    border: 1.5px solid rgba(0, 212, 255, 0.5);
    border-radius: var(--radius-md);
    background: rgba(0, 212, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--sheikah-blue-light);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.zonai-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 212, 255, 0.08) 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.zonai-btn:hover {
    background: rgba(0, 212, 255, 0.14);
    border-color: var(--sheikah-blue);
    box-shadow: var(--shadow-glow-blue);
    transform: translateY(-2px);
}

.zonai-btn:hover::before {
    opacity: 1;
}

.zonai-btn.primary {
    background: linear-gradient(135deg, var(--sheikah-blue-dark) 0%, var(--sheikah-blue) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.35);
}

.zonai-btn.primary:hover {
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.5);
    transform: translateY(-3px);
}

.zonai-btn.gold {
    border-color: var(--zelda-gold);
    color: var(--zelda-gold-light);
    background: rgba(201, 162, 39, 0.1);
}

.zonai-btn.gold:hover {
    box-shadow: var(--gold-glow);
}

/* ==================== 能力图标 ==================== */
.ability-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        var(--sheikah-blue-light) 0%,
        var(--sheikah-blue) 50%,
        var(--sheikah-blue-dark) 100%
    );
    border: 3px solid var(--sheikah-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 
        var(--sheikah-glow),
        inset 0 -5px 15px rgba(0, 0, 0, 0.2),
        inset 0 5px 15px rgba(255, 255, 255, 0.1);
    animation: ability-pulse 2s ease-in-out infinite;
}

@keyframes ability-pulse {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.4),
                    inset 0 -5px 15px rgba(0, 0, 0, 0.2);
    }
    50% { 
        box-shadow: 0 0 35px rgba(0, 212, 255, 0.7),
                    inset 0 -5px 15px rgba(0, 0, 0, 0.2);
    }
}

.ability-icon.gold {
    background: radial-gradient(circle at 30% 30%, 
        var(--zelda-gold-light) 0%,
        var(--zelda-gold) 50%,
        var(--zelda-gold-dark) 100%
    );
    border-color: var(--zelda-gold-light);
}

/* ==================== 心心血量 ==================== */
.hearts-container {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.heart {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    animation: heartbeat 1.5s ease-in-out infinite;
}

.heart.empty {
    opacity: 0.3;
    filter: grayscale(1);
    animation: none;
}

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

/* ==================== 物品栏格子 ==================== */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

/* 物品栏格子 v4.0 */
.inventory-slot {
    aspect-ratio: 1;
    background: linear-gradient(150deg, 
        rgba(240, 230, 212, 0.96) 0%,
        rgba(248, 240, 222, 0.92) 100%
    );
    border: 1.5px solid rgba(107, 83, 68, 0.18);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.inventory-slot:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 28px rgba(107, 83, 68, 0.2);
    border-color: var(--zelda-gold);
}

.inventory-slot.zonai { 
    border-color: rgba(0, 212, 255, 0.4); 
    box-shadow: 0 0 14px rgba(0, 212, 255, 0.2); 
}

.inventory-slot.legendary { 
    border-color: rgba(201, 162, 39, 0.5); 
    box-shadow: 0 0 14px rgba(201, 162, 39, 0.3); 
}

/* ==================== 任务日志 ==================== */
/* 任务日志 v4.0 - 毛玻璃升级 */
.quest-log {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    color: var(--text-light);
    box-shadow: var(--shadow-lg);
}

.quest-title {
    font-family: var(--font-title);
    font-size: 18px;
    color: var(--zelda-gold-light);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--sheikah-blue-dark);
}

.quest-objectives {
    list-style: none;
}

.quest-objectives li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-muted);
}

.quest-objectives li::before {
    content: '◇';
    position: absolute;
    left: 0;
    color: var(--sheikah-blue-dark);
}

.quest-objectives li.completed {
    color: var(--sheikah-blue-light);
}

.quest-objectives li.completed::before {
    content: '◆';
    color: var(--sheikah-blue-light);
}

/* ==================== 统计卡片 ==================== */
/* 统计卡片 v4.0 - 毛玻璃升级 */
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(0, 212, 255, 0.12);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    text-align: center;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    border-color: rgba(0, 212, 255, 0.35);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-blue);
}

.stat-icon {
    font-size: 28px;
    margin-bottom: var(--spacing-sm);
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 700;
    color: var(--sheikah-blue-light);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================== 导航栏 ==================== */
.zelda-nav {
    position: sticky;
    top: 0;
    background: rgba(30, 35, 40, 0.95);
    border-bottom: 2px solid var(--sheikah-blue-dark);
    padding: 0 var(--spacing-md);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.zelda-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.zelda-nav-brand {
    font-family: var(--font-title);
    font-size: 20px;
    color: var(--sheikah-blue-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.zelda-nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.zelda-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.zelda-nav-link:hover {
    color: var(--sheikah-blue-light);
    background: rgba(0, 212, 255, 0.1);
}

.zelda-nav-link.active {
    color: var(--sheikah-blue-light);
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid var(--sheikah-blue);
}

/* ==================== 侧边栏 ==================== */
.zelda-sidebar {
    width: 300px;
    background: rgba(30, 35, 40, 0.95);
    border-right: 2px solid var(--sheikah-blue-dark);
    padding: var(--spacing-md);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.zelda-sidebar::-webkit-scrollbar {
    width: 4px;
}

.zelda-sidebar::-webkit-scrollbar-track {
    background: var(--zelda-dark);
}

.zelda-sidebar::-webkit-scrollbar-thumb {
    background: var(--sheikah-blue);
    border-radius: 2px;
}

/* ==================== 树形结构 ==================== */
.tree-container {
    padding: 0;
    overflow-x: auto;
    position: relative;
    min-height: 200px;
    max-width: 100%;
}

.tree-graph {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    position: relative;
    min-width: 0;
    padding: var(--spacing-md) var(--spacing-sm);
    flex-wrap: nowrap;
    gap: var(--spacing-md);
}

/* 水平布局层级分支 */
.layer-branches {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px;
    overflow-x: auto;
    align-items: flex-start;
}

.tree-root {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.root-node {
    width: 80px;
    height: 80px;
    background: rgba(30, 35, 40, 0.9);
    border: 3px solid var(--sheikah-blue);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.root-node:hover {
    transform: scale(1.1);
    box-shadow: var(--sheikah-glow);
}

.root-node .node-icon { font-size: 28px; }
.root-node .node-level {
    position: absolute;
    bottom: -8px;
    background: var(--zelda-dark);
    border: 2px solid var(--sheikah-blue);
    border-radius: 10px;
    padding: 1px 8px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--sheikah-blue-light);
}

.root-line {
    width: 3px;
    height: 40px;
    background: linear-gradient(180deg, var(--sheikah-blue) 0%, rgba(0, 212, 255, 0.3) 100%);
}

.branches {
    display: flex;
    gap: var(--spacing-sm);
    position: relative;
    flex-wrap: wrap;
    min-width: 0;
}

.branches::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30px;
    right: 30px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--sheikah-blue-dark), transparent);
}

.branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-top: 40px;
}

.branch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 40px;
    background: linear-gradient(180deg, var(--sheikah-blue-dark) 0%, currentColor 100%);
    transform: translateX(-50%);
}

.category-node {
    width: 70px;
    height: 70px;
    background: rgba(30, 35, 40, 0.9);
    border: 2px solid;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    z-index: 2;
}

.category-node:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px currentColor;
}

.category-node .cat-icon { font-size: 24px; margin-bottom: 2px; }
.category-node .cat-name { 
    font-size: 9px; 
    color: var(--text-muted); 
    text-align: center; 
    max-width: 60px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.category-node .cat-level {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: var(--zelda-dark);
    border: 2px solid;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
}

.category-node .cat-count {
    position: absolute;
    bottom: -10px;
    background: rgba(0,0,0,0.8);
    border: 1px solid;
    border-radius: 8px;
    padding: 1px 6px;
    font-size: 9px;
}

.leaves {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
    max-width: 200px;
    position: relative;
}

.leaves::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    width: 2px;
    height: 30px;
    background: linear-gradient(180deg, currentColor 0%, rgba(255,255,255,0.1) 100%);
    transform: translateX(-50%);
}

.leaf-node {
    width: 54px;
    height: 54px;
    background: rgba(30, 35, 40, 0.9);
    border: 2px solid;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.leaf-node:hover {
    transform: scale(1.15);
    box-shadow: 0 0 20px currentColor;
    z-index: 10;
}

.leaf-node .leaf-icon { font-size: 20px; }
.leaf-node .leaf-name {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    max-width: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.leaf-node .leaf-level {
    position: absolute;
    bottom: -6px;
    background: var(--zelda-dark);
    border: 1px solid;
    border-radius: 6px;
    padding: 0 4px;
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 600;
}

/* 等级颜色 - 旷野之息风格：希卡橙(未完成)到希卡蓝(完成) */
.lv1 { --node-color: #ff8c42; }  /* 待激活 - 希卡橙 */
.lv2 { --node-color: #ffaa66; }  /* 进行中 - 浅希卡橙 */
.lv3 { --node-color: #4ecdc4; }  /* 成长中 - 青色 */
.lv4 { --node-color: #00d4ff; }  /* 熟练 - 希卡蓝 */
.lv5 { --node-color: #66e5ff; }  /* 精通 - 亮希卡蓝 */

/* 树形分支颜色 */
.skill-tree .branch { color: var(--sheikah-blue); }
.knowledge-tree .branch { color: var(--zelda-gold); }
.memory-tree .branch { color: var(--sheikah-orange); }

/* 溢出标记样式优化 */
.leaf-more {
    background: rgba(0, 212, 255, 0.2);
    color: var(--sheikah-blue-light);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--sheikah-blue-dark);
}

/* ==================== Tooltip ==================== */
.tooltip {
    position: fixed;
    z-index: 9999;
    width: 320px;
    max-width: 360px;
    background: linear-gradient(135deg, 
        rgba(30, 35, 40, 0.98) 0%, 
        rgba(40, 45, 55, 0.95) 100%
    );
    border: 2px solid var(--sheikah-blue);
    border-radius: var(--radius-md);
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s;
    box-shadow: 
        var(--sheikah-glow),
        0 10px 40px rgba(0, 0, 0, 0.6);
}

.tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.tip-header {
    padding: 14px;
    border-bottom: 1px solid var(--sheikah-blue-dark);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 212, 255, 0.1);
}

.tip-icon {
    width: 36px;
    height: 36px;
    background: rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.tip-title { flex: 1; }

.tip-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
}

.tip-type {
    font-size: 11px;
    color: var(--text-muted);
}

.tip-type-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tip-source-badge {
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
/* 林克定制 - 紫色调 */
.tip-source-badge[data-type="link"] {
    background: rgba(167, 139, 250, 0.25);
    color: #c4b5fd;
    border: 1px solid rgba(167, 139, 250, 0.4);
}
/* 快手定制 - 橙色调 */
.tip-source-badge[data-type="ks"] {
    background: rgba(251, 146, 60, 0.25);
    color: #fdba74;
    border: 1px solid rgba(251, 146, 60, 0.4);
}
/* 个人定制 - 绿色调 */
.tip-source-badge[data-type="sl"] {
    background: rgba(74, 222, 128, 0.25);
    color: #86efac;
    border: 1px solid rgba(74, 222, 128, 0.4);
}
/* 通用 - 蓝灰色调 */
.tip-source-badge[data-type="generic"] {
    background: rgba(56, 189, 248, 0.2);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.3);
}
/* 兼容旧类型 */
.tip-source-badge[data-type="builtin"] {
    background: rgba(167, 139, 250, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(167, 139, 250, 0.3);
}
.tip-source-badge[data-type="custom"] {
    background: rgba(74, 222, 128, 0.2);
    color: #86efac;
    border: 1px solid rgba(74, 222, 128, 0.3);
}
.tip-source-badge[data-type="platform"] {
    background: rgba(56, 189, 248, 0.2);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.tip-source-badge[data-type="other"] {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.tip-level { text-align: right; }

.tip-lv-num {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--sheikah-blue-light);
}

.tip-lv-max {
    font-size: 11px;
    color: var(--text-muted);
}

.tip-body { padding: 14px; }

.tip-metrics-section { margin-bottom: 12px !important; }
.tip-metrics-row {
    display: flex;
    gap: 0;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(200, 220, 240, 0.08);
}
.tip-metric {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    border-right: 1px solid rgba(200, 220, 240, 0.08);
}
.tip-metric:last-child { border-right: none; }
.tip-metric-val {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--sheikah-blue-light);
}
.tip-metric-label {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 2px;
    letter-spacing: 0.5px;
}

.tip-section { margin-bottom: 12px; }
.tip-section:last-child { margin-bottom: 0; }

.tip-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--sheikah-blue-light);
    margin-bottom: 6px;
}

.tip-desc {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
}

.tip-source {
    font-size: 11px;
    color: var(--sheikah-blue-light);
    font-weight: 500;
}

.tip-progress {
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
    margin: 6px 0;
}

.tip-progress-fill {
    height: 100%;
    background: var(--sheikah-blue);
    border-radius: 3px;
}

.tip-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
}

/* ==================== 加载动画 ==================== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-muted);
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--sheikah-blue-dark);
    border-top-color: var(--sheikah-blue-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* ==================== 脉冲发光 ==================== */
@keyframes zonai-pulse {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
        border-color: var(--sheikah-blue);
    }
    50% { 
        box-shadow: 0 0 35px rgba(0, 212, 255, 0.6);
        border-color: var(--sheikah-blue-light);
    }
}

.zonai-glow {
    animation: zonai-pulse 3s ease-in-out infinite;
}

@keyframes gold-pulse {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(201, 162, 39, 0.3);
        border-color: var(--zelda-gold);
    }
    50% { 
        box-shadow: 0 0 35px rgba(201, 162, 39, 0.6);
        border-color: var(--zelda-gold-light);
    }
}

.gold-glow {
    animation: gold-pulse 3s ease-in-out infinite;
}

/* ==================== 响应式 ==================== */
@media (max-width: 900px) {
    .zelda-sidebar {
        display: none;
    }
    
    .zelda-nav-links {
        gap: var(--spacing-sm);
    }
    
    .zelda-nav-link span:not(.nav-icon) {
        display: none;
    }
    
    .zelda-title {
        font-size: 28px;
    }
}

@media (max-width: 600px) {
    .zelda-container {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .zonai-panel {
        padding: var(--spacing-md);
    }
    
    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}
