/* 全局重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft Yahei", sans-serif; color: #333; }
a { text-decoration: none; color: inherit; }

/* 头部导航 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    height: 70px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}
.header-logo {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.header-logo img {
    height: 48px;
    margin-right: 8px;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
}
.header-logo .title {
    font-size: 18px;
    font-weight: bold;
    color: #662d91; /* 主色调 */
}
.header-logo .sub-title {
    margin-top: 2px;
    font-size: 12px;
    color: #999;
}
.header-nav a {
    margin: 0 15px;
    font-size: 14px;
    color: #666;
    transition: color 0.3s;
}
.header-nav a:hover { color: #662d91; }

/* 登录区域（核心样式） */
.header-login {
    display: flex;
    align-items: center;
    min-width: 120px;
}
/* 已登录 */
.header-login.logged {
    position: relative;
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}
.user-profile:hover {
    background-color: #f5f5f5;
}
.header-login.logged img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #f0f0f0;
}
.header-login.logged .user-name {
    font-size: 14px;
    color: #662d91;
    font-weight: 500;
}
.header-login.logged .layui-icon-down {
    font-size: 12px;
    color: #999;
}

/* 用户下拉菜单 */
.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 1000;
    min-width: 120px;
    margin-top: 5px;
}
.dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
}
.dropdown-item:hover {
    background: #f0f0f0;
    color: #662d91;
}

/* 未登录 */
.header-login.unlogged button {
    font-size: 14px;
    padding: 0 15px;
    height: 32px;
    background: #662d91;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s;
}
.header-login.unlogged button:hover { opacity: 0.9; }

/* 轮播区域（核心样式） */
.carousel-section {
    padding: 20px 5%;
    background: #f8f8f8;
}
.carousel-content h2 {
    text-align: center;
    font-size: 24px;
    color: #662d91;
    margin-bottom: 20px;
}
.layui-carousel {
    margin: 0 auto;
    max-width: 1200px;
    height: 500px; /* 默认高度 */
}
.layui-carousel .layui-carousel-item {
    position: relative;
    cursor: pointer;
}
.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* 视频容器 */
.carousel-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}
/* 视频播放按钮 */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 1;
}
.video-play-btn i { font-size: 36px; } /* LayUI播放图标 */
.carousel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

/* 功能模块 */
.features-section {
    padding: 40px 5%;
    text-align: center;
}
.features-section h2 {
    font-size: 22px;
    color: #662d91;
    margin-bottom: 30px;
}
.features-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.feature-item {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    padding: 25px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: all 0.3s;
}
.feature-item:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}
.feature-item i {
    font-size: 36px;
    color: #662d91;
    margin-bottom: 15px;
}
.feature-item p {
    font-size: 16px;
    color: #666;
}

/* 作品展示 */
.works-section {
    padding: 40px 5%;
    background: #f8f8f8;
    text-align: center;
}
.works-section h2 {
    font-size: 22px;
    color: #662d91;
    margin-bottom: 30px;
}
.works-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.work-item {
    width: calc(33.333% - 20px);
    min-width: 280px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s;
}
.work-item:hover { transform: translateY(-5px); }
.work-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* 全屏遮罩 */
.fullscreen-mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    cursor: zoom-out;
}
.fullscreen-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* 页脚样式 */
.page-footer {
    padding: 30px 5%;
    background: #f5f5f5;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* 响应式适配 */
@media (max-width: 992px) {
    .work-item { width: calc(50% - 20px); }
    .layui-carousel { height: 400px; }
}
@media (max-width: 768px) {
    .header-nav { display: none; }
    .work-item { width: 100%; }
    .layui-carousel { height: 300px; }
    .features-row { flex-direction: column; }
    .user-name {
        display: none;
    }
}
@media (max-width: 480px) {
    .layui-carousel { height: 200px; }
    .header-logo .title { font-size: 16px; }
    .header-logo .sub-title { font-size: 10px; }
}