/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary-color: #FF2D55;
    --primary-filter: invert(25%) sepia(90%) saturate(5000%) hue-rotate(340deg);
    --bg-color: #121212;
    --sidebar-bg: #1E1E1E;
    --text-color: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --header-title-font-size: 18px;
    --header-title-font-weight: 600;
    --header-title-color: #FF2D55;;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    width: 220px;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1000; /* 提高z-index */
    -webkit-overflow-scrolling: touch; /* 改善移动端滚动 */
    transform: translateZ(0); /* 触发硬件加速 */
    overflow-y: auto;
}

.logo {
    height: 50px; /* 固定高度 */
    display: flex;
    align-items: center; /* 垂直居中 */
    padding: 0 20px; /* 水平内边距 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* 可选：分割线 */
}
.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 15px;
    font-weight: bold;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    margin: 5px 0;
    border-left: 3px solid transparent;
}

.nav-item i {
    margin-right: 10px;
    font-size: 18px;
}

.nav-item span {
    font-size: 14px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    background-color: rgba(255, 45, 85, 0.1);
    border-left: 3px solid var(--primary-color);
    color: var(--primary-color);
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 220px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.content-header {
    height: 50px; /* 与Logo相同高度 */
    align-items: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-title {
    font-size: var(--header-title-font-size);
    font-weight: var(--header-title-font-weight);
    color: var(--header-title-color);
    margin: 0;
    padding: 0;
    line-height: 1.2;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    font-weight: bold; /* 直接设置为加粗 */
}

.user-info {
    display: flex;
    align-items: center;
}

.login-btn {
    padding: 5px 15px;
    background-color: var(--primary-color);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover {
    opacity: 0.9;
}

.content-wrapper {
    padding: 20px;
    position: relative;
}



/* 用户信息样式 */
.user-profile {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    transition: background-color 0.3s;
}

.user-profile:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}

.user-nickname {
    font-size: 14px;
    color: #fff;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}





/* 导航图标样式 */
.nav-icon {
    width: 20px;  /* 根据你的图标大小调整 */
    height: 20px;
    margin-right: 10px;
    object-fit: contain;

    transition: all 0.3s;
}

.nav-item.active {
    background-color: rgba(255, 45, 85, 0.1);
    border-left: 3px solid var(--primary-color);
    color: var(--primary-color);
}

.nav-item.active .nav-icon {
    filter: brightness(1) hue-rotate(0deg) saturate(3) invert(25%) sepia(90%) saturate(5000%) hue-rotate(340deg);
}


/* 响应式设计 */
@media (max-width: 768px) {
    :root {
        --header-title-font-size: 16px;
    }
    .sidebar {
        width: 40px;
        overflow: hidden;
    }
    
    .logo h1, .nav-item span {
        display: none;
    }
    .logo {
        padding: 20px 0;
        justify-content: center;
    }
    .main-content {
        margin-left: 40px;  /* 确保与sidebar宽度一致 */
        width: calc(100% - 40px); /* 添加这一行确保宽度计算正确 */
    }
    
    .nav-item {
        display: flex;
        justify-content: flex-end; /* 图标靠右 */
        padding: 12px 0;
    }
    
    .nav-item i {
        margin-right: 0;
    }
    
    /* 添加以下规则确保内容区域充分利用空间 */
    .content-wrapper {
        padding: 5px; /* 在手机上减少内边距 */
    }
    
    /* 确保footer也跟随调整 */
    .footer {
        left: 40px;
        width: calc(100% - 40px);
    }

    /* 对于create-video-container的特殊调整 */
    .create-video-container {
        padding: 10px;
        padding-bottom: 80px;
    }
    
    /* 调整section的内边距 */
    .section {
        padding: 15px;
    }
    
    /* 调整标题大小 */
    .title {
        font-size: 18px;
    }
    
    /* 调整标签页布局 */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab {
        min-width: 100px;
        padding: 10px 0;
        font-size: 13px;
    }

}
.nav-item:hover .nav-icon {
    transform: scale(1.1);
    filter: brightness(1);
}



.backUrl {
    font-size: 14px;
    font-weight: bold;
    color: #FF2D55;
    background: rgba(255, 45, 85, 0.1);
    
    border-radius: 10px; 
    width: 100px;
    height: 24px;
    text-decoration: none;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}







/* 导航内容容器 */
.nav-content {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

/* 完整文本 - 默认显示 */
.nav-text {
    font-size: 14px;
    display: block;
}

/* 简写文本 - 默认隐藏 */
.nav-short-text {
    display: none;
    font-size: 10px;
    text-align: center;
    line-height: 1.2;
}

/* 响应式设计 - 手机端样式 */
@media (max-width: 768px) {
    .sidebar {
        width: 40px; /* 改回原来的40px */
        overflow: visible; /* 改为visible确保文字不隐藏 */
    }
    
    .logo {
        padding: 15px 0;
        justify-content: center;
        height: 50px;
    }
    
    .logo h1 {
        display: none !important;
    }
    
    .main-content {
        margin-left: 40px; /* 改回原来的40px */
        width: calc(100% - 40px); /* 改回原来的40px */
    }
    
    .nav-menu {
        padding: 10px 0;
    }
    
    .nav-item {
        display: block;
        padding: 12px 0 !important; /* 改回原来的垂直内边距 */
        text-align: center;
        margin: 5px 0 !important; /* 改回原来的外边距 */
        border-left: none !important; /* 移除左侧边框 */
        border-radius: 0; /* 移除圆角，保持原来样式 */
    }
    
    .nav-content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px; /* 减少间距以适应窄宽度 */
    }
    
    .nav-icon {
        margin-right: 0 !important;
        margin-bottom: 0;
        width: 20px !important; /* 改回原来的图标大小 */
        height: 20px !important;
    }
    
    /* 在手机端隐藏完整文本，显示简写文本 */
    .nav-text {
        display: none !important;
    }
    
    .nav-short-text {
        display: block !important;
        font-size: 9px !important; /* 减小字体大小以适应窄宽度 */
        color: inherit;
        font-weight: 500;
        line-height: 1.1;
    }
    
    /* 调整高亮状态 */
    .nav-item.active {
        background-color: rgba(255, 45, 85, 0.1) !important;
        border-left: 3px solid var(--primary-color) !important; /* 恢复左侧边框 */
        color: var(--primary-color) !important;
    }
    
    .nav-item.active .nav-short-text {
        color: var(--primary-color) !important;
    }
    
    /* 调整footer位置 */
    .footer {
        left: 40px; /* 改回原来的40px */
        width: calc(100% - 40px); /* 改回原来的40px */
    }
    
    /* 确保hover效果在移动端也适用 */
    .nav-item:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .nav-item:hover .nav-short-text {
        color: inherit;
    }
}