/* 引入自定义字体 */
@font-face {
    font-family: 'HarmonyOS';
    src: url('../font/HarmonyOS.woff2') format('woff2'),
         url('../font/HarmonyOS.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* CSS变量定义，方便统一管理和主题切换 */
:root {
    --primary-color: #6462f3;
    --primary-dark: #5351d8;
    --secondary-color: #ff4949;
    --text-primary: #333333;
    --text-secondary: #777777;
    --text-tertiary: #999999;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border-color: #e5e5e5;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(100, 98, 243, 0.15);
    --shadow-lg: 0 8px 24px rgba(100, 98, 243, 0.2);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
    --border-radius: 4px;
}

/* 重置和基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'HarmonyOS', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul, ol {
    list-style: none;
}

/* 容器样式 */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 10px;
}

/* 头部导航样式 */
.header {
    background-color: var(--bg-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-content {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
    padding: 0 10px;
    position: relative;
}

/* 确保导航和用户操作区在同一侧 */
.header-content > nav, 
.header-content > .user-actions {
    margin-left: auto;
}

/* 移动端菜单按钮样式 - 基础样式 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    margin-left: auto;
}

.mobile-menu-btn span {
    display: block;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all var(--transition-normal);
}

/* 移动端菜单打开时的动画效果 */
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.logo img {
    height: 45px;
    transition: transform var(--transition-fast);
}

.logo img:hover {
    transform: scale(1.05);
}

/* 活动徽章样式 */
.act-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.act-badge i {
    color: var(--primary-color);
    font-size: 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
}

.nav-item {
    margin-right: 30px;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-item:hover {
    color: var(--primary-color);
}

.nav-item a {
    cursor: pointer;
    padding: 0 10px;
    line-height: 66px;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-top: none;
    box-shadow: var(--shadow-md);
    display: none;
    z-index: 1000;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    overflow: visible;
    min-width: 220px;
    width: auto;
    white-space: nowrap;
    max-height: none;
}

.nav-item:hover .dropdown-menu {
    display: block !important;
    animation: fadeInDown var(--transition-fast);
}

.dropdown-menu li {
    padding: 12px 24px;
    transition: all var(--transition-fast);
}

.dropdown-menu li:hover {
    background-color: rgba(100, 98, 243, 0.05);
}

.dropdown-menu li a {
    color: var(--text-primary);
    display: block;
    line-height: normal;
    padding: 0;
    text-decoration: none;
}

.dropdown-menu li a:hover {
    color: var(--primary-color);
}

/* 标签样式 */
.hot-tag, .new-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--border-radius);
    font-size: 12px;
    color: var(--bg-white);
    margin-left: 4px;
}

.hot-tag {
    background-color: var(--secondary-color);
}

.new-tag {
    background-color: var(--primary-color);
}

/* 用户操作按钮 */
.user-actions {
    display: flex;
    align-items: center;
}

.login-btn {
    margin-right: 24px;
    color: var(--text-primary);
    font-weight: 400;
}

.login-btn:hover {
    color: var(--primary-color);
}

.register-btn {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    border: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 4px rgba(100, 98, 243, 0.2);
}

.register-btn:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(100, 98, 243, 0.3);
    transform: translateY(-1px);
}

.register-btn:active {
    transform: translateY(0);
}

/* 轮播图基础样式 */
.banner {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.banner-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--transition-slow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-slide.active {
    opacity: 1;
}

/* 返回顶部按钮样式 */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 999;
}

#back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

/* 通用按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 表单基础样式 */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(100, 98, 243, 0.1);
}

/* 页脚样式 */
.footer {
    margin-top: 0;
    overflow: hidden;
}

/* 服务承诺条 */
.service-commitment {
    padding: 25px 0;
}

.commitment-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 10px;
}

.commitment-item {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
    position: relative;
    padding: 0 20px;
}

.commitment-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40px;
    background-color: var(--border-color);
}

.commitment-icon {
    margin-right: 12px;
}

.commitment-icon i {
    font-size: 28px;
    color: var(--text-primary);
}

.commitment-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.commitment-content p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* 主体内容区 */
.footer-main {
    background-color: var(--bg-white);
    padding: 60px 0;
}

.footer-content {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* 品牌信息区 */
.footer-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 40px;
    width: 25%;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 20px;
}

.company-info p {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.contact-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.contact-info .phone {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 10px;
}

/* 多列导航区 */
.footer-links {
    display: flex;
    justify-content: space-between;
    width: 75%;
}

.link-column {
    flex: 1;
    margin-left: 40px;
}

.link-column h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-transform: none;
    letter-spacing: normal;
}

.link-column h4::after {
    display: none;
}

.link-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.link-column li {
    margin-bottom: 15px;
}

.link-column a {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding-left: 0;
    position: relative;
}

.link-column a:hover {
    color: var(--primary-color);
    padding-left: 10px;
}

.link-column a:hover::before {
    content: "-";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    display: block;
}

/* 合规footer */
.footer-compliance {
    background-color: var(--bg-light);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.compliance-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: calc(var(--container-width) + 200px);
    margin: 0 auto;
    padding: 0 10px;
    gap: 20px;
}

.compliance-info {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
}

.compliance-item {
    display: flex;
    align-items: center;
    margin-right: 0;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.compliance-item img {
    width: 28px;
    height: 28px;
    margin-right: 12px;
}

.compliance-item span {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

.copyright p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

/* 移动端菜单样式 */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #fff;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding-top: 80px;
        overflow-y: auto;
    }
    
    .nav.active {
        transform: translateX(0);
    }
    
    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px;
    }
    
    .nav-item {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    .nav-item a {
        display: block;
        padding: 15px 0;
        font-size: 16px;
        color: #333;
        text-decoration: none;
    }
    
    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: #f8f9fa;
        margin-top: 0;
        padding-left: 20px;
    }
    
    .dropdown-menu li {
        border-bottom: 1px solid #e9ecef;
    }
    
    .dropdown-menu li:last-child {
        border-bottom: none;
    }
    
    .dropdown-menu a {
        padding: 12px 0;
        font-size: 14px;
    }
    
    .user-actions {
        display: none;
    }
    
    .banner {
        height: 350px;
    }
    
    .footer {
        padding: 30px 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-section {
        width: 100%;
    }
    
}

/* 隐藏原有的移动端菜单（仅在移动端生效） */
@media (max-width: 768px) {
    .nav {
        display: none !important;
    }
    
    /* 确保移动端菜单按钮始终可见 */
    .mobile-menu-btn {
        display: flex !important;
    }
}

/* 移动端专用菜单样式（三部分结构） - 全局生效 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 85%;
    height: 100vh;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu-overlay.active .mobile-menu-container {
    transform: translateX(0);
}

/* 顶部搜索栏 */
.mobile-search-bar {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fff;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px 12px;
}

.search-icon {
    color: #999;
    font-size: 14px;
    margin-right: 8px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333;
    background: transparent;
}

.search-input::placeholder {
    color: #999;
    font-family: sans-serif;
}

.search-close-btn {
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

/* 左侧导航栏 + 右侧内容区 */
.mobile-menu-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 左侧导航栏 */
.mobile-nav-sidebar {
    width: 40%;
    background-color: #f8f9fa;
    border-right: 1px solid #e9ecef;
    overflow-y: auto;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    padding: 15px 12px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    font-family: sans-serif;
    border-radius: 4px;
    margin: 4px 8px;
}

.mobile-nav-item.active {
    background-color: #e3f2fd;
    color: #007bff;
    font-weight: bold;
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

/* 右侧内容区 */
.mobile-content-area {
    flex: 1;
    background-color: #fff;
    overflow-y: auto;
    padding: 15px;
}

.mobile-content-section {
    display: none;
}

.mobile-content-section.active {
    display: block;
}

.content-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.content-category:last-child {
    border-bottom: none;
}

.category-title {
    margin: 0;
    font-size: 14px;
    color: #333;
    font-family: sans-serif;
    font-weight: normal;
}

.content-category i {
    color: #999;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.content-category.active i {
    transform: rotate(180deg);
}

/* 动画效果 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-in-out;
    max-width: 400px;
    width: calc(100% - 40px);
}

.notification.success {
    background-color: #2ed573;
}

.notification.error {
    background-color: #ff4757;
}

.notification.info {
    background-color: #6462f3;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}


/* 右侧悬浮组件样式 */
.floating-widget {
    position: fixed;
    right: 20px;
    top: 75%;
    transform: translateY(-75%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.widget-item {
    position: relative;
}

.widget-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-normal);
    color: #333333;
    text-decoration: none;
}

.widget-link:hover {
    transform: translateX(-10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 图标颜色 */
.widget-link i {
    font-size: 24px;
}

.widget-link.qq {
    color: #12B7F5;
}

.widget-link.wechat {
    color: #07C160;
}

.widget-link.service {
    color: #2175f5;
}

.widget-link.ticket {
    color: #ff6b6b;
}

.widget-link.top {
    color: #2175f5;
}

/* 提交工单特殊样式 */
.widget-link.ticket {
    width: auto;
    height: auto;
    padding: 10px 15px;
    border-radius: 25px;
    background-color: #2175f5;
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.widget-link.ticket i {
    margin-right: 5px;
    font-size: 16px;
    color: white;
}

/* 提示文字样式 */
.widget-tooltip {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #333333;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 1001;
}

.widget-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid #333333;
}

.widget-link:hover .widget-tooltip {
    opacity: 1;
    visibility: visible;
    right: 70px;
}

/* 独立返回顶部按钮样式 */
.back-to-top-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
}

.back-to-top-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #2175f5;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(33, 117, 245, 0.3);
    transition: all var(--transition-normal);
    color: white;
    text-decoration: none;
    text-align: center;
}

.back-to-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(33, 117, 245, 0.4);
    background-color: #1a5fd8;
}

.back-to-top-btn i {
    font-size: 20px;
    margin-bottom: 2px;
}

.back-to-top-text {
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .floating-widget {
        right: 10px;
        gap: 8px;
    }
    
    .widget-link {
        width: 45px;
        height: 45px;
    }
    
    .widget-link i {
        font-size: 20px;
    }
    
    .widget-link.ticket {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .widget-link.ticket i {
        font-size: 14px;
    }
    
    .back-to-top-container {
        right: 10px;
        bottom: 10px;
    }
    
    .back-to-top-btn {
        width: 50px;
        height: 50px;
    }
    
    .back-to-top-btn i {
        font-size: 18px;
    }
    
    .back-to-top-text {
        font-size: 10px;
    }
}
