/* ====== 导航栏样式 ====== */
:root {
    --nav-primary-bg: #8e2323;
    --nav-primary-bg-darker: #6a1a1a;
    --nav-accent-color: #d4a76a;
    --nav-text-color: #ffffff;
    --nav-height: 70px;
    --heading-color: #8e2323;
}

.navbar {
    background: linear-gradient(135deg, var(--nav-primary-bg), var(--nav-primary-bg-darker));
    height: var(--nav-height);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-height);
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    padding: 0 24px;
    margin: 0 auto;
}

.navbar-logo {
    color: var(--nav-text-color);
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.navbar-logo:hover {
    color: var(--nav-accent-color);
    transform: scale(1.02);
}

.menu-icon {
    display: none;
    color: var(--nav-text-color);
    font-size: 1.8rem;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    text-align: center;
    margin: 0;
    padding: 0;
}

.nav-item {
    height: var(--nav-height);
}

.nav-link {
    color: var(--nav-text-color);
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0 1rem;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--nav-accent-color);
}

/* 下划线动画 */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--nav-accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 60%;
}

/* 媒体查询 - 移动端导航栏 */
@media (max-width: 960px) {
    .navbar-container {
        padding: 0 15px;
        max-width: 100%;
    }
    
    .menu-icon {
        display: block;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .nav-menu {
        display: none; /* 默认隐藏 */
        flex-direction: column;
        width: 100%;
        height: auto; /* 高度自适应内容 */
        position: absolute;
        top: var(--nav-height); /* 位于导航栏下方 */
        left: -100%; /* 初始在屏幕左侧隐藏 */
        opacity: 0;
        transition: all 0.5s ease;
        background: linear-gradient(135deg, var(--nav-primary-bg-darker), var(--nav-primary-bg));
        padding: 10px 0;
        z-index: 998; /* 确保在内容之上，但在导航栏之下 */
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu.active {
        display: flex; /* 激活时显示 */
        left: 0; /* 移入屏幕 */
        opacity: 1;
    }
    
    .nav-item {
        width: 100%;
        height: auto;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* 菜单项之间有分隔线 */
    }
    
    .nav-item:last-child {
        border-bottom: none; /* 最后一个菜单项无分隔线 */
    }
    
    .nav-link {
        padding: 0.8rem 1.5rem;
        width: 100%;
        display: block;
        font-size: 1rem;
        height: auto;
        text-align: center; /* 文本居中 */
    }
    
    .nav-link:hover {
        background-color: rgba(0,0,0, 0.1);
        color: var(--nav-accent-color);
    }
    
    .nav-link::after {
        display: none; /* 移动端不显示下划线动画 */
    }
}

/* ====== 全局基础样式 ====== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* 平滑滚动 */
    -webkit-text-size-adjust: 100%; /* 阻止字体自动调整大小 */
    -ms-text-size-adjust: 100%; /* IE 特有 */
    -webkit-overflow-scrolling: touch; /* IOS 设备上滚动更流畅 */
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', '微软雅黑', sans-serif;
    line-height: 1.7;
    background-color: #f8f9fa; /* 浅灰色背景 */
    color: #343a40; /* 深灰色文本 */
    padding-top: 70px; /* 留出顶部导航栏的空间 */
    /* 禁用用户选择文本，防止复制长串QQ号 */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

a {
    text-decoration: none;
    color: #8e2323; /* 主题红 */
    transition: color 0.3s ease;
}
a:hover {
    color: #d4a76a; /* 主题橙 */
}

.container {
    max-width: 760px;
    margin: 40px auto;
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    border: 1px solid #dee2e6;
}

h1 {
    text-align: center;
    color: #8e2323;
    margin-bottom: 35px;
    font-weight: 700;
    font-size: 2.1rem;
    position: relative;
    padding-bottom: 15px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, transparent, #d4a76a, transparent);
    border-radius: 2px;
}

form {
    display: flex;
    gap: 15px; /* 表单元素之间的间距 */
    margin-bottom: 40px;
    flex-wrap: wrap; /* 允许换行 */
    align-items: center; /* 垂直居中对齐 */
}

input[type="text"] {
    flex-grow: 1; /* 尽量占据可用空间 */
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 250px; /* 最小宽度 */
    height: 48px; /* 固定高度 */
}

input[type="text"]:focus {
    border-color: #8e2323;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(142, 35, 35, 0.2);
}

button[type="submit"] {
    padding: 0 28px;
    background-color: #8e2323;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    height: 48px;
    line-height: 48px; /* 使按钮文本垂直居中 */
    white-space: nowrap; /* 防止文本换行 */
}

button[type="submit"]:hover {
    background-color: #6a1a1a;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: translateY(-1px); /* 悬停时略微上浮 */
}

/* 评估结果显示区域 */
#result-display {
    margin-top: 35px;
    padding: 0; /* Initial padding */
    background-color: transparent; /* Initial background */
    border: none; /* Initial border */
    border-radius: 0; /* Initial border-radius */
    animation: none; /* No initial animation */
}

/* Show Result Section properties when content is loaded */
#result-display.show {
    padding: 25px 30px;
    background-color: #fffaf0; /* 淡黄色背景 */
    border: 1px solid #eeddcc; /* 橙色边框 */
    border-radius: 8px;
    animation: fadeIn 0.6s ease-out; /* 淡入动画 */
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-section h2 {
    margin-top: 0;
    color: #8e2323;
    border-bottom: 2px solid #d4a76a;
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-size: 1.6em;
    font-weight: 600;
}

.result-section h2 i {
    color: #d4a76a;
    margin-right: 8px;
}

.result-section p {
    margin: 12px 0;
    font-size: 1.1em;
    line-height: 1.8;
}
.result-section p i {
    margin-right: 8px;
     width: 1.2em; /* 固定图标宽度，避免文本跳动 */
    text-align: center;
}
 /* 结果图标颜色 */
 .result-section p i.fa-star { color: gold; }
 .result-section p i.fa-tags { color: var(--nav-primary-bg); }
 .result-section p i.fa-pen-alt { color: #6c757d; }
 .result-section p i.fa-chart-line { color: #28a745; }

.result-section .value-highlight {
    color: #8e2323;
    font-weight: bold;
    font-size: 1.6em;
    background-color: #fdf0e0; /* 更亮的背景 */
    padding: 5px 12px;
    border-radius: 6px;
    display: inline-block;
    border: 1px solid #d4a76a; /* 淡橙色边框 */
    margin-left: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.result-section .score-highlight {
    color: #28a745; /* 绿色 */
    font-weight: bold;
    font-size: 1.2em;
    margin-left: 5px;
}

.result-section .daxie-value {
    font-weight: bold;
    color: #555;
    background-color: #f0f0f0;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: inline-block;
    margin-left: 8px;
    font-size: 1.05em;
}

/* 评估依据详情 */
.reasons {
     margin-top: 30px;
}

.reasons p.reasons-title {
     font-weight: bold;
     margin-bottom: 15px;
     color: #444;
     font-size: 1.2em;
}
 .reasons p.reasons-title i {
     margin-right: 8px;
     color: #555;
 }

.reasons ul {
    list-style-type: none;
    padding-left: 0;
}

.reasons li {
    background-color: #ffffff;
    margin-bottom: 10px;
    padding: 12px 18px;
    border-radius: 6px;
    border-left: 5px solid #8e2323; /* 左侧强调边框 */
    font-size: 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s ease-in-out;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* 轻微阴影 */
}

.reasons li:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px) scale(1.01);
    border-left-color: #d4a76a; /* 悬停时边框颜色变化 */
}

.reasons li span.desc {
    flex-grow: 1; /* 描述文字占据大部分空间 */
    padding-right: 15px;
}

.reasons li span.points {
    font-weight: 500;
    margin-left: auto; /* 推到右边 */
    white-space: nowrap; /* 防止分数换行 */
    font-size: 0.95em;
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0; /* 防止被挤压 */
}

/* 分数类型样式 */
.reasons li span.points.positive {
    color: #28a745; /* 绿色 */
    background-color: #eaf7ec; /* 淡绿色背景 */
}

.reasons li span.points.negative {
    color: #dc3545; /* 红色 */
    background-color: #f8d7da; /* 淡红色背景 */
}

.reasons li span.points.base,
.reasons li span.points.symbolic {
    color: #6c757d; /* 灰色 */
    font-style: italic; /* 斜体 */
    background-color: #f8f9fa; /* 浅灰背景 */
}

/* 错误信息样式 */
.error {
    color: #721c24; /* 深红色文本 */
    background-color: #f8d7da; /* 淡红色背景 */
    border: 1px solid #f5c6cb; /* 红色边框 */
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 500;
}
.error i { margin-right: 8px; }

/* 免责声明 */
.disclaimer {
    font-size: 0.9em;
    color: #856404; /* 深黄色文本 */
    text-align: center;
    margin-top: 45px;
    padding: 18px 25px;
    border: 1px solid #ffeeba; /* 浅黄色边框 */
    background-color: #fff3cd; /* 淡黄色背景 */
    border-radius: 8px;
    position: relative;
    line-height: 1.8;
}

.disclaimer strong {
    font-weight: 600;
}

.disclaimer .warning-icon {
    font-size: 1.1em;
    vertical-align: middle;
    margin-right: 8px;
    color: #856404;
}

/* 返回顶部按钮样式 */
#back-to-top {
    display: none; /* 默认隐藏 */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    border: none;
    outline: none;
    background-color: var(--heading-color); /* 使用主题色 */
    color: white;
    cursor: pointer;
    padding: 0; /* 移除内边距 */
    border-radius: 50%; /* 圆形 */
    font-size: 18px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    width: 50px; /* 固定宽度 */
    height: 50px; /* 固定高度 */
    text-align: center; /* 文本居中 */
    line-height: 50px; /* 使图标垂直居中 */
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
}

#back-to-top i {
    vertical-align: middle; /* 垂直对齐图标 */
}

#back-to-top:hover {
    background-color: var(--nav-primary-bg-darker);
    transform: translateY(-3px); /* 悬停时略微上浮 */
    box-shadow: 0 5px 12px rgba(0,0,0,0.3);
}

/* 移动端适配返回顶部按钮 */
@media screen and (max-width: 768px) {
    #back-to-top {
        bottom: 25px;
        right: 25px;
        width: 46px;
        height: 46px;
        line-height: 46px;
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
        line-height: 42px;
        font-size: 14px;
    }
}

/* 页脚 */
footer {
    text-align: center;
    padding: 25px 20px;
    margin-top: 50px;
    background-color: #e9ecef; /* 浅灰色背景 */
    color: #6c757d; /* 柔和的灰色文本 */
    font-size: 0.9em;
    border-top: 1px solid #dee2e6;
}

/* 响应式调整 - 平板和中等屏幕 */
@media (max-width: 768px) {
    .container {
        padding: 20px 25px;
        margin: 25px 15px; /* 调整外边距和内边距 */
    }
    h1 { font-size: 1.8rem; margin-bottom: 30px; }
    h1::after { width: 60px; height: 3px; }
}

/* 响应式调整 - 手机小屏幕 */
@media (max-width: 480px) {
    .container {
        padding: 15px 20px;
        margin: 20px 10px;
    }
    h1 { font-size: 1.6rem; }
    form {
        flex-direction: column; /* 表单项垂直排列 */
        gap: 12px;
        align-items: stretch; /* 拉伸以充满宽度 */
    }
    input[type="text"], button[type="submit"] {
        width: 100%; /* 全宽 */
        min-width: unset;
    }
    #result-display.show { padding: 20px; } /* Apply padding only when shown */
    .result-section h2 { font-size: 1.4em; margin-bottom: 20px; }
    .result-section p { font-size: 1em; }
    .result-section .value-highlight { font-size: 1.4em; }
    .reasons li {
        flex-direction: column; /* 评估依据项垂直排列 */
        align-items: flex-start;
        padding: 10px 15px;
    }
    .reasons li span.points {
         margin-left: 0;
         margin-top: 8px; /* 分数与描述上下排列 */
         align-self: flex-start;
    }
    .disclaimer { padding: 15px; font-size: 0.85em; }
    #back-to-top { bottom: 20px; right: 20px; } /* 移动端调整返回顶部按钮位置 */
    
    footer { font-size: 0.8em; padding: 20px 15px; }
}