@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&display=swap');

:root {
    /* 仙界配色 */
    --primary-color: #2c3e50; /* 墨色 */
    --secondary-color: #c0392b; /* 丹砂 */
    --accent-color: #1abc9c; /* 青鸾色 (Cyan) */
    --jade-white: rgba(255, 255, 255, 0.9); /* 羊脂玉白 */
    --gold: #f1c40f; /* 佛光金 */
    --mist-bg: #ecf0f1; /* 云雾白 */
    --border-color: #bdc3c7;
    
    /* 字体 */
    --font-title: 'Segoe UI', 'Microsoft YaHei', sans-serif; /* 现代无衬线体 */
    --font-body: 'Segoe UI', 'Microsoft YaHei', sans-serif; /* 现代无衬线体 */
}

body {
    background-color: var(--mist-bg);
    /* 模拟水墨云雾背景 */
    background-image: 
        linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(236, 240, 241, 0.5)),
        url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><filter id="f" x="0" y="0"><feTurbulence type="fractalNoise" baseFrequency="0.01" numOctaves="3" result="noise"/><feColorMatrix type="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 0.4 0" in="noise" result="coloredNoise"/></filter></defs><rect width="100%" height="100%" filter="url(%23f)" opacity="0.4"/></svg>');
    background-attachment: fixed;
    background-size: cover;
    color: var(--primary-color);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    line-height: 1.8;
    overflow-x: hidden;
}

/* 漂浮动画 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes mist-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 卷轴容器 - 玉简风格 */
.container {
    max-width: 900px;
    margin: 60px auto;
    padding: 50px;
    background: var(--jade-white);
    border-radius: 15px;
    box-shadow: 
        0 0 30px rgba(26, 188, 156, 0.2), /* 青光 */
        inset 0 0 50px rgba(255, 255, 255, 0.8);
    position: relative;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* 祥云纹饰边框 */
.container::before, .container::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 15px;
    left: 0;
    background-image: radial-gradient(circle, var(--accent-color) 30%, transparent 31%);
    background-size: 20px 20px;
    background-position: center;
    opacity: 0.3;
}
.container::before { top: 10px; }
.container::after { bottom: 10px; }

/* 标题区 */
.hero {
    text-align: center;
    padding: 80px 20px;
    background: transparent;
    position: relative;
}

h1 {
    font-size: 4em;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-family: var(--font-title);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 2px 2px 0 rgba(0,0,0,0.1);
    background: -webkit-linear-gradient(45deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: float 6s ease-in-out infinite;
}

h2 {
    color: var(--secondary-color);
    border-bottom: 2px solid rgba(192, 57, 43, 0.3);
    padding-bottom: 10px;
    margin-top: 50px;
    font-family: var(--font-title);
    font-size: 2em;
    display: inline-block;
}

h3 {
    color: var(--accent-color);
    font-family: var(--font-title);
    font-size: 1.5em;
}

/* 漫画/对话面板 - 宣纸风格 */
.comic-panel {
    background-color: #fffbf0; /* 陈旧宣纸色 */
    border: 1px solid #dcdde1;
    padding: 30px;
    margin: 40px 0;
    position: relative;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.05);
    border-radius: 4px;
}

/* 四角纹饰 */
.comic-panel::before {
    content: '⌜';
    position: absolute;
    top: 5px; left: 5px;
    font-size: 20px;
    color: var(--primary-color);
}
.comic-panel::after {
    content: '⌟';
    position: absolute;
    bottom: 5px; right: 5px;
    font-size: 20px;
    color: var(--primary-color);
}

.character-dialogue {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    margin: 30px 0;
}

.avatar {
    width: 100px;
    height: 100px;
    background-color: #fff;
    border-radius: 50%;
    border: 4px double var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.avatar:hover {
    transform: scale(1.1) rotate(5deg);
}

/* 角色专属光环 */
.avatar.protagonist {
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 15px rgba(26, 188, 156, 0.4);
}

.avatar.master {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(44, 62, 80, 0.4);
}

.avatar.beauty {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(192, 57, 43, 0.4);
}

.bubble {
    background: #fff;
    color: #2c3e50;
    padding: 20px 30px;
    border: 1px solid #eee;
    border-left: 4px solid var(--primary-color);
    border-radius: 2px;
    position: relative;
    font-size: 1.1em;
    line-height: 1.8;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    flex-grow: 1;
}

/* 代码经书 */
pre {
    background-color: #fdfbf7;
    padding: 25px;
    border: 1px solid #e0e0e0;
    border-left: 5px solid var(--accent-color);
    font-family: 'Consolas', 'Monaco', monospace;
    color: #444;
    font-size: 1.1em;
    position: relative;
    overflow: hidden;
}

pre::before {
    content: 'CODE SCRIPTURE';
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.7em;
    color: #ddd;
    font-weight: bold;
    letter-spacing: 2px;
}

code {
    font-family: 'Consolas', 'Monaco', monospace;
    color: #c0392b;
    background: rgba(192, 57, 43, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* 地图/境界卡片 */
.map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.level-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--accent-color);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-color);
    display: block;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

/* 卡片流光效果 */
.level-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(45deg);
    transition: transform 0.6s;
    opacity: 0;
}

.level-card:hover::before {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

.level-card:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(44, 62, 80, 0.3);
}

.level-card:hover .level-title, 
.level-card:hover div,
.level-card:hover .level-status {
    color: #fff !important;
}

.level-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-family: var(--font-title);
}

.level-status {
    font-size: 0.9em;
    color: #95a5a6;
    margin-top: 15px;
    font-family: var(--font-body);
}

/* 炼丹炉 (终端) */
.terminal-window {
    background: #1e272e;
    border: 3px solid #485460;
    border-radius: 8px;
    padding: 25px;
    font-family: monospace;
    margin-top: 30px;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
    position: relative;
}

/* 炉火微光 */
.terminal-window::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from { opacity: 0.5; box-shadow: 0 0 5px var(--gold); }
    to { opacity: 1; box-shadow: 0 0 15px var(--gold); }
}

.terminal-output {
    min-height: 140px;
    color: var(--accent-color);
    white-space: pre-wrap;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(26, 188, 156, 0.5);
}

.terminal-input {
    background: transparent;
    border: none;
    color: #fff;
    flex-grow: 1;
    font-family: monospace;
    font-size: 1.2em;
    outline: none;
}

/* 按钮 (令牌) */
.btn {
    background: linear-gradient(to right, var(--primary-color), #34495e);
    color: #fff;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2em;
    font-family: var(--font-title);
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.4);
    letter-spacing: 2px;
}

.btn:hover {
    background: linear-gradient(to right, var(--secondary-color), #e74c3c);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(192, 57, 43, 0.4);
}

/* 底部 */
footer {
    text-align: center;
    padding: 50px;
    color: #7f8c8d;
    font-size: 0.9em;
    font-family: var(--font-body);
}
