/* 泰拉瑞亚 Wiki - 全局样式 */
:root {
    /* 泰拉瑞亚原作配色 */
    --primary: #8b5cf6;          /* 魔法紫 */
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --secondary: #fbbf24;        /* 金币黄 */
    
    /* 生物群系颜色 */
    --corruption: #9333ea;       /* 腐化紫 */
    --crimson: #dc2626;          /* 猩红 */
    --hallow: #ec4899;           /* 神圣粉 */
    --jungle: #16a34a;           /* 丛林绿 */
    --ocean: #0ea5e9;            /* 海洋蓝 */
    --desert: #f59e0b;           /* 沙漠黄 */
    --snow: #e2e8f0;             /* 雪白 */
    --hell: #7f1d1d;             /* 地狱红 */
    
    /* 界面颜色 */
    --bg-dark: #0f0f1a;          /* 深色背景 */
    --bg-card: #1a1a2e;          /* 卡片背景 */
    --bg-light: #252542;         /* 浅背景 */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border: #334155;
    
    /* 状态颜色 */
    --success: #22c55e;          /* 生命绿 */
    --warning: #f59e0b;          /* 魔力蓝 */
    --danger: #ef4444;           /* 伤害红 */
    --info: #3b82f6;
    --magic: #a855f7;            /* 魔法紫 */
    --melee: #f97316;            /* 近战橙 */
    --ranged: #22c55e;           /* 远程绿 */
    --summon: #ec4899;           /* 召唤粉 */
    
    --radius: 4px;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.5);
    
    /* 像素风格 */
    --pixel-border: 2px solid var(--border);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-light) 100%);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.navbar-brand img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
}

.navbar-nav {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.navbar-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 0;
    position: relative;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--primary-light);
}

.navbar-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

/* 搜索框 */
.search-box {
    position: relative;
}

.search-box input {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    color: var(--text-primary);
    width: 250px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    width: 300px;
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
}

/* Hero 区域 */
.hero {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-light) 50%, var(--bg-dark) 100%);
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-light);
}

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

/* 主内容区 */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

/* 侧边栏 */
.sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.sidebar-section h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.sidebar-nav a::before {
    content: '›';
    color: var(--primary);
    font-weight: bold;
}

/* 内容区 */
.content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border);
}

.content h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
}

.content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--primary-light);
}

.content h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

.content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* 卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.2s;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.card-meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.data-table tr:hover {
    background: var(--bg-light);
}

.data-table td {
    color: var(--text-secondary);
}

/* 标签 */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.tag-primary {
    background: rgba(126, 34, 206, 0.2);
    color: var(--primary-light);
}

.tag-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.tag-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.tag-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary-light);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

/* 页脚 */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-section h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-section a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    max-width: 1400px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* 响应式 */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: relative;
        top: 0;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar-nav {
        display: none;
    }
    
    .search-box input {
        width: 150px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* 代码块 */
pre {
    background: var(--bg-dark);
    border-radius: var(--radius);
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.875rem;
    color: var(--primary-light);
}

/* 链接 */
a {
    color: var(--primary-light);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 列表 */
ul, ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* 提示框 */
.tip {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--success);
    padding: 1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1rem 0;
}

.warning {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning);
    padding: 1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1rem 0;
}

.danger {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger);
    padding: 1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1rem 0;
}
