/* 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 基础字体大小控制 - 使用vw实现自动缩放 */
html {
    font-size: 1vw;  /* 基础字体随视口宽度缩放 */
}

body {
    font-family: 宋体, sans-serif;
    line-height: 1.6;
    color: #0b0a0a;
    display: block;     /* 改为block，避免inline-block引起的宽度问题 */
    width: 100%;
    overflow-x: hidden;
}

.app-container {
    background-color: #1970c2d6;
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, auto);
    grid-template-areas: 
        "header"
        "content"
        "link"
        "footer";
}

/* 分配容器空间 */
.header-section {
    grid-area: header;
    position: relative;
    width: 100%;
    min-height: 30vw;   /* 相对高度，随屏幕缩放 */
}

/* 公司标题 - 移除固定宽度，使用相对单位 */
.company-header {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 15%;
    left: 12%;
    width: auto;
    min-width: auto;     /* 移除固定最小宽度 */
    max-width: 80%;
}

.company-title {
    font-size: 2.5vw;    /* 相对字体大小 */
    font-weight: bold;
    margin-bottom: 0.2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    color: rgb(248, 251, 250);
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    width: auto;
    display: inline-block;
}

.company-subtitle {
    font-size: 1.45vw;    /* 相对字体大小 */
    font-family: 仿宋;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    color: rgb(248, 251, 250);
    white-space: nowrap;
    overflow: visible;
    width: auto;
    display: inline-block;
}

.slogan-container {
    position: absolute;
    top: 60%;
    left: 52%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 80%;
    max-width: 600px;
    z-index: 2;
}

.slogan-text {
    white-space: pre-wrap;
    font-size: 1vw;    /* 相对字体大小 */
    font-family: 仿宋;
    font-weight: bold;
    color: #aee9e9;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
}

/* 动态文字字符样式 */
.char {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.3s ease;
    display: inline-block;
}

/* 导航栏样式 */
.main-nav {
    background: rgba(75, 101, 167, 0.7);
    width: 100%;
    height: 2.5vw;         /* 相对高度 */
    position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 80%;
    max-width: 60%;
    min-width: auto;     /* 移除最小宽度限制 */
    justify-content: center;
    align-items: center;
}

.nav-list li {
    flex: 1;
    min-width: auto;     /* 移除最小宽度限制 */
}

.nav-link {
    display: flex;           /* 改为 flex */
    align-items: center;     /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    text-align: center;
    color: white;
    text-decoration: none;
    font-size: 1.3vw;
    padding: 0 3.5vw;
    border-radius: 0;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0);
    height: 2.5vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 10;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #cc0b35a4;
}

.nav-link.active {
    background: rgba(30, 120, 90, 0.55);
    color: #7fff7a;
    box-shadow: inset 0 -3px 0 rgba(120, 255, 140, 0.85);
}

.user-area {
    display: flex;
    align-items: center;
    gap: 1vw;
    position: absolute;
    right: 3%;
    z-index: 11;
    display: flex;           /* 改为 flex */
    align-items: center;     /* 垂直居中 */
    justify-content: center; /* 水平居中 */
}

.current-user {
    font-size: 0.7vw;    /* 相对字体大小 */
    font-weight: bold;
    white-space: nowrap;
    color: white;
}

.user-dropdown {
    position: relative;
}

.user-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.6vw 1vw;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7vw;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(14, 96, 172, 0.95);
    min-width: 10vw;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: none;
    z-index: 100;
}

.user-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 0.8vw 1.2vw;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.8vw;
}

.dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.2);
}

canvas {
    display: block;      /* 改为block */
    position: absolute;
    width: 20%;
    height: 100%;
    left: 0;
    background-color: #00010200;
}
/* 友情链接区域 */
.links-section {
    grid-area: link;
    width: 100%;
    padding: 1vw 5% 2vw 5%;
    position: relative;
    /* 关键：顶部透明，向下逐渐过渡到半透明科技蓝 */
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(0, 100, 150, 0.4) 40%,
        rgba(0, 70, 110, 0.7) 100%
    );
    backdrop-filter: blur(4px);
    border-top: none;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.02), 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* 标题样式 */
.links-title {
    color: #e0f5ff;
    font-size: .8vw;
    margin-bottom: 1.5vw;
    font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    font-weight: 600;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff, #0cf);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 0 8px rgba(0,200,255,0.3);
    position: relative;
    z-index: 2;
}

/* 链接网格 */
.links-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5vw;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* 每个链接卡片 */
.link-item {
    background: rgba(10, 30, 50, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 1.2vw;
    border: 1px solid rgba(0, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    text-align: center;
    padding: 1.2vw 0.5vw;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* 悬浮扫描光效 */
.link-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.link-item:hover::before {
    left: 100%;
}

.link-item:hover {
    background: rgba(20, 60, 90, 0.7);
    border-color: cyan;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 255, 255, 0.5) inset;
}

/* 链接样式 */
.link-item a {
    color: #d4f4ff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.6vw;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    font-family: 'Inter', system-ui, sans-serif;
}

.link-item a::before {
    content: "🌐";
    font-size: 0.9vw;
    color: cyan;
    transition: transform 0.2s;
    filter: drop-shadow(0 0 2px cyan);
}

.link-item:hover a::before {
    transform: translateX(3px);
}

.link-item a:hover {
    color: white;
    text-shadow: 0 0 5px cyan;
}
/* 页脚 */
.footer {
    grid-area: footer;
    background: #0f568546;
    color: #fff;
    text-align: center;
    padding: 10px 16px 12px;
    width: 100%;
    min-height: 40px;
    line-height: 1.7;
    font-size: 13px;
    overflow: visible;
    flex-shrink: 0;
}
.footer p {
    margin: 0;
    padding: 0;
    color: #fff;
}
.footer-copy {
    white-space: normal;
    word-break: keep-all;
}
.footer-sep {
    color: rgba(255, 255, 255, 0.65);
}
.footer a.footer-icp {
    display: inline;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    letter-spacing: 0.02em;
}
.footer a.footer-icp:hover {
    color: #7ee8ff;
    text-decoration: underline;
}
.footer-visit-count {
    display: block;
    margin-top: 6px;
    color: rgba(200, 235, 255, 0.95);
    font-size: clamp(12px, 0.85vw, 13px);
}