:root {
    --primary: #2563eb;       /* 主题蓝 */
    --primary-hover: #1d4ed8;
    --bg-body: #f3f4f6;       /* 背景灰 */
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-sub: #6b7280;
    --danger: #ef4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* === Header 头部区域 === */
.site-header {
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 0 24px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
}

.brand svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

/* 导航按钮组 */
.nav-pills {
    display: flex;
    background: #f3f4f6;
    padding: 6px;
    border-radius: 12px;
    gap: 8px;
    border: 1px solid #e5e7eb;
}

.nav-item {
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    background: #e5e7eb;
    color: #111827;
}

/* 选中状态 */
.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.nav-item.active:hover {
    background: var(--primary-hover);
}

/* === Body 主体区域 === */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.action-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 540px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 32px;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-title {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    text-align: center;
}

/* 限制提示语 */
.limit-hint {
    text-align: center;
    color: var(--text-sub);
    font-size: 0.85rem;
    margin-bottom: 25px;
    background-color: #f9fafb;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.input-group { margin-bottom: 24px; }

textarea {
    width: 100%;
    height: 150px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    box-sizing: border-box;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
}

textarea:focus { border-color: var(--primary); }

.file-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
}

.file-dropzone:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

.file-icon { font-size: 2.5rem; margin-bottom: 10px; display: block; }
.file-text { color: var(--text-sub); }

.code-input {
    width: 100%;
    font-size: 2rem;
    text-align: center;
    letter-spacing: 0.5em;
    border: none;
    border-bottom: 3px solid #e5e7eb;
    padding: 10px;
    outline: none;
    background: transparent;
}
.code-input:focus { border-bottom-color: var(--primary); }

.btn-submit {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-submit:hover { background: var(--primary-hover); }
.btn-submit:disabled { background: #9ca3af; cursor: not-allowed; }

/* 结果展示区 */
.result-panel {
    margin-top: 24px;
    padding: 20px;
    background: #ecfdf5;
    border-radius: 12px;
    text-align: center;
    display: none;
}
.result-code {
    font-size: 2.5rem;
    font-weight: 800;
    color: #059669;
    margin: 10px 0;
    font-family: monospace;
}

/* === 社会化分享组件 (正方形 APP 图标风格) === */
.social-share-box {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #e5e7eb;
}

.social-title {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 15px; /* 间距微调 */
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px; /* 增加图标间距 */
}

.social-btn {
    width: 48px;  /* 稍微加大尺寸 */
    height: 48px;
    border-radius: 10px; /* 【核心修改】：正方形圆角 */
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08); /* 柔和阴影 */
    position: relative;
    overflow: hidden;
}

.social-btn:hover {
    transform: translateY(-3px); /* 悬停上浮 */
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.social-btn svg {
    width: 28px; /* 内部图标占比放大 */
    height: 28px;
    fill: currentColor;
}

/* 官方品牌色 (背景) */
/* 微信: #07C160 */
.btn-wechat { background: linear-gradient(135deg, #07c160 0%, #05a550 100%); }

/* QQ: #12B7F5 */
.btn-qq { background: linear-gradient(135deg, #12b7f5 0%, #0b9cd4 100%); }

/* 微博: #E6162D */
.btn-weibo { background: linear-gradient(135deg, #ea3a4e 0%, #d41429 100%); }

/* 复制: 深灰 */
.btn-copy { background: linear-gradient(135deg, #4b5563 0%, #374151 100%); }

/* 微信二维码弹层 */
#qrcode-container {
    padding: 10px;
    background: white;
    display: inline-block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #f0f0f0;
}

/* === Footer 底部区域 === */
.site-footer { margin-top: auto; }

.footer-warning {
    background: #fff1f2;
    color: #be123c;
    text-align: center;
    padding: 12px 20px;
    font-size: 0.9rem;
    border-top: 1px solid #ffe4e6;
}

.footer-info {
    background: #1f2937;
    color: #9ca3af;
    text-align: center;
    padding: 20px;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* === Modal 弹窗 === */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); 
    display: none; justify-content: center; align-items: center; z-index: 1000;
    backdrop-filter: blur(4px);
}
.modal-box {
    background: white; padding: 30px; border-radius: 16px; width: 90%; max-width: 360px; text-align: center;
}
.modal-btn {
    background: var(--primary); color: white; border: none; padding: 10px 30px; 
    border-radius: 20px; font-weight: bold; margin-top: 20px; cursor: pointer;
}
/* === 新增：友情链接区域样式 === */
.footer-links {
    background: #1f2937; /* 与底部信息背景一致 */
    color: #9ca3af;      /* 文字颜色 */
    text-align: center;
    padding: 15px 20px 5px 20px; /* 调整内边距 */
    font-size: 0.85rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;     /* 移动端自动换行 */
    gap: 8px;            /* 元素间距 */
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* 顶部增加一条微弱的分割线 */
}

.link-label {
    font-weight: 600;
    color: #d1d5db;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary); /* 悬停变亮蓝 */
    text-decoration: underline;
}

.footer-links .divider {
    color: #4b5563; /* 分隔符颜色变淡 */
    font-size: 0.8rem;
    margin: 0 4px;
}

/* 调整原有 footer-info 的顶部边距，让连接更紧密 */
.footer-info {
    padding-top: 10px; 
}
/* === 新增：中部快捷切换链接样式 === */
.quick-switch-box {
    margin-top: 16px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-sub);
    animation: fadeIn 0.5s ease;
}

.switch-link {
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    margin: 0 4px;
    position: relative;
    text-decoration: none;
    transition: all 0.2s;
}

.switch-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.switch-divider {
    color: #e5e7eb;
    margin: 0 4px;
}
/* === 新增：选项区域样式 === */
.options-group {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    color: var(--text-sub);
    transition: color 0.2s;
}

.checkbox-label:hover {
    color: var(--primary);
}

/* 隐藏原生 checkbox */
.checkbox-label input {
    display: none;
}

/* 自定义 checkbox 外观 */
.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s;
}

/* 选中状态 */
.checkbox-label input:checked + .custom-checkbox {
    background-color: var(--danger); /* 使用红色代表阅后即焚 */
    border-color: var(--danger);
}

/* 选中后的对勾 */
.checkbox-label input:checked + .custom-checkbox::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.label-text {
    font-weight: 500;
}