/* 基本重置和全局变量 */
:root {
    --primary-color: #00aaff;
    --bg-dark: #1a1a1a;
    --bg-light: #2c2c2c;
    --text-color: #f0f0f0;
    --text-muted: #aaa;
}

/* 滚动行为 */
html {
    scroll-behavior: smooth;
}

body {
    /*
     * =========================================
     * 修改全局字体 START 【在这里修改】
     * =========================================
     */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    /* =========================================
     * 修改全局字体 END
     * =========================================
     */
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* 导航栏 */
.navbar {
    background: var(--bg-light);
    padding: 0.5rem 0;
    border-bottom: 1px solid #444;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }

/* Logo区域样式 */
.logo-link { display: flex; align-items: center; text-decoration: none; }
.logo-image { height: 40px; /* 控制 Logo 图片高度 */ /* 移除了 margin-right */ border-radius: 0; width: auto; max-width: 150px; }
.logo-text { /* 这个选择器现在只在 HTML 中存在时才生效 */ font-size: 1.3rem; font-weight: bold; color: var(--text-color); }
.logo-link:hover .logo-text { color: var(--primary-color); } /* 如果有文字，悬停变色 */

.nav-links { display: flex; align-items: center; }
.nav-item { margin-left: 1.5rem; color: var(--text-color); font-weight: 500; transition: color 0.3s ease; }
.nav-item.active, .nav-item:hover { color: var(--primary-color); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 25px; height: 3px; background: var(--text-color); margin: 5px 0; transition: all 0.3s ease; }

/* 英雄区域 (轮播) */
.hero { height: 60vh; position: relative; overflow: hidden; display: flex; justify-content: center; align-items: center; text-align: center; color: #fff; }
.slider-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.5s ease-in-out; box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.6); }
.slide.active { opacity: 1; }
.hero-content { position: relative; z-index: 2; }
.hero-content h1 { font-size: 3rem; margin-bottom: 1rem; }
.hero-content p { font-size: 1.25rem; margin-bottom: 0; }

/* 通用内容区域 */
.content-section { padding: 4rem 0; }
.content-section.bg-light { background-color: var(--bg-light); }
.content-section h2 { font-size: 2.2rem; text-align: center; margin-top: 0; margin-bottom: 2.5rem; color: var(--text-color); }

/* 最新通知 */
.news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.news-card { background: var(--bg-light); border: 1px solid #444; border-radius: 8px; padding: 1.5rem; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.news-card h3 { font-size: 1.15rem; margin-top: 0; margin-bottom: 0.75rem; }
.news-card h3 a { color: var(--text-color); }
.news-card h3 a:hover { color: var(--primary-color); text-decoration: none; }
.news-preview { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; height: 4.05em; }
.news-date { font-size: 0.8rem; color: var(--primary-color); font-weight: 500; }

/* 实用工具 */
.tools-list { display: flex; justify-content: center; align-items: flex-start; flex-wrap: wrap; gap: 3rem; }
.tool-item { display: flex; flex-direction: column; align-items: center; color: var(--text-color); transition: transform 0.3s ease; }
.tool-item:hover { text-decoration: none; transform: scale(1.05); }
.tool-icon { width: 64px; height: 64px; margin-bottom: 1rem; }
.tool-item span { font-size: 1.1rem; font-weight: 500; transition: color 0.3s ease; }
.tool-item:hover span { color: var(--primary-color); }

/* 中继参数 */
.repeater-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.repeater-card { background: var(--bg-light); border: 1px solid #444; border-radius: 8px; padding: 1.5rem; }
.repeater-callsign { font-size: 1.5rem; color: var(--primary-color); margin-top: 0; margin-bottom: 1rem; border-bottom: 1px solid #555; padding-bottom: 0.5rem; }
.repeater-card p { margin: 0.6rem 0; font-size: 0.95rem; display: flex; }
.repeater-card p strong { color: var(--text-muted); min-width: 80px; display: inline-block; font-weight: 500; }

/* 新手入门 & 技术DIY */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.info-card { background: var(--bg-light); border: 1px solid #444; border-radius: 8px; padding: 2rem; text-align: center; display: flex; flex-direction: column; align-items: center; }
.info-icon { width: 50px; height: 50px; margin-bottom: 1.5rem; }
.info-card h3 { font-size: 1.5rem; color: var(--text-color); margin-top: 0; margin-bottom: 1rem; }
.info-card p { color: var(--text-muted); font-size: 0.95rem; flex-grow: 1; margin-bottom: 1.5rem; }
.info-link { font-weight: bold; color: var(--primary-color); }
.info-link:hover { text-decoration: none; filter: brightness(1.2); }

/* 爱好者风采 */
.showcase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.showcase-card { background: var(--bg-dark); border: 1px solid #444; border-radius: 8px; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.showcase-card a { display: block; color: var(--text-color); text-decoration: none; }
.showcase-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.showcase-img { width: 100%; height: 220px; object-fit: cover; display: block; border-bottom: 1px solid #444; }
.showcase-info { padding: 1.5rem; }
.showcase-info h3 { font-size: 1.3rem; margin-top: 0; margin-bottom: 0.5rem; color: var(--primary-color); }
.showcase-info p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.showcase-card a:hover h3 { text-decoration: underline; }

/* 友情链接 */
.links-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.link-item { background: var(--bg-dark); color: var(--text-color); padding: 0.8rem 1.5rem; border: 1px solid #444; border-radius: 5px; font-size: 1rem; font-weight: 500; transition: all 0.3s ease; }
.link-item:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); text-decoration: none; transform: scale(1.05); }

/* 关于我们 */
.about-section { text-align: center; }
.team-mission, .team-goal { font-size: 1.1rem; max-width: 700px; margin: 0.5rem auto; }
.team-mission strong { color: var(--primary-color); }

/* 页脚 */
.footer { background: #111; color: var(--text-muted); text-align: center; padding: 2rem 0; margin-top: 2rem; }


/* 用户区域 (桌面端) */
.desktop-user-area { margin-left: auto; padding-left: 1.5rem; display: flex; align-items: center; }
.user-link { margin: 0 0.5rem; color: var(--text-color); font-weight: 500; }
.user-link:hover { color: var(--primary-color); text-decoration: none; }
.separator { color: var(--text-muted); }
.mobile-user-area { display: none; /* 在桌面端隐藏菜单内的用户区域 */ }

/* 响应式设计 */
@media (max-width: 992px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .repeater-grid, .info-grid, .showcase-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* 手机端Logo文字隐藏 */
    .logo-text { display: none; }
    /* Logo图片右边距设为0 */
    .logo-image { margin-right: 0; }

    /* 手机端导航菜单核心样式 */
    .nav-links {
        display: none; flex-direction: column; width: 100%;
        background: var(--bg-light); position: absolute;
        top: 54px; left: 0;
        padding-top: 1rem; padding-bottom: 1rem; /* 调整底部 padding */
        border-top: 1px solid #444; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        align-items: center;
    }
    .nav-links.active { display: flex; }
    .nav-item { margin: 0.8rem 0; text-align: center; margin-left: 0; }

    .nav-toggle { display: block; margin-left: auto; }
    .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1rem; }
    .news-grid, .repeater-grid, .info-grid, .showcase-grid { grid-template-columns: 1fr; }
    .tools-list { gap: 1.5rem; justify-content: space-around; }
    .tool-item { flex-basis: 40%; }

    /* 手机端用户区域样式 */
    .desktop-user-area { display: none; /* 隐藏桌面版用户区 */ }
    .mobile-user-area {
        display: block; /* 在弹出菜单中显示 (JS会控制内部div的显示) */
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid #444;
        width: 100%; /* 宽度占满以便内部居中 */
        text-align: center;
    }
    .mobile-user-area #user-logged-out-mobile,
    .mobile-user-area #user-logged-in-mobile {
        display: flex; /* 使用 flex 布局 */
        flex-direction: row; /* 水平排列 */
        justify-content: center; /* 水平居中 */
        align-items: center; /* 垂直居中 */
    }
    .mobile-user-area .user-link {
        margin: 0 0.5rem; /* 左右间距 */
    }
    .mobile-user-area .separator {
        display: inline; /* 显示分隔符 */
        margin: 0 0.2rem;
    }
}

/* 动画效果 */
@keyframes pulse { /* ... */ }
.hero .cta-button { animation: none; }

.fade-in-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* ... (交错延迟动画不变) ... */
.hero-content h1.is-visible { transition-delay: 0.1s; }
.news-card.is-visible:nth-child(1) { transition-delay: 0.1s; }
.news-card.is-visible:nth-child(2) { transition-delay: 0.2s; }
.news-card.is-visible:nth-child(3) { transition-delay: 0.3s; }
.news-card.is-visible:nth-child(4) { transition-delay: 0.4s; }
.tool-item.is-visible:nth-child(1) { transition-delay: 0.1s; }
.tool-item.is-visible:nth-child(2) { transition-delay: 0.2s; }
.tool-item.is-visible:nth-child(3) { transition-delay: 0.3s; }
.info-card.is-visible:nth-child(1) { transition-delay: 0.1s; }
.info-card.is-visible:nth-child(2) { transition-delay: 0.2s; }
.info-card.is-visible:nth-child(3) { transition-delay: 0.3s; }
.repeater-card.is-visible:nth-child(1) { transition-delay: 0.1s; }
.repeater-card.is-visible:nth-child(2) { transition-delay: 0.2s; }
.repeater-card.is-visible:nth-child(3) { transition-delay: 0.3s; }
.showcase-card.is-visible:nth-child(1) { transition-delay: 0.1s; }
.showcase-card.is-visible:nth-child(2) { transition-delay: 0.2s; }
.showcase-card.is-visible:nth-child(3) { transition-delay: 0.3s; }
.link-item.is-visible:nth-child(1) { transition-delay: 0.1s; }
.link-item.is-visible:nth-child(2) { transition-delay: 0.15s; }
.link-item.is-visible:nth-child(3) { transition-delay: 0.2s; }
.link-item.is-visible:nth-child(4) { transition-delay: 0.25s; }
.link-item.is-visible:nth-child(5) { transition-delay: 0.3s; }
.link-item.is-visible:nth-child(6) { transition-delay: 0.35s; }
.team-mission.is-visible { transition-delay: 0.1s; }
.team-goal.is-visible { transition-delay: 0.2s; }

/* 打字效果 */
.typing-container { position: relative; min-height: 1.25em; }
.typing-container::after { content: '|'; display: inline-block; animation: blink-caret 0.75s step-end infinite; color: var(--primary-color); font-weight: bold; margin-left: 2px; }
@keyframes blink-caret { from, to { opacity: 1; } 50% { opacity: 0; } }