/* public/static/css/agreement_theme.css */

:root {
    /* 主题色 - 金色系 (#dba231) */
    --primary: #dba231;
    --primary-dark: #b88622;
    --primary-light: #fdf5e6;
    
    /* 文字颜色 */
    --text-main: #1f2937;
    --text-sub: #4b5563;
    --text-muted: #9ca3af;
    
    /* 背景色 */
    --bg-body: #f9fafb;
    --bg-card: #ffffff;
    --bg-nav: #ffffff;
    --bg-nav-active: #fffbef;
    
    /* 边框与辅助色 */
    --border-color: #e5e7eb;
    
    /* 侧边栏宽度 */
    --sidebar-width: 280px;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    background: var(--bg-body); 
    color: var(--text-main); 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; 
    -webkit-font-smoothing: antialiased; 
    line-height: 1.8;
}

/* 链接样式 */
a { 
    color: var(--primary); 
    text-decoration: none; 
    transition: all 0.2s ease; 
}
a:hover { 
    color: var(--primary-dark); 
}

/* ============ 顶部导航栏 ============ */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}
.top-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.top-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
}
.top-nav-brand:hover { color: var(--primary); }
.top-nav-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}
.top-nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}
.top-nav-link {
    padding: 8px 18px;
    font-size: 15px;
    color: var(--text-sub);
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
}
.top-nav-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}
.top-nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 500;
}
.top-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.top-nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s;
}

@media (max-width: 600px) {
    .top-nav-inner { padding: 0 16px; }
    .top-nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
        gap: 0;
    }
    .top-nav-inner.open .top-nav-links { display: flex; }
    .top-nav-link {
        padding: 14px 24px;
        border-radius: 0;
        width: 100%;
    }
    .top-nav-toggle { display: flex; }
    .top-nav-inner.open .top-nav-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .top-nav-inner.open .top-nav-toggle span:nth-child(2) { opacity: 0; }
    .top-nav-inner.open .top-nav-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    .top-nav-brand span { font-size: 16px; }
}

/* 顶部 Hero 横幅区 */
.hero {
    position: relative;
    background: linear-gradient(135deg, #b88622, #dba231);
    color: white;
    padding: 60px 40px 80px;
    text-align: center;
    overflow: hidden;
}

/* 丰富背景纹理 */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(circle at 15% 30%, rgba(255,255,255,0.15), transparent 50%),
        radial-gradient(circle at 85% 70%, rgba(255,255,255,0.1), transparent 50%),
        url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.hero p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
}

/* 纯 CSS 盾牌图标 */
.shield-icon {
    position: relative;
    width: 60px;
    height: 70px;
    margin: 0 auto 20px;
    background: var(--primary-light);
    border: 2px solid var(--primary);
    border-radius: 4px 4px 30px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(219, 162, 49, 0.2);
    z-index: 1;
}
.shield-icon::after {
    content: '';
    width: 20px;
    height: 12px;
    border-bottom: 3px solid var(--primary);
    border-right: 3px solid var(--primary);
    transform: rotate(45deg) translate(-2px, -4px);
}

/* 全屏布局公共样式 */
.fullscreen-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 左侧固定侧边栏 (适用于隐私政策等需要目录的页面) */
.sidebar-nav {
    width: var(--sidebar-width);
    background: var(--bg-nav);
    color: var(--text-main);
    position: fixed;
    top: 60px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 8px rgba(0,0,0,0.04);
}

.sidebar-header {
    padding: 30px 24px;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}
.sidebar-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    list-style: none;
}
.sidebar-menu li a {
    display: block;
    padding: 12px 24px;
    color: var(--text-sub);
    font-size: 15px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.sidebar-menu li a:hover {
    background: #f8fafc;
    color: var(--primary-dark);
}
.sidebar-menu li a.active {
    background: var(--bg-nav-active);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 500;
}

/* 右侧内容区 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width); /* 预留给侧边栏，如果页面没有侧边栏可覆盖 */
    background: var(--bg-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.main-content.no-sidebar {
    margin-left: 0;
}

/* 文本阅读卡片区 */
.article-container {
    max-width: 900px;
    margin: 40px auto 60px;
    padding: 60px 80px;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.03);
    /* 限制最大阅读宽度，避免太长导致眼睛疲劳 */
}

/* 文本排版增强 */
.article-container h2 {
    font-size: 24px; 
    color: #111; 
    margin: 50px 0 24px; 
    padding-left: 16px; 
    position: relative;
    font-weight: 600;
}
.article-container h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 22px;
    background: var(--primary);
    border-radius: 4px;
}
.article-container h3 { 
    font-size: 18px; 
    color: #222; 
    margin: 32px 0 16px; 
    font-weight: 600; 
}
.article-container p { 
    font-size: 16px; 
    margin-bottom: 18px; 
    color: var(--text-sub); 
    line-height: 1.9;
}
.article-container ul, .article-container ol { 
    padding-left: 24px; 
    margin-bottom: 18px; 
}
.article-container li { 
    font-size: 16px; 
    color: var(--text-sub); 
    margin-bottom: 8px; 
    line-height: 1.8;
}

/* 高亮区块 */
.highlight-box {
    background: #f8fafc; 
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: 6px; 
    padding: 24px; 
    margin: 28px 0; 
}
.highlight-box p { margin-bottom: 10px; }
.highlight-box p:last-child { margin-bottom: 0; }
.highlight-box strong { color: #111; }

/* 底部 Footer */
.global-footer {
    margin-top: auto;
    padding: 50px 40px;
    background: #fff;
    border-top: 1px solid var(--border-color);
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}
.footer-main {
    text-align: left;
}
.footer-links {
    margin-bottom: 16px;
}
.footer-links a {
    color: var(--text-sub);
    margin: 0 24px 0 0;
    font-size: 15px;
    position: relative;
    display: inline-block;
}
.footer-links a:hover {
    color: var(--primary);
}
.footer-links a:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -13px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 12px;
    background: var(--border-color);
}
.footer-info p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 6px;
    line-height: 1.5;
}
.footer-info a {
    color: var(--text-muted);
}
.footer-info a:hover {
    color: var(--primary);
}
.footer-qrcode-sec {
    text-align: center;
}
.footer-qrcode-sec img {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 4px;
    background: #fff;
    display: block;
    margin: 0 auto 8px;
    object-fit: contain;
}
.footer-qrcode-sec span {
    font-size: 13px;
    color: var(--text-muted);
}

/* 侧边悬浮工具栏 */
.side-widget {
    position: fixed;
    right: 30px;
    bottom: 100px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.widget-item {
    width: 54px;
    height: 54px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s;
    overflow: hidden;
    position: relative;
}
.widget-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: var(--primary);
    color: var(--primary);
}
.widget-icon {
    font-size: 20px;
    line-height: 1;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.widget-item svg {
    width: 28px;
    height: 28px;
    /* transition: all 0.3s; */
}
.widget-text {
    position: absolute;
    bottom: -20px;
    font-size: 11px;
    line-height: 1.3;
    opacity: 0;
    transition: all 0.3s;
    font-weight: 500;
    text-align: center;
}
.widget-item:hover .widget-icon {
    transform: translateY(-12px);
    opacity: 0;
}
.widget-item:hover .widget-text {
    bottom: 8px;
    opacity: 1;
}

.content-disclaimer {
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 24px 30px;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.8;
    text-align: center;
    position: relative;
    z-index: 10;
}
.content-disclaimer strong {
    color: var(--text-sub);
    font-weight: 600;
    margin-right: 4px;
}

.beian-icon {
    display: inline-block;
    vertical-align: middle;
    margin: -3px 4px 0 0;
    width: 14px;
    height: 14px;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .article-container { padding: 40px 50px; margin: 30px 20px 50px; max-width: none; }
}

@media (max-width: 900px) {
    .sidebar-nav { display: none; }
    .main-content { margin-left: 0; }
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .footer-main { text-align: center; }
}

@media (max-width: 600px) {
    .hero { padding: 40px 20px 60px; }
    .hero h1 { font-size: 28px; }
    .article-container { padding: 30px 20px; margin: 20px 16px 40px; border-radius: 8px; }
    .article-container h2 { font-size: 20px; margin-top: 40px; }
    .article-container p, .article-container li { font-size: 15px; }
    .footer-links a { font-size: 14px; margin: 0 10px; }
    .footer-links a:not(:last-child)::after { display: none; }
    .side-widget { right: 16px; bottom: 80px; transform: scale(0.9); }
}
