/* Voting 首页样式
 * 简洁风格：灰白背景、黑色文字
 */

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

body {
    /* 中文用仿宋 GB2312，英文用 Times New Roman */
    font-family: "Times New Roman", "仿宋 GB2312", "FangSong", "STFangsong",
        serif;
    background-color: #f5f5f5; /* 灰白背景 */
    color: #000000; /* 黑色文字 */
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ---- 顶部栏 ---- */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* 左：品牌，右：管理员入口 */
    padding: 0 28px;
    background: transparent;
    z-index: 10;
}

/* 左上角：图标 + 系统名 */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #000000;
}

.brand__logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.brand__title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* ---- 管理员入口：鼠标移到右上角区域才显示 ---- */
.admin-zone {
    display: flex;
    align-items: center;
}

.admin-entry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    font-size: 14px;
    color: #333333;
    text-decoration: none;
    border: 1px solid #d9d9d9;
    border-radius: 20px;
    background-color: #ffffff;
    /* 默认隐藏：鼠标移到右上角区域（.admin-zone）时才显示 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

/* 鼠标移动到右上角区域时，显示管理员入口 */
.admin-zone:hover .admin-entry {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-entry__icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #333333;
}

.admin-entry:hover {
    color: #000000;
    border-color: #000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ---- 首页主视觉：居中 slogan ---- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.slogan {
    font-size: clamp(28px, 5vw, 64px);
    font-weight: 600;
    letter-spacing: 2px;
    line-height: 1.4;
    text-align: center;
    color: #000000;
    min-height: 1.4em; /* 预留高度，避免打字时布局抖动 */
}

/* 打字机光标 */
.caret {
    display: inline-block;
    width: 3px;
    height: 1em;
    margin-left: 4px;
    vertical-align: -0.1em;
    background-color: #000000;
    animation: blink 0.9s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ---- 认证页（登录 / 后台）通用卡片 ---- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    padding: 36px 32px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.auth-logo {
    width: 40px;
    height: 40px;
}

.auth-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #000000;
}

/* 提示信息 */
.flash-messages {
    margin-bottom: 16px;
}

.flash {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 8px;
}

.flash-error {
    background-color: #fdecec;
    color: #a33;
    border: 1px solid #f0c0c0;
}

.flash-success {
    background-color: #ecf9ef;
    color: #2c7a3f;
    border: 1px solid #c6e6cf;
}

/* 表单 */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field__label {
    font-size: 14px;
    color: #000000;
}

.field__input {
    padding: 10px 12px;
    font-size: 15px;
    font-family: inherit;
    color: #000000;
    background-color: #fafafa;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field__input:focus {
    border-color: #000000;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    font-size: 15px;
    font-family: inherit;
    letter-spacing: 2px;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #000000;
    color: #ffffff;
    border: 1px solid #000000;
}

.btn-primary:hover {
    background-color: #333333;
}

.btn-ghost {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #d9d9d9;
}

.btn-ghost:hover {
    border-color: #000000;
}

/* 后台页信息与操作区 */
.auth-info {
    margin: 8px 0 24px;
    text-align: center;
    font-size: 15px;
    line-height: 1.8;
}

.auth-info__sub {
    font-size: 13px;
    color: #666666;
}

.auth-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.auth-foot {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.auth-foot a {
    color: #000000;
    text-decoration: none;
    border-bottom: 1px solid #d9d9d9;
}

.auth-foot a:hover {
    border-bottom-color: #000000;
}

/* 首页底部备案信息 */
.site-footer{position:fixed;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center;gap:24px;padding:14px 20px;background:#fafafa;border-top:1px solid #eaeaea;font-family:"FangSong","FangSong GB2312","Times New Roman",serif;font-size:13px;color:#555;}
.footer-brand{color:#333;}
.beian-link{color:#555;text-decoration:none;}
.beian-link:hover{color:#000;text-decoration:underline;}
/* 首页底部「用户使用手册」入口（位于站点标题与备案号之间，样式与备案链接一致） */
.guide-link{color:#555;text-decoration:none;}
.guide-link:hover{color:#000;text-decoration:underline;}

/* ---- 用户使用手册页 ---- */
.guide-page{min-height:100vh;padding:96px 20px 60px;}
.guide-shell{max-width:860px;margin:0 auto;}
.guide-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:18px;border-bottom:1px solid #e0e0e0;margin-bottom:28px;}
.guide-title{font-size:30px;font-weight:600;letter-spacing:2px;color:#000;}
.guide-back{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;font-size:14px;color:#333;text-decoration:none;border:1px solid #d9d9d9;border-radius:6px;background:#fff;}
.guide-back:hover{color:#000;border-color:#000;}
.guide-toc{background:#fff;border:1px solid #e0e0e0;border-radius:10px;padding:20px 24px;margin-bottom:28px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:28px;row-gap:2px;}
.guide-toc b{grid-column:1/-1;font-size:15px;margin-bottom:10px;}
.guide-toc a{color:#333;text-decoration:none;font-size:14px;line-height:2.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.guide-toc a:hover{color:#000;text-decoration:underline;}
@media (max-width:600px){.guide-toc{grid-template-columns:1fr;}}
.guide-section{background:#fff;border:1px solid #e0e0e0;border-radius:10px;padding:24px 28px;margin-bottom:22px;}
.guide-section h2{font-size:20px;font-weight:600;color:#000;margin-bottom:8px;letter-spacing:1px;}
.guide-section h3{font-size:16px;font-weight:600;color:#000;margin:18px 0 8px;}
.guide-section p{font-size:14px;line-height:1.9;color:#000;margin:6px 0;}
.guide-section ol,.guide-section ul{margin:6px 0 6px 24px;line-height:1.9;font-size:14px;color:#000;}
.guide-section li{margin:4px 0;}
.guide-section code{background:#f5f5f5;border:1px solid #e6e6e6;border-radius:4px;padding:1px 6px;font-size:13px;}
.guide-note{background:#fbf7ec;border-left:4px solid #d9a52a;padding:10px 14px;border-radius:0 6px 6px 0;margin:10px 0;font-size:13px;line-height:1.7;color:#5a4a16;}
.guide-table{width:100%;border-collapse:collapse;margin:10px 0;font-size:14px;}
.guide-table th,.guide-table td{border:1px solid #e0e0e0;padding:8px 12px;text-align:left;line-height:1.7;}
.guide-table th{background:#fafafa;font-weight:600;color:#000;}
.guide-foot{text-align:center;font-size:13px;color:#666;margin-top:30px;}
