/* 样式文件 - 非关键CSS */

/* 隐藏非关键内容直到CSS加载完成 */
.non-critical { opacity: 0; }
.critical-loaded .non-critical { 
    opacity: 1; 
    transition: opacity 0.5s ease; 
}

/* 移动端菜单样式 */
.mobile-menu {
    display: none;
    transition: all 0.3s ease;
    transform: translateY(-10px);
    opacity: 0;
}

.mobile-menu.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

/* 修复移动端点击延迟 */
a, button {
    touch-action: manipulation;
}

/* 移动端菜单背景色加深 */
.mobile-menu-bg {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 域名展示区超长域名换行处理 */
.domain-display {
    white-space: nowrap; /* 电脑端默认不换行 */
}

/* 电脑端：域名容器自适应宽度 */
@media (min-width: 769px) {
    .gradient-dark .relative.z-10 {
        max-width: none !important;
        width: auto !important;
    }
    
    .gradient-dark h1 {
        width: auto !important;
        max-width: 100% !important;
    }
}

/* 移动端域名换行优化 */
@media (max-width: 768px) {
    .domain-display {
        white-space: normal; /* 移动端允许换行 */
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: keep-all; /* 防止后缀被断开 */
        hyphens: none; /* 禁止自动断字 */
    }
    
    .text-gradient {
        display: inline;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* 语言切换按钮样式 */
.language-switcher {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 30px;
    padding: 2px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.language-switcher a {
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.language-switcher a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.language-switcher a:not(.active) {
    color: #666;
}

.language-switcher a:not(.active):hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* 语言切换容器 - 移动到导航栏和域名展示区之间 */
.language-container {
    margin-top: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: flex-end;
}

/* 桌面端语言切换按钮位置 - 宽度自适应 */
@media (min-width: 769px) {
    .language-container {
        padding-right: 1.5rem;
    }
    
    .language-switcher {
        width: auto;
        display: inline-flex;
    }
}

/* 移动端语言切换按钮位置 - 居右 */
@media (max-width: 768px) {
    .language-container {
        padding-right: 1rem;
        justify-content: flex-end;
    }
    
    .language-switcher {
        display: flex;
        width: auto;
        margin: 0;
    }
}