/* 全局样式 */
:root {
    --primary-color: #00f2ff;
    --secondary-color: #0077ff;
    --bg-color: #0a0a12;
    --card-bg: #161625;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 导航栏 */
nav {
    background-color: rgba(10, 10, 18, 0.95);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-weight: bold;
    margin: 0;
    line-height: 1;
}

.logo img {
    display: block;
    max-height: 55px;
    height: auto;
    width: auto;
}

nav ul {
    display: flex;
    gap: 24px;
    align-items: center;
}

nav ul li a {
    display: inline-block;
    padding: 10px 12px;
    border-radius: 0px;
    color: var(--text-color);
    transition: color 0.2s, background-color 0.2s;
    font-weight: 500;
}

nav ul li a:hover {
    color: #fff;
    background-color: rgba(0, 242, 255, 0.08);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 242, 255, 0.4);
}

/* 欢迎区域 (Hero) */
header {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('https://pic.616pic.com/bg_w1180/00/05/72/Esezv9JbQk.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    padding-top: 60px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 10, 18, 0.9) 0%, rgba(10, 10, 18, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--heading-color);
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    color: #ddd;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-text {
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.3s;
}

.delay-2 {
    animation-delay: 0.6s;
}

/* 通用部分样式 */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--heading-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* 服务选项 */
#services {
    background-color: var(--bg-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid #333;
    transition: transform 0.3s, border-color 0.3s;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.icon-box {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.service-card:hover .icon-box {
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* 精选作品 */
#works {
    background-color: var(--bg-color);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.work-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s;
}

.work-card:hover {
    transform: scale(1.03);
}

.work-image {
    height: 200px;
    overflow: hidden;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.work-card:hover .work-image img {
    transform: scale(1.1);
}

.work-card h3, .work-card p {
    padding: 0 20px;
}

.work-card h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--heading-color);
}

.work-card p {
    margin-bottom: 20px;
    color: #888;
}

/* 反馈表格 */
#feedback {
    background-color: var(--bg-color);
}

.feedback-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--heading-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: #0a0a12;
    border: 1px solid #333;
    border-radius: 5px;
    color: var(--text-color);
    font-size: 16px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-submit {
    width: 100%;
}

/* 页脚 */
footer {
    background-color: var(--bg-color); /* 统一背景色 */
    padding: 60px 0 20px;
    border-top: 1px solid #222;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-column p {
    color: #888;
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-column ul li {
    color: #888;
}

.footer-column ul li a {
    color: #888;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #222;
    color: #555;
    font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.5rem; }
    .section-title { font-size: 2rem; }

    /* 移动端导航：汉堡按钮 + 下拉菜单 */
    nav .container { justify-content: space-between; }
    .nav-toggle-label { display: block !important; cursor: pointer; padding: 8px 12px; border: 1px solid #333; border-radius: 8px; color: var(--text-color); z-index: 1001; }
    .nav-toggle-label .bar { display: block; width: 22px; height: 2px; background: #888; margin: 4px 0; }

    /* 默认隐藏菜单，点击后显示（带动画） */
    nav ul { display: none; position: absolute; top: 60px; left: 0; right: 0; background-color: rgba(10,10,18,0.98); flex-direction: column; gap: 0; border-top: 1px solid #222; opacity: 0; transform: translateY(-8px); max-height: 0; overflow: hidden; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.35s ease; z-index: 1000; }
    /* 仅顶层链接初始隐藏用于入场动画；子菜单链接保持可见 */
    nav ul > li > a { display: block; padding: 14px 20px; border-bottom: 1px solid #121224; opacity: 0; transform: translateY(-6px); }
    /* 子菜单在手机端不再使用折叠动画，始终展开以避免点击问题 */
    nav ul li.has-sub .submenu { opacity: 1; max-height: none; overflow: visible; }
    nav ul li.has-sub .submenu li a { opacity: 1; transform: none; }

    #nav-toggle:checked ~ ul { display: flex; opacity: 1; transform: translateY(0); max-height: 80vh; pointer-events: auto; overflow-y: auto; z-index: 1002; }
    #nav-toggle:checked ~ .nav-toggle-label { pointer-events: none; }
    /* 仅顶层链接执行入场动画 */
    #nav-toggle:checked ~ ul > li > a { animation: slideFade 0.28s ease forwards; }
    #nav-toggle:checked ~ ul > li:nth-child(1) > a { animation-delay: 0.02s; }
    #nav-toggle:checked ~ ul > li:nth-child(2) > a { animation-delay: 0.06s; }
    #nav-toggle:checked ~ ul > li:nth-child(3) > a { animation-delay: 0.10s; }
    #nav-toggle:checked ~ ul > li:nth-child(4) > a { animation-delay: 0.14s; }
    #nav-toggle:checked ~ ul > li:nth-child(5) > a { animation-delay: 0.18s; }
    /* 子菜单不再依赖 checkbox 展开，避免移动端点击被拦截 */
}

/* 桌面端默认隐藏切换器 */
#nav-toggle { display: none; }
.nav-toggle-label { display: none; }

@keyframes slideFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 导航栏激活状态 */
nav ul li a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* 顶部导航子菜单（统一样式） */
nav ul li.has-sub { position: relative; }
nav ul li.has-sub .sub-toggle { display: none; }
nav ul li.has-sub .sub-label { display: block; padding: 14px 0; color: var(--text-color); cursor: pointer; }
nav ul li.has-sub .sub-label::after { content: '▾'; margin-left: 8px; color: #888; font-size: 0.8rem; }
nav ul li.has-sub .submenu { display: none; position: absolute; top: 48px; left: 0; min-width: 200px; background-color: rgba(10,10,18,0.98); border: 1px solid #222; border-radius: 10px; box-shadow: 0 8px 20px rgba(0,0,0,0.4); padding: 6px; }
nav ul li.has-sub .submenu li a { display: block; padding: 10px 14px; border-radius: 8px; }
nav ul li.has-sub .submenu li a:hover { background-color: rgba(0, 242, 255, 0.08); }
nav ul li.has-sub:hover .submenu { display: block; }

@media (max-width: 768px) {
  nav ul li.has-sub .submenu { position: static; border-top: 1px solid #121224; border-radius: 0; box-shadow: none; padding: 0; display: block; }
  nav ul li.has-sub .sub-label { padding: 14px 20px; }
}

/* 重复子菜单样式已移除 */

/* 嵌入测速容器 */
.embed-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    height: 600px;
    background-color: var(--card-bg);
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.embed-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #0d0d14;
}

.embed-note {
    text-align: center;
    color: #888;
    font-size: 0.95rem;
    margin-top: 16px;
}

@media (max-width: 600px) {
    .embed-container {
        height: 75vh;
    }
}

/* 关于我们页面 */
.about-section {
    padding-top: 120px; /* 固定导航栏预留空间 */
    background-color: var(--bg-color);
}

/* 时间线 */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto 40px;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    width: 2px;
    height: 100%;
    background: #222;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-marker {
    position: absolute;
    left: 6px;
    top: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.5);
}

.timeline-content {
    background-color: var(--card-bg);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 18px 20px;
}

.timeline-content h3 {
    color: var(--heading-color);
    margin-bottom: 8px;
}

.timeline-content .year {
    display: block;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* 监管信息卡片 */
.compliance-card {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-bg);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 24px;
}

.compliance-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.compliance-card p {
    color: #888;
}

/* 软件下载页辅助样式 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #1b1b2d;
    border: 1px solid #333;
    color: #9adcf0;
    font-size: 0.85rem;
}

.download-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.download-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.download-actions .btn i { font-size: 1.1rem; }

.story-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto 40px;
}
.story-article {
    background-color: var(--card-bg);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 24px;
    color: #cfcfcf;
    line-height: 1.9;
}
.story-article p + p { margin-top: 1em; }
.story-aside .logo-card {
    background-color: var(--card-bg);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.logo-card img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.5));
}
.logo-caption {
    color: #888;
    font-size: 0.9rem;
    margin-top: 8px;
}
@media (max-width: 900px) {
    .story-grid { grid-template-columns: 1fr; }
    .story-aside { order: -1; margin-bottom: 20px; }
}

/* 导航栏激活状态 */
nav ul li a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* 网络测速页面样式 */
.speed-test-section {
    padding-top: 120px;
    background-color: var(--bg-color);
    min-height: 80vh;
}

.speed-meter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.meter-wrap {
    position: relative;
    width: 250px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.meter-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 10px solid #222;
    border-top-color: var(--primary-color);
    border-right-color: var(--secondary-color);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
    animation: spin 1s linear infinite;
    animation-play-state: paused; /* 默认暂停 */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.meter-circle {
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 200px;
    background-color: var(--card-bg);
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.meter-value {
    font-size: 3.5rem;
    font-weight: bold;
    color: #fff;
    line-height: 1;
}

.meter-unit {
    font-size: 1rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.meter-label {
    font-size: 0.9rem;
    color: #888;
    margin-top: 5px;
}

/* CSS Hack: 使用 checkbox 控制动画 */
#start-toggle:checked ~ .speed-meter-container .meter-wrap .meter-ring {
    animation-play-state: running;
}

/* 按钮样式调整 */
.btn-large {
    padding: 15px 50px;
    font-size: 1.2rem;
    display: inline-block;
    cursor: pointer;
}

/* 结果展示区 */
.results-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.result-item {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #333;
    transition: transform 0.3s, border-color 0.3s;
}

.result-item:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

.result-icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.result-label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 5px;
}

.result-val {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

/* 响应式 */
@media (max-width: 600px) {
    .results-display {
        grid-template-columns: 1fr;
    }
}

/* 导航栏激活状态 */
nav ul li a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* 网络测速页面样式 */
.speed-test-section {
    padding-top: 120px; /* 为固定导航栏留出空间 */
    background-color: var(--bg-color);
    min-height: 80vh;
}

.speed-meter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.meter-wrap {
    position: relative;
    width: 250px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.meter-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 10px solid #222;
    border-top-color: var(--primary-color);
    border-right-color: var(--secondary-color);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
    animation: spin 2s linear infinite;
    /* 默认不转动，测速时可以添加类名让其转动，这里为了展示效果先加上 */
    animation-play-state: paused; 
}

/* 模拟测速时的动画类 */
.meter-ring.testing {
    animation-play-state: running;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.meter-circle {
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 200px;
    background-color: var(--card-bg);
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.meter-value {
    font-size: 3.5rem;
    font-weight: bold;
    color: #fff;
    line-height: 1;
}

.meter-unit {
    font-size: 1rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.meter-label {
    font-size: 0.9rem;
    color: #888;
    margin-top: 5px;
}

.btn-large {
    padding: 15px 50px;
    font-size: 1.2rem;
}

.results-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.result-item {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #333;
    transition: transform 0.3s, border-color 0.3s;
}

.result-item:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

.result-icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.result-label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 5px;
}

.result-val {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

/* 响应式调整 for Speed Test */
@media (max-width: 600px) {
    .results-display {
        grid-template-columns: 1fr;
    }
}

/* 导航栏激活状态 */
nav ul li a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* 网络测速页面样式 */
.speed-test-section {
    padding-top: 120px;
    background-color: var(--bg-color);
    min-height: 80vh;
}

.speed-meter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.meter-wrap {
    position: relative;
    width: 250px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.meter-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 10px solid #222;
    border-top-color: var(--primary-color);
    border-right-color: var(--secondary-color);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
    animation: spin 1s linear infinite;
    animation-play-state: paused; /* 默认暂停 */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.meter-circle {
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 200px;
    background-color: var(--card-bg);
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.meter-value {
    font-size: 3.5rem;
    font-weight: bold;
    color: #fff;
    line-height: 1;
}

.meter-unit {
    font-size: 1rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.meter-label {
    font-size: 0.9rem;
    color: #888;
    margin-top: 5px;
}

/* CSS Hack: 使用 checkbox 控制动画 */
#start-toggle:checked ~ .speed-meter-container .meter-wrap .meter-ring {
    animation-play-state: running;
}

/* 按钮样式调整 */
.btn-large {
    padding: 15px 50px;
    font-size: 1.2rem;
    display: inline-block;
    cursor: pointer;
}

/* 结果展示区 */
.results-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.result-item {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #333;
    transition: transform 0.3s, border-color 0.3s;
}

.result-item:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

.result-icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.result-label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 5px;
}

.result-val {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

/* 响应式 */
@media (max-width: 600px) {
    .results-display {
        grid-template-columns: 1fr;
    }
}
