/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #ffffff;
    color: #212529;
    min-height: 100vh;
    line-height: 1.4;
    padding-bottom: 50px; /* 为固定页脚预留空间 */
}

/* 独立的标题栏 - 无明确界限 */
.main-header {
    position: relative;
    padding: 30px; /* 与页面顶部和左右的距离 */
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    width: 100%;
    /* 移除所有边界和背景，营造无界限感 */
    background: none;
    box-shadow: none;
    border: none;
}

/* Logo容器 */
.logo-container {
    display: flex;
    align-items: center;
}

/* Logo样式 */
.company-logo {
    height: 50px; /* 适中高度 */
    width: auto; /* 宽度自适应 */
    object-fit: contain;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.company-logo:hover {
    opacity: 0.9;
}

/* 导航菜单 - 靠右显示 */
.main-nav {
    margin-left: auto; /* 自动填充左侧空间，使菜单靠右 */
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px; /* 菜单项间距 */
}

.nav-link {
    color: #212529;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 5px 0;
    position: relative;
}

/* 微妙的下划线效果替代明确边框 */
.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #5A7FC2;
    transition: width 0.2s ease;
}

.nav-link:hover:after,
.nav-link.active:after {
    width: 100%;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px; /* 与左右保持一致距离 */
}

/* 主内容区 */
main {
    padding: 1rem 0;
}

/* 工作室信息区 */
.studio-info {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem;
    padding-top: 1rem;
}


/* 标题样式 */
.studio-name {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    font-size: clamp(1.2rem, 4vw, 2.2rem);
    margin: 0 auto 1rem;
    display: inline-block;
    letter-spacing: -0.2px;
    word-break: keep-all;
}

@media (max-width: 480px) {
    .studio-name {
        /* 进一步缩小移动端字体范围 */
        font-size: clamp(1rem, 5vw, 1.6rem);
        /* 允许极小屏幕下稍微缩小字间距 */
        letter-spacing: -0.5px;
    }
}

.slogan {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #6C757D;
    margin-bottom: 0;
    line-height: 1.6;
}

/* 词云区域 - 透明背景 */
.wordcloud-section {
    background-color: transparent;
    padding: 1rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

/* 词云容器 */
.word-cloud {
    width: 100%;
    height: 500px;
    margin: 0 auto;
    position: relative;
}

.mobile-wordcloud {
    text-align: center;
}


/* 响应式调整 - 平板设备 */
@media (max-width: 768px) {
    .word-cloud {
        height: 400px;
    }
    
    .main-header, .container {
        padding: 25px; /* 平板端稍减间距 */
    }
    
    .nav-links li {
        margin-left: 20px;
    }
}

/* 响应式调整 - 手机设备 */
@media (max-width: 480px) {
    .word-cloud {
        height: 300px;
    }
    
    .main-header, .container {
        padding: 20px; /* 手机端进一步减小间距 */
    }
    
    .main-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-nav {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-links li {
        margin-left: 0;
    }
    
    .studio-info {
        padding-top: 0.5rem;
    }
}

/* 词云文字样式 */
.word {
    cursor: pointer;
    user-select: text;
    transition: all 0.2s ease;
}

.word:hover {
    color: #333 !important;
    font-weight: bold;
    text-decoration: underline;
    text-shadow: 0 0 3px rgba(255,255,255,0.8);
}

/* 重复词样式 */
.word.repeat-1 { opacity: 0.9; }
.word.repeat-2 { opacity: 0.8; }
.word.repeat-3 { opacity: 0.7; }

/* 页脚样式 */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.9);
    border-top: 1px solid #E9ECEF;
    padding: 0.8rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.copyright {
    text-align: center;
    color: #6C757D;
    font-size: 0.8rem;
}
